{% for item in cart.items %}{% if item.fulfillment_service == 'manual' %}{% if item.product.tags contains 'DGA' %}{% unless groupnames contains 'partner1' %}{% assign groupcount = groupcount | plus:1 %}{% assign groupnames = groupnames | append: 'partner1' | append: ',' %}{% endunless %}{% else %}{% unless groupnames contains 'bevilles' %}{% assign groupcount = groupcount | plus:1 %}{% assign groupnames = groupnames | append: 'bevilles' | append: ',' %}{% endunless %}{% endif %}{% else %}{% unless groupnames contains item.fulfillment_service %}{% assign groupcount = groupcount | plus:1 %}{% assign groupnames = groupnames | append: item.fulfillment_service | append: ',' %}{% endunless %}{% endif %}{% endfor %}{% assign groupnames = groupnames | split:',' %}{% for groupname in groupnames %}<h3 style="color: #d1619c;">DELIVERY {{ forloop.index }} OF {{ groupcount }}</h3><div style="color: #ccc;">{% if groupname == 'bevilles' %}Delivered by Bevilles{% else %}Delivered separately by our partner{% endif %}</div>{% for item in cart.items %}{% assign group = '' %}{% if item.fulfillment_service == 'manual' %}{% if item.product.tags contains 'DGA' %}{% assign group = 'partner1' %}{% else %}{% assign group = 'bevilles' %}{% endif %}{% else %}{% assign group = item.fulfillment_service %}{% endif %}{% if group == groupname %}// Items showing here{% endif %}{% endfor %}{% endfor %}
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Friday, 29 December 2023
How to Show Items in group on cart page in Shopify
Labels:
Shopify
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment