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.
Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos
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.
Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos
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.
Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos
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.
Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos
Users browsing this forum: No registered users and 4 guests