All things Shopify and commerce
Hi! I want to use product tags to display custom messages on 'Collection pages under the products on Spotlight theme. I have already done this on Product page but am struggling to add the same message to the collection pages. Please help
Hi @mzwa
Dan here from Ryviu: Product Reviews @& QA app.
You can use this code in your card-product.liquid file
{% if card_product.tags contains 'your tag' %}
your message
{% endif %}
- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Unfortunately no changes with the code you gave. I used the following code on the main-product.liquid for the message on the product page which worked successfully.
{% for tag in product.tags %}
{% if tag contains 'newMessage:' %}
<span class="message-card_product">
{{ tag | remove:'newMessage:'}}
</span>
{% endif %}
{% endfor %}
When I put this in the card-product.liquid file I don't see the message it in the collection page. I do see a message in the product page on the related products (the same message displayed under the product page on that particular product page ). This message under the related products doesn't apply to that particular product. Please help
You can try to edit this
{% for tag in card_product.tags %}
{% if tag contains 'newMessage:' %}
<span class="message-card_product">
{{ tag | remove:'newMessage:'}}
</span>
{% endif %}
{% endfor %}
- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025