Remove Quick Add To Cart from Specific Products only DAWN

Hi,

I am able to remove ADD TO CART Buttons from a product page by using a specific page template, but how can I not show the quick add to cart buttons on specific products only?

For example, this is a product with no add to cart button: https://unclejonsmusic.com/products/school-band-trombone-rental

But when browsing collections you can still see the quick add to cart button. I found you can remove ALL the quick add to cart buttons but I would prefer to only remove them from these specific (rental) items.

THANKS

Hi @unclejonsmusic ,

Please refer to the following instructions.

You can add condition using ‘template_suffix’, it will work fine

@unclejonsmusic you can edit the code to check for your specific condition where you want to hide the button, so like if the product is out of stock, etc with liquid to add class into the button to hide it or just not display the quick add button with if else conditions with liquid.

You can do this inside custom-product.liquid file

Hi @unclejonsmusic :waving_hand: roughly in snippets/card-product.liquid override the quick_add boolean with some logic using the template_suffix , or even product tags etc etc etc

https://github.com/Shopify/dawn/blob/main/snippets/card-product.liquid#L23

https://shopify.dev/docs/api/liquid/objects#product-template_suffix

i.e.

{% liquid
   if card_product.template_suffix == 'templatename'
      assign quick_add = false
   endif
%}