Add a message to product in cart when it is in a specific collection

Hello,

I’m trying to add a message on items in my store cart page if they are a part of the “Liquidation” collection. Basically I want the words “FINAL SALE” to appear if any of those products are added to cart.

Here is the code I was currently trying out (no luck though, so I’m guessing I’m missing something?):

{% for c in cart.items %}
{% if c.handle == "liquidation" %}
VENTE FINALE                
{% endif %}
{%endfor %}

In the code you are using a small L whereas you have mentioned in the brief above that the name ‘Liquidation’ has a capital L. Have you tried fixing this?

Hi there :blush:

I changed it to a capital “L” but there’s still no message appearing

Here’s the code I’m using now:

{% for c in cart.items %}
{% if c.handle == "Liquidation" %}
VENTE FINALE
{% endif %}
{% endfor %}

This worked for me

{% for c in item.product.collections %}
{% if c.handle == "special-offers" %}
<div>Special Offers are blah blah...</div> 
{% endif %}
{% endfor %}