make the 'add to cart button' disappear if the price is 0

make the 'add to cart button' disappear if the price is 0

iesilajoaca
Tourist
4 0 1

Hello,

 

How can I make the 'add to cart button' disappear if the price is 0? Is there a set formula? I am aware of where I need to input it.

 

Many thanks.

 

 

Kind regards,

Iulia

Reply 1 (1)

BSS-Commerce
Shopify Partner
3477 464 552

Hi @iesilajoaca 

 

In this situation, find the file where rendering the "add to cart" button, it can be "main-product.liquid, product-template. liquid, price.liquid, featured-product.liquid,..."

 

If in these files already defined variables "product" (can check if this variable is used, like: "product.id, product.title,..."), you can set a condition like this

 

view (99).png

 

In this condition, we can set all types of prices like maximum price, minimum price, and compare at price,.... The block that rendering the "add to cart" button will be put in this condition (price != 0) so the "add to cart" block can't render if the price of this product is 0.

 

I hope that you find my answer useful.

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency