Removing quantity box for select products

Lila_Marquez
Shopify Partner
8 0 2

Help! I want to know how to remove the quantity box from select items. I have paintings that I want to sell once only for each size. I saw this thread but I couldn't figure out how to do it as I have product apps code also installed and I don't want to mess up with it as well. I'm using the Minimal Theme. This is my store Lines of Lila.

Thank you in advance! 

Benjamin_C
Shopify Staff
Shopify Staff
368 0 40

Hello Lila, Ben here - your Shopify Guru! 

 The key to that thread is wrapping your quantity selector code in 

{% unless product.tags contains 'singlular' %}

PUT YOUR QUANTITY SELECTOR CODE HERE

{% endunless %}

Then you can just apply a product tag of "singular" to your products and it will hide the quantity selector. 

In your themes Product.liquid file look for the start of your quantity selection box code at line 115.

From your admin click Online store then themes

Find the theme you want to edit, click the … button, then click Edit HTML/CSS.

Then find the file Product.liquid. And make the modifications as outlined above. 

I hope this helps! Feel free to reach out if you have any further questions :)

Cheers,
Ben C - Shopify Guru
Support@Shopify.com

John_O
Shopify Staff
Shopify Staff
143 0 19

Hi Lila,

Thanks for getting in touch here. This could be a little trickier since you have the app code, but let me know if Ben's suggestion doesn't work and then I can reach you via email and we can look at finding a solution with our theme support team.

Best of luck!


John Oh
support@shopify.com

 

Lila_Marquez
Shopify Partner
8 0 2

Hi, Ben. Thank you so much!

I managed to use your code. Although when I use the tag "singular", it still shows the quantity selector on the product page.

However, I did a little experiment and replaced "singular" with "disabled" and added the disabled tag on some of the products. This time it worked.

My only concern now is when customers proceed to the cart page, the quantity selector still shows up. Tried the code again in the cart.liquid. This time it didn't work. Haha.

Anyway, I don't think it's an issue now on the cart page as it's already made clear on the product page. But if there's still a way to get around this last trick on the cart page, then, that would be great as well. Still, if changing it would mean ending up not showing the quantity of products ordered, then I'll leave it as it is.

Once again, thanks so much! And all the best!

Lila_Marquez
Shopify Partner
8 0 2

Hi, John!

Thank you so much for offering help. I was able to tweak it a bit (see my reply to Ben).

I'll definitely reach out to Shopify's support team in case I needed to change something that's really out of my capacity.

Once again, kudos to the Shopify! Great team support and best e-commerce platform!

:)

0 Likes
RandaEissa
New Member
2 0 1

I'm finding it difficult to apply this code, i dont even have line 115 in my product/liquid

i dont know what to dd exactly and where.

I found it in product-template.liquid in my theme—just find the selector and wrap that tag. It seems to still work.

eddie
0 Likes