Shopify Image

Disabling Increment/Decrement of quantity

Desktop

Go to cart-template.liquid file present in the Sections folder.

Check for the code for the "Quantity" and give the "if-else" condition using the product id. Edit the code for the input type number, add "readonly" to the input field so that it user can only see that field but cannot edit the field.

The below code checks for that particular product in cart page and disables the quantity of the product.

Shopify Image

Mobile

Sometimes, desktop and mobile code for quantity will be different. In such cases, we need to add "readonly" for the input field in mobile code as well. Add the below code to disable the qunatity.

Shopify Image

Result

By following the above step, we can disable the quantity of the product.

Shopify Image
Read similar blog: How to Prepare Your Shopify Site for Google Page Experience Updates and Why it is Important ➞

Receive latest marketing insights, data and inspiration

View Blogs ➞ Subscribe ➞

Start your Project Today

Get Started