Hide or Disable 'Add to Cart' and 'Buy Now' Buttons for some products only

Problem:

I want to disable ‘Add to Cart’ and ‘Buy Now’ Buttons for my products on all pages of my storefront while I want to keep these buttons for same products on a different page.

Right now when I hide these buttons on one page, they get hidden across all pages of the website.

Background:

We are a bespoke Packaging Solutions business where we talk to the customer before confirming their custom order. We do not want to allow our customer the ability to add anything into the cart and checkout before getting in contact with us and discussing their requirements for which we will be providing a fully customised solution.

So we want two separate lists of the products where both lists have the same products, but one list is visible to the customer but without the option to ‘add to cart’ or self checkout, while the other list will have the option to add to cart and self checkout which we can allow the customer to get to separately after they have spoken to us and are ready to place their custom order.

Hi,

Can you share your store url

Hi @Haider8

If you are using 2.0 Shopify OS theme then you can create a new product template for those product and disable Buy buttons block from that template.

You can check this article to learn how to create a new template and then assign products to template

https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates

Hey @Haider8

Can you send me the link of the page from where you want to hide the Add to Cart and Buy Now button?

Best Regards,

Moeed

Hi @Haider8 ,

It’s quite interesting :slightly_smiling_face:

Well, you can achieved this if you have a basic understanding of Liquid code.

  1. In your Shopify admin, create two collections: one for products that you want to show without the “Add to Cart” and “Buy Now” buttons (let’s call this “NoCheckout”), and another for products that you want to sell with those buttons (let’s call this “CheckoutEnabled”).

2.Add the same products to both collections. This way, you’ll have the same products in both lists.

  1. The most important and a bit tricky step :slightly_smiling_face:

You’ll need to modify the liquid templates of your theme to conditionally hide the “Add to Cart” and “Buy Now” buttons based on the collection the product belongs to.

Here’s an example of how you can do this in your product template (product.liquid):

{% if product.collections contains ‘NoCheckout’ %}

.product-form { display: none; }

{% endif %}

Here is the logic, try this. Hope you will be able to resolve this without using any 3rd party app :slightly_smiling_face:

I am using the Dawn Theme for my store.

I have followed

steps 1 and 2 and have created two different collections with the same products.

However I can’t find the product.liquid template.

Note:
I’m not too familiar with coding languages and I have no idea which template in the theme code controls what function(s) and/or parts.

The picture shows the templates I am getting when I search for ‘product’.