Show product weights and total weight in cart, change KG weight unit text to CBM

Hi All,

I am looking for a solution in order to be able to display both the product weights and the total weight of all products within the cart. Ideally this should be shown underneath or at the side of each product, and the total weight located above the price and checkout button.

Worst case scenario is that the user sees the total weight in the cart as a minimum.

I would also like to know if it is possible to change the “Kg” weight unit text to show “CBM” text instead as a unit measurement? Or add “CBM” as a unit of measurement in the product admin page, so it can be selected and then outputs as such.

Thanks in advance :slightly_smiling_face:

Regards,

BAFC

I am using the Craft theme and the site is under development currently, whilst I sort out the functionalities I require

https://179b56.myshopify.com/

Hi @BAFC Some starting info below, If you need this customization then contact me by mail for services.
Contact info in signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Use line items variant weights and or the carts total weight

https://shopify.dev/docs/api/liquid/objects/variant#variant-weight

https://shopify.dev/docs/api/liquid/objects/cart#cart-total_weight

For CBM instead of kg possibly use weight_with_unit filter.

https://shopify.dev/docs/api/liquid/filters/weight_with_unit

Though you may need to just filter it , roughly:

{{ item.variant.weight_in_unit | weight_with_unit | replace:“kg”,“CBM” }}

Hi JamesTech,

Thanks for your suggested solutions.

Unfortunately, I could not locate three of the apps: “Weight-Based Shipping”, “Unit Price” and “Unitify”.

I located this one: “Advanced Product Options” but its not cheap, and the reviews of late are not looking great (since they updated the app)

Ideally, I did not want to spend around $30-$50 a month on multiple apps, that may have issues when they upgrade, or when I upgrade the Theme.

Thanks anyway.

Regards

BAFC

Hi @BAFC

Feature can be custom code in the theme to get the desired result.

You can choose variant weight field to enter the weight or can use metafield.

Add the unit of weight as product attribute and write the calculation logic on cart page.

Let us know if interested to implement the same.