Shopify themes, liquid, logos, and UX
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!
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!
Thanks for offering to help! I’ve decided to leave the prices visible and match them to the retailer’s pricing. Appreciate your time!
Hi @gregorieg,
Please go to '...' > Edit code > snippets > card-product.liquid file. Please send me all code, I will check and guide you
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.
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.
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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025