I was able to change the colour of 'in stock' text, but how do I change the colour of 'out of stock'?
what specifically is not working for the principle applied found and your version?
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
catalog/view/theme/default/template/product/product.twig
Code: Select all
<li>{{ text_stock }} {% if stock == "In Stock" %}<span style="color:blue">{% else %}<span style="color:red">{% endif %}{{ stock }}</span></li>
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Default theme
Hi,
i have used this solution and it works fine but it is "In Stock" and works only for english. my site is multilingual. I can change "In Stock" in other language and then it is works for this language only. Does anyone have a universal solution? For out of stock which is not defined by the word it works obviously in all languages.
thanks
Code: Select all
<li>{{ text_stock }} {% (if stock == "In Stock" or if stock == "whatever") %}<span style="color:blue">{% else %}<span style="color:red">{% endif %}{{ stock }}</span></li>
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Users browsing this forum: Semrush [Bot] and 341 guests