How to show total weight on add to cart/checkout page?

Hi everyone, I’m using DEBUT theme for my shopify store

Just wondering how can I show the total weight on add to cart or even checkout page?

Is there any coding needed?

Thank you in advance!!!

Hi @hugon789

Coding in the theme would most likely be required indeed. You can show total weight of all items added in the cart with the cart object and total_weight attribute:

{{ cart.total_weight }}

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

You can also get the weight of a specific product variant using the variant object and weight attribute:

{{ variant.weight }}

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

Checkout is more tricky since you’d need a Shopify Plus plan to access the code. It’s also possible to show custom properties under each variant in checkout, but with no context I’m not sure it’s what you’re after.