Cart drawer how to add multiple meta fields product list

When 2 products are added to the cart drawer, only 1 product’s meta fields data is shown, 2nd product’s meta fields data is not shown, this is very urgent, can anyone help?

You can try to move your code into {%- for item in cart.items -%} … {% endfor %} code of your cart item file

not working see the screenshot same data showing now

The code is probably only going over ONE “pro” variable and it’s set to whatever the last item is in the cart.items objects.

Rough code:

{% for item in cart.items %}

{% for product in item.product.metafields… %}

{% endfor %}

{% endfor %}

If you need this customization fixed and fleshed out then contact me by mail for services.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact info in signature.

1 Like

It can also be an issue of cart-drawers being rendered dynamically so they do not have all the information available via javascript when it builds the cart-drawer as products are added, so it’s stuck on whatever is in the cart when the page first loads.

Thank you it is working now