skip to Main Content

Hello Shopify Developers.

I’m a newbie on Shopify. I want to edit the product theme template to be able to remove the buy it now and add to cart button from some products.

Would you give me a suggestion to do that? please teach me.

Best regards, Siva.

2

Answers


  1. If I understood you well, you’d like to remove "Add to cart" button from some products?
    If that is the case, you could do this using some tags. Something like:

    {% if product.tags contains 'your-tag' %}
    
       {% comment %} Something here {% endcomment %}
    {% else %}
      {% comment %} Add to cart button {% endcomment %}
    {% endif %}
    
    Login or Signup to reply.
  2. add a tag called something like:

    hide–add-to-cart

    and find the add to cart button inside product.liquid and place it like:

    {% unless product.tags contains 'hide--add-to-cart' %}
        place here your add to cart button
    {% endif %}
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search