Shopify themes, liquid, logos, and UX
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;
}
Did you add the tag properly to the products?
"StockingFillers"
Please send the screenshot for whole file
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;
}
can we send you the store collaborator access?
Please accept the request
fixed now your custom.css is not working properly. please accept the solution
it's perfectly working, i have added the CSS in theme.liquid file
https://prnt.sc/caLZd_0P9Dlr
Stocking Fillers – Martins Chocolatier
User | RANK |
---|---|
235 | |
160 | |
60 | |
55 | |
47 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023