Minimum 4 (quantity) with tag: “ MIN4 “

sao
Explorer
228 0 21

Hi, I ve found on internet this code:

<span class="input-amount">
<label for="quantity" class="hidden">{{ 'product.form.quantity' | t }}</label>
<input type="number" id="quantity" name="quantity"
{% if product.tags contains "MIN4" and current_variant.inventory_management == 'shopify' %}
value="4" min="4"
{% else %}
value="1"
{% endif %}
{% if current_variant.inventory_management == 'shopify' and current_variant.inventory_policy == 'deny' %}
max="{{ current_variant.inventory_quantity }}"
{% endif %}
required>
</span> “.i understand from this code that,on the products that I place the tag “ MIN4 “ it will be necessary to add at least 4 pcs .The point is that I can t find where exactly I should place this code..😔 

my website is: www.aiciavem.ro using shella theme

Replies 3 (3)

Dawood_Mirza_
Explorer
113 16 25

Hi @sao,

Since you want the changes to take effect on the main product page, try pasting the code on main-product-page.liquid

 

The file name might be different as per theme, I have provided the brief idea 

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.
sao
Explorer
228 0 21

Hi,It s necessary to put it fix in a section or anywhere in this .liquid?

Dawood_Mirza_
Explorer
113 16 25

Find the part where the product quantity input is defined or the quantity selector is defined
Just after that add this code

Hope to have helped you,

Still need assistance let me know.
BR

Dawood Mirza

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.