BOGO Script Help

Highlighted
Shopify Partner
1 0 0

I have the following script. I am trying to have it apply to any product with a tag = bogotest

I cant get it to apply only to the products in the collection and to come automatically to the cart.

Can you please help?

 

             {% for tags in item.product.tags %}
                  {% if tags contains 'bogotest' and  item.quantity >= 2%}
                      <p class="cart-attribute__field" style="color:#c00;line-height:1;">
                        <small>Attention! </small>
                        <input type="hidden" name="attributes[BOGOTest]" value="Yes - {{item.variant.sku}}" checked>
                        <input type="hidden" name="discount" value="BOGOTEST">
                      </p>
                  {% endif %}

0 Likes