How to hide specific products' price on a collection for different themes?

How to hide specific products' price on a collection for different themes?

jam_chan
Shopify Partner
920 23 188

I don't want to show the price for specific products on a collection. The product has a special vendor and product type set by my app. 

 

How can I do so? I know it can be done with liquid. Just add a filter in liquid to exclude them. But I don't want to manually handle the task for each store and each theme. Also, these special products may appear on the home page or search result page. 

 

Can I use script tag or theme app extension to do so?

 

 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
Replies 3 (3)

NileshTejani
Shopify Partner
203 12 43

For hiding product price specif product you need to add a tag on product page hide_price and then do liquid code where is price HTML see liquid code below if it help then live my post and approve my soluation

Thanks 

{% unless product.tags contains "price_hide" %}
 <div class="price">{{product.price | money }}</div>
{% endunless %}

 

- Did we solve your issue? Like & Mark As Solution to help the community

Should you need any direct help:
Get connected: Upwork | Help Center
jam_chan
Shopify Partner
920 23 188

@NileshTejani 

 

I have been doing this for 30 - 50 times. I am looking for a generic approach

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
NileshTejani
Shopify Partner
203 12 43

@jam_chan This is the only solution to do this you must make one condition to do this or make custom apps that can render price element and hide price 

- Did we solve your issue? Like & Mark As Solution to help the community

Should you need any direct help:
Get connected: Upwork | Help Center