CLICK HERE TO TRY AUTOMATIC DISCOUNT FOR SHOPIFY

Disable quantity picker in cart for gift item

Question from merchant who has a gift item priced at $0 (nice strategy to make a Gift + Discount promotion)

I give a free product for every order >= 75 €.
Then the product is in the cart but customers can touch the - / + button and add quantity of this product.
I don't want them to be able to do that.
Is it possible to limit this action?

Locate the quantity picker code

Locate the theme file where the quantity picker is located. Most often in the cart-template.liquid (eg.in the DEBUT theme).

quantity picker snippet Debut theme

Add a snippet of code

{% if item.properties['FREE GIFT'] %}
1
{% else %}
... quantity picker code here ...
{% endif %}

Once the free gift is automatically added the cart, it will show in your cart. The quantity picker next to it will be disabled, and quantity will be set to "1". Other non-gift items will still have the quantity picker. 

 disable quantity picker shopify

Important #1

In some themes, there are 2 snippets for the quantity picker, one for desktop and one for mobile. That's the case in the DEBUT theme (see screenshot above).

Important #2

If you are using a drawer cart (ajax cart), the quantity picker snippet will not be located in cart-template.liquid. Each theme has a different file name for the drawe/ajax cart, search for it in your theme files. It's also possible that your store has a mini-cart/drawer in addition to the cart page, in the customer flow, meaning customers can checkout from the drawer/mini-cart OR go to cart page. In this case, you will have to implement the script above in more than one theme files.

You can do the same logic to swap the item price with "FREE" 

mark automatic freebie as FREE in the cart