Hello there,
I am trying to make a cart condition logic for the products in my store. I am not a shopify plus user and I am using the dawn theme.
i) This is for a specific collection of product which I tagged as “wine”. If a customer wants to order, he has to add at least 6 items in the cart or multiplication of 6 items in the cart (eg. 6, 12, 18, 24,30…)
If a customer does not fulfill this condition, he will not be able to proceed to checkout steps from the cart page. I am thinking of disabling the checkout button until the desired quantity of product is added in the cart. I have tried this code in the main-cart-items.liquid file. But this only works on page reload. This does not work automatically when I change the quantity in the cart page without reloading the page. Any suggestion on modifying the code would be highly appreciated. Thanks in advance.
Here is my code;
{% if item.product.tags contains ‘wine’ and remainder!=0 %}
You will need to purchase at least 6 wine bottles or multiplication of 6 bottles
Check out{% else %}
Enough wine now
Check out {% endif %} {% endfor %} {% if show_checkout_button %}
{% endif %}

