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;
}
added that and still not working
can we send you the store collaborator access?
yes please
Please accept the request
done
fixed now your custom.css is not working properly. please accept the solution
what isnt working - where did you add it?
it's perfectly working, i have added the CSS in theme.liquid file
https://prnt.sc/caLZd_0P9Dlr
Stocking Fillers – Martins Chocolatier
User | RANK |
---|---|
64 | |
58 | |
48 | |
42 | |
41 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023