Saturday, November 4, 2017

Setting shopify quantity minimum value



Today faced with problem of shopify:

Ability to set up minimal value for a product quantity

After some research i found some old topics with difficult solutions, for example this one:

https://ecommerce.shopify.com/c/shopify-discussion/t/solved-how-to-set-up-minimum-order-quantities-for-each-product-403648

In my case it was enough to set minimal value for all products. So here how to do that:

Goto:
1. Admin / Online Store / 
2. From button "actions" select "edit code"
3. In folder "Sections" find file "product-template.liquid"
4. In my case it was line 172 with code:
class="product-form__input" id="Quantity" name="quantity" pattern="[0-9]*" type="number" value="1"
So i made change here to:
class="product-form__input" id="Quantity" min="10" name="quantity" pattern="[0-9]*" type="number" value="10"
I have set value default to 10 and "min" to 10 too.
5. Press review / save
6. Done


p.s. similar solution found here:
https://www.reddit.com/r/shopify/comments/45j225/how_do_i_set_minimum_order_quantities/

No comments:

Post a Comment