Hide price from featured collection, featured product, and product grid for a specific collection

This is for Dawn theme 5.0

I two types of products in my shop, some custom and some ready-to-wear.

I wanted to hide the price for the custom collection/products when it is in featured collection, product grid and featured product. I want to replace the price with the following “CONTACT FOR PRICING”

I was able to create two product pages - one for custom and one for ready-to-wear and it worked on that.

But the price is showing as $0.00 on the home page when I use featured collection and on the collection page showing all the products. I want that $0.00 to read as “CONTACT FOR PRICING”

Let me know if you can help.

My website is www.mariamsuri.com

Hi @mariamsuri3

Please follow these steps:

  1. Check the ID of these collections/products that you want to hide the price. The easiest way is to check on your admin store. (the URL path displayed in the browser). In this post, I will do everything with the collection ID.

  2. Go to Online store => Theme => Edit code, then search and go to file “featured-collection.liquid” which displays the collection on the Home page.

  • Search line that contains code:
render 'card-product'

Add this code:

collection_id: section.settings.collection.id,

Please refer to the image below

  1. Go to “card-product.liquid” and find the line that contains the code
render 'price'

The result is shown below:

Add code “collection_id: collection_id” to this line:

  1. Go to file “price.liquid”. Search the line

![view - 2022-12-09T140153.018.png|970x610](upload://flgZf29YdDFD2jhUkarXzm7KsiU.png)

Then you add the liquid code above to this line:

```markup
{% if collection_id == 

and add this to the end of the file:

```markup
{%- endif -%}

For example, hide the price for all products of the collection with id = 289352974533

and the end of the file:

  1. Go to file " main-collection-product-grid.liquid" and search line contains the code:
- ```

![view - 2022-12-09T140442.588.png|848x567](upload://xVt7XXTbG6HLRFZ2a7dzhLteIGA.png)

Add this code:

```markup
collection_id: collection.id,

Save your work and check the result.

Home page:

Collection Page:

I hope that it will work for you.