Collection Page Label

ChrisW3
Explorer
147 0 22

On this URL: https://www.martinschocolatier.co.uk/collections/chocolate-ballotins

We have a message that says "MIX AND MATCH - 3 FOR 2", which is chosen based on the product having the tag "MIX & MATCH".

 

We would like the same on this page: https://www.martinschocolatier.co.uk/collections/stocking-fillers

so the label says  "3 FOR 2 STOCKING FILLERS".

 

Code is below, not sure why its not working

 

 

 

{% if product.available  %}
    {% for t in product.tags %}
          {% if t contains 'MIX & MATCH' %}
     <li class="tt"><a class="mix-cat" href="https://martins-chocolatier.myshopify.com/collections/mix-and-match">MIX & MATCH - 3 FOR 2</a></li>
          {% endif %}
          {% endfor %}
    {% endif %}
 
{% unless product.available  %}
<li class="stock">SOLD OUT</li>
            {% endunless %}
{% if product.available  %}
    {% for t in product.tags %}
          {% if t contains 'StockingFillers' %}
     <li class="tt-stocking"><a class="https://www.martinschocolatier.co.uk/collections/stocking-fillers">3 FOR 2 STOCKING FILLERS</a></li>
          {% endif %}
          {% endfor %}
    {% endif %}   
li.tt-stocking {
top: 24px !important;
position: relative;
left: 10px;
margin-bottom: -21px;
width: 155px;
background-color: #ff0000;
padding: 2px 4px 3px 7px;
color: #fff;
font-size: 13px;
}

 

 

 

Replies 11 (11)
ecomheroes_dev
Excursionist
26 1 1

Did you add the tag properly to the products?
"StockingFillers"

Please send the screenshot for whole file

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development
ecomheroes_dev
Excursionist
26 1 1

Please add this CSS in the custom.css file
https://prnt.sc/HgGoO817L7Pi

li.tt-stocking {
    margin: 22px 0 0 0;
    background: #000;
    display: inline-block;
    padding: 4px 10px;
}

 

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development
ChrisW3
Explorer
147 0 22

added that and still not working

ecomheroes_dev
Excursionist
26 1 1

can we send you the store collaborator access?

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development
ChrisW3
Explorer
147 0 22

yes please

ecomheroes_dev
Excursionist
26 1 1

Please accept the request

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development
ChrisW3
Explorer
147 0 22

done

ecomheroes_dev
Excursionist
26 1 1

fixed now your custom.css is not working properly. please accept the solution

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development
ChrisW3
Explorer
147 0 22

what isnt working - where did you add it?

ecomheroes_dev
Excursionist
26 1 1

it's perfectly working, i have added the CSS in theme.liquid file

https://prnt.sc/caLZd_0P9Dlr
Stocking Fillers – Martins Chocolatier

Ecomheroes Infotech PVT LTD
Shopify experts
info@ecomheroes.dev
https://ecomheroes.dev
Christmas offer 15 minutes free Shopify development