Hi @carriemek
Do you need this only on product pages or on whole website like category pages, homepage etc?
I did this with a trick. I added a tag to all those products where I don’t need quantity and add to cart button.
Then, I modified the code in a way if that tag is available on the product hide quantity and add to cart button.
Note: my tag for this condition is ‘catalog’
Hidden both
Normal product
To achieve this, you should open main-product.liquid under Sections.
Then find buy_buttons
Replace below code
{%- when 'buy_buttons' -%}
{%- render 'buy-buttons', block: block, product: product, product_form_id: product_form_id, section_id: section.id, show_pickup_availability: true -%}
and paste below code
{%- when 'buy_buttons' -%}
{% unless product.tags contains 'catalog' %}
{%- render 'buy-buttons', block: block, product: product, product_form_id: product_form_id, section_id: section.id, show_pickup_availability: true -%}
{% endunless %}
See below picture for better clarity.
This is fixed for Add to cart button.
Now, let’s move to quantity.
Search for " when ‘quantity_selector’ "
Paste below line after when ‘quantity_selector’
{% unless product.tags contains 'catalog' %}
Like this
Now find next " when " condition. I’ve " when ‘popup’ "
Now, paste {% endunless %} just before this " when ‘popup’ " as shown in above image.
That’s it. You did it.
Let me know if this solves you query.
Thanks
Sheesh B