NARRATIVE THEME: Quantity selector for some but not all products?

Hello,

I was wondering if there was a way for some products to have quantity selection as such:

While others would not have it, like this?

Thank you! My URL is hsophia.com and the password is hst 2

[email removed]

Hi,

Yes of course, you can add a tag on the products that you don’t want to show the quantity field and on the product page codes, you can hide the quantity field if the product contains that tag.

Thank you, but can you show how to do this?

Hi @hsophia ,

Please follow the steps below:

  • Step 1: Go to snippets > product-form.liquid file, find ‘show_quantity_selector’( in line 43 ).

  • Step 2: Add code with handle product: https://i.imgur.com/pBDuHCC.png

Code:

{% if product.handle == 'product handle 1' or product.handle == 'product handle 2' %}
  hide
{% endif %}

Ex: You want to hide it on 2 products ‘Advanced Biotics’ and ‘Advanced Gut Health Probiotic’, please add code:

{% if product.handle == 'advanced-biotics' or product.handle == 'advanced-gut-health-probiotics' %}
  hide
{% endif %}

Hope it helps!

Thanks! That worked perfectly.