Need help hiding product prices on collection pages (for digital products only)

Need help hiding product prices on collection pages (for digital products only)

gregorieg
Tourist
4 0 2

Hi everyone,

I'm looking for help with a small code edit. I want to **hide product prices on collection pages**, but only for certain product types—like digital or affiliate products.

I’m using a Shopify 2.0 theme with JSON templates, and I’ve tagged these products “affiliate.” I think it just needs a conditional `{% if %}` Liquid snippet.

Would anyone be willing to point me to the code or show me how to adjust the product card section?

Thanks in advance!

$0.00.JPG

 

Replies 6 (6)

TheScriptFlow
Shopify Partner
737 52 98

Hi @gregorieg,

Could you please share your Store URL and password (if applicable) so that I can review it and provide you with the appropriate solution code?

Looking forward to your response.

Thanks!

- Need a Shopify Specialist? Chat on WhatsApp+447828078063 Or Email at info@thescriptflow.com

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


- If my solution was helpful, mark it as a solution and hit the like button! And Wait Don't forget to Buy me a Coffee

gregorieg
Tourist
4 0 2

Thanks for offering to help! I’ve decided to leave the prices visible and match them to the retailer’s pricing. Appreciate your time!

namphan
Shopify Partner
2690 349 397

Hi @gregorieg,

Please go to '...' > Edit code > snippets > card-product.liquid file. Please send me all code, I will check and guide you

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com
gregorieg
Tourist
4 0 2

Thank you for offering to help! After working through a few options, I’ve decided to keep the prices visible and populate them with the retailer’s listed price instead.

Dan-From-Ryviu
Shopify Partner
11754 2305 2488

Hi @gregorieg 

Please go to your store admin > Sales Channels > Online Store > Themes > click "..." in the current theme > Edit code > open card-product.liquid and find the following line of code.

{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}

Replace it with this code and save file

{% unless card_product.tags contains 'affiliate' %}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{% endunless %}

 

- Helpful? Like & Accept solution! - Support me: Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

gregorieg
Tourist
4 0 2

Thanks for your response! I tried a few different code adjustments (including this one), but the issue still persisted. I’ve decided to keep the price visible and populate it with the vendor’s retail price instead.