Hello there Shopify society,
I need an advice regarding the cart’s product’s weight.
I need to show the message to customers if the go over the limit for certain products.
I managed to show the message if each product’s weight with SKU E1 go over 1000g, but I need to show the message if the weight of all products in the cart with SKU ‘E1’ have more than 1000g.
How can I show that, I tried with {{cart.total_weight}} , but it show the weight of all products, not only total product of items with SKU ‘E1’? I would really appreciate if you could help me. I tried some apps, but they don’t work.
Thanks
{% if item.variant.sku contains ‘E1’%}
{%if item_weight_cart < 1000 %}
This item is considered to be a Dangerous good.
{%endif%} {%if item_weight_cart > 1000 %} You have some Dangerous good items in your cart .
You have reached the limit for Dangerous good items. Please, lower the quantity.
{%if cart.total_weight > 1000 %}
The total weight of all items with E1 regulation is over the limit, please lower the quantity.
{%endif%}{%endif%}