Hide price for specific items in given category

efenefe
Shopify Partner
7 0 1

Hello,
I have a pastry category that displays items. Some of them can be ordered online, so they display the price. Other cannot be ordered online, so they should not display the price. I have created a product template with a hidden price for those particular items. The problem is that the category template displays the price and not the product template. My question is, how may I hide the price for only certain products in the same category template. It can probably be achieve with css, but I am not sure how to target specific products.

 

In the screeshot, the price for the Lemon Meringue Tartelette should be hidden.

 

Screenshot 2024-03-07 at 9.38.12 AM.png

Replies 7 (7)

topnewyork
Trailblazer
247 26 35

Share url 

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
efenefe
Shopify Partner
7 0 1

https://patisserie-lasalle.myshopify.com/

pass : ilovecake

It's in the pastry section

efenefe
Shopify Partner
7 0 1

Hey Saeed,

Thank you for your reply.
I understand what to do, however, I do not seem to have any "Additional CSS classes" field under the "Advanced" section when editing a product so that I can add a class.

efenefe
Shopify Partner
7 0 1

Yes exactly!
And in which file should I add the code you provided?

efenefe
Shopify Partner
7 0 1

No worries Saeed, thank you so much for your precious time! Have a great one!

topnewyork
Trailblazer
247 26 35

go to main-collection-product-grid.liquid and just remove the product price code

Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
efenefe
Shopify Partner
7 0 1

Actually I fixed it by adding a tag to products that don't display the price and set that tag to hid price this way all other products are not affected.

thank you for the help!