Hide price on $0 products on a collection page

Hey! I was wondering if anyone knows if there is any way to hide the price from $0 products on a product collection page?

1 Like

Hello, @ashleymarcelino

Welcome to the Shopify community!
and Thanks for your Good question.

Please share your site URL,
So I will check and provide a solution here.

http://safedesign.myshopify.com/

password is: shophere

Ideally, for products with a price I would like to be able to see it on the collection page!

Thanks!

@ashleymarcelino

Thanks for URL

sorry, but i can see 0 prices.

Hi @ashleymarcelino ,

You can do it from admin. Here are the following steps Login into your shopify store account. Then click on all products. Then search the product which has zero price and edit that product. There is a option on the right hand side “Product availability”. Click on manage and untick “Online Store” Then click on done and save.

@KetanKumar I hid all of the prices in order to show my client but I was hoping theres a way just to hide the price of specific products

@Pankaj_Gupta When I try this, it hides the product completely from the website. I would still like for the product to be visible on the site where if they would like to buy they would be redirected to a salesman.

You’ll have to find where the price occurs in the collection page and make a condition for it:

{% if product.price > 0 %}
  {{ product.price }}
{% endif %}

It may not just be the product objects price property, it may be an included snippet. But the above logic says that if the product price is greater than 0, show it, otherwise do not.

1 Like