Remove all items/product in cart that has a Tag

Shopify Partner
26 0 3

Is there a way to remove all products in the cart that has a specific tags.

this is what i have so far to check all products in the cart

        {% assign all_tags = '' | split: '' %}
        {% for item in cart.items %}
          {% assign all_tags = all_tags | concat: item.product.tags %}
        {% endfor %}

        {% if all_tags contains 'Preorder' %}
          <div class="shipping-note-container">
            <span>Pre-order Item exist!!!!!</span>


            <!-- i want this link to remove all items that has preorder tag --> .  <---------------
            <a href="">Remove all Preorder Items</a>

          </div>
        {% endif %}

thanks in advance

0 Likes
New Member
3 0 0

I also need to add this functionality, did you find any way to do it?

0 Likes