All things Shopify and commerce
I'm currently running a specific promotion on certain products, and to highlight this, I'm adding a small badge on the bottom left of the product image on collection pages.
I'm currently running the following code:
{% if collection.title contains 'Multibuy' %}
<span class="card__badge bottom left" style="background-color:#a7c5e5;">MULTIBUY</span>
{% endif %}
But I want to replicate this onto other collections that contain products that have the tag "Multibuy", I tried to use the following code but it doesn't work:
{% if product.tags contains 'Multibuy' %}
<span class="card__badge bottom left" style="background-color:#a7c5e5;">MULTIBUY</span>
{% endif %}
Would appreciate any help with this as I'm unsure what else to do to get working.
Not sure if you are already aware of it, but just throwing it out there as it's not very obvious.
Depending on the theme you are using, sometimes the variables in your product-card.liquid file may refer to the product in a different way than "product". So check for that specifically. I have seen different variations, in the two themes I'm using for my stores, it's "product_card_product" and "prod". So in my case, it would say {% if product_card_product.tags contains 'Multibuy' %}
Hi @ewancastle
What theme your store is using?
- Found this helpful? Hit "Like" and "Accept as Solution"! - Feeling generous. ☕ 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 - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi, I'm using Dawn theme.
I've placed this code in card-product.liquid
Hi @ewancastle
Let me know if you need my assistance.
Hi @ewancastle
As this might need multiple file updates, is it possible for you to provide collaborator access? I can do it for you.
Any further queries or concerns you can DM me.
You can consider using third-party apps like Product Badges & Labels, which will assist you in creating product labels with specific collections and tags.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025