Hide price for specific items in given category

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 8 (8)

topnewyork
Astronaut
1130 151 189

Share url 

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
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
Astronaut
1130 151 189

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

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
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!

BucarestArt
New Member
5 0 0

Hi!
I've been looking for the same solution for a long time. 
Could you please share the code you added, and where you added it!?
Thanks so much in advance.