Hide compare price on specific collection pages

Hello,

Our collection pages are showing the compare prices of all products for all collections, but I want to hide the compare prices for specific collections with products that have a quantity variant selector on the collection page. For this products, it is showing the highest quantity compare price for the lowest quantity variant. I really want to hide the entire compare price on this collections pages with quantity selectors, to prevent confusion.

Is this possible with a simple CSS code for specific collection ID’s or handles?

Something like this with an added specification:

.product-item .price–compare {

visibility: hidden;

Thanks in advance!

1 Like

@golfballenneder

oh sorry for that issue can you please share store url

Sorry, forgot to add the store URL: https://golf-square.com/collections/gebruikte-golfballen

All “golfballen” collections have quantity selectors on collection pages. I only want to hide the compare price on those collection pages.

1 Like

@golfballenneder

thanks please add this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/theme.liquid->paste below code at the before .

1 Like

Thanks, this worked! Is it also possible to apply this code for multiple collections at once? Or do I have to add this code for the collections individually?

1 Like

@golfballenneder

how many collection do you need hide this price please send list

@KetanKumar This collections:

gebruikte-golfballen

bridgestone-golfballen

callaway-golfballen

mizuno-golfballen

nike-golfballen

pinnacle-golfballen

range-golfballen

srixon-golfballen

taylormade-golfballen

titleist-golfballen

topflite-golfballen

vice-golfballen

volvik-golfballen

wilson-golfballen

diversen-gebruikte-golfballen

a-merken-golfballenmix

a-b-merken-golfballenmix

b-merken-golfballenmix

callaway-golfballenmix

mizuno-golfballenmix

nike-golfballenmix

pinnacle-golfballenmix

titleist-golfballenmix

topflite-golfballenmix

wilson-golfballenmix

gekleurde-golfballenmix

bridgestone-gekleurde-golfballen

callaway-gekleurde-golfballen

pinnacle-gekleurde-golfballen

srixon-gekleurde-golfballen

taylormade-gekleurde-golfballen

titleist-gekleurde-golfballen

topflite-gekleurde-golfballen

volvik-golfballen

wilson-gekleurde-golfballen

bridgestone-cross-golfballenmix

callaway-cross-golfballenmix

nike-goedkope-golfballen

pinnacle-goedkope-golfballen

srixon-goedkope-golfballen

taylormade-goedkope-golfballen

titleist-goedkope-golfballen

topflite-goedkope-golfballen

wilson-goedkope-golfballenmix

diversen-goedkope-golfballen

@golfballenneder

oh that was too mush list but you have use same code just change collection handle in code that’s it

1 Like

@KetanKumar I have one more question, the change has been implemented for all the collections I wanted. But when searching for a product, on the search result page, all the compare prices are shown. How can I hide the compare prices at the search result page? https://golf-square.com/search?type=product&options%5Bprefix%5D=last&options%5Bunavailable_products%5D=last&q=bridgestone

1 Like

@golfballenneder

oh sorry but if i give you code all compare prices hide we don’t identify special collection at search page is this fine?