Post by erendemirpolat » Tue Apr 27, 2021 11:51 pm

stock status: 2 I want to make the place that says 2 red how can I do please help
https://prnt.sc/125hm14


Posts

Joined
Mon Feb 10, 2020 8:26 am

Post by rjcalifornia » Wed Apr 28, 2021 4:11 am

erendemirpolat wrote:
Tue Apr 27, 2021 11:51 pm
stock status: 2 I want to make the place that says 2 red how can I do please help
https://prnt.sc/125hm14
Open the product.twig page:

catalog/view/template/product/product.twig

Around line 129, you will find the stock field. Customize it according to your needs:

Example

Code: Select all

 <li>{{ text_stock }} <span style="color:blue">{{ stock }}</span></li>

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by erendemirpolat » Wed Apr 28, 2021 1:51 pm

rjcalifornia wrote:
Wed Apr 28, 2021 4:11 am
erendemirpolat wrote:
Tue Apr 27, 2021 11:51 pm
stock status: 2 I want to make the place that says 2 red how can I do please help
https://prnt.sc/125hm14
Open the product.twig page:

catalog/view/template/product/product.twig

Around line 129, you will find the stock field. Customize it according to your needs:

Example

Code: Select all

 <li>{{ text_stock }} <span style="color:blue">{{ stock }}</span></li>
nothing has changed :(


Posts

Joined
Mon Feb 10, 2020 8:26 am

Post by paulfeakins » Wed Apr 28, 2021 4:48 pm

erendemirpolat wrote:
Wed Apr 28, 2021 1:51 pm
rjcalifornia wrote:
Wed Apr 28, 2021 4:11 am
nothing has changed :(
You might be better off searching for an extension. If you can't find an extension, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by rjcalifornia » Wed Apr 28, 2021 10:30 pm

erendemirpolat wrote:
Wed Apr 28, 2021 1:51 pm
rjcalifornia wrote:
Wed Apr 28, 2021 4:11 am
erendemirpolat wrote:
Tue Apr 27, 2021 11:51 pm
stock status: 2 I want to make the place that says 2 red how can I do please help
https://prnt.sc/125hm14
Open the product.twig page:

catalog/view/template/product/product.twig

Around line 129, you will find the stock field. Customize it according to your needs:

Example

Code: Select all

 <li>{{ text_stock }} <span style="color:blue">{{ stock }}</span></li>
nothing has changed :(
Did you disable or cleared the cache? That was just a quick-and-dirt example. You should create a class and apply your custom css to that class, instead of inline css. For instance if you want to force a color, just put the important tag. However this is just for demonstration.

Code: Select all

 <li>{{ text_stock }} <span style="color:blue !important;">{{ stock }}</span></li>
[/quote]

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by by mona » Thu Apr 29, 2021 1:55 am

I am not sure that is correct - that code is for "In Stock" and "Out of Stock" logic
viewtopic.php?t=219686

I believe the OP is talking about actual stock levels - no-one can help without posting more information.
Your modified or theme product.twig is required.

In theory this is out of the scope of free support and the logic of how to do it has already been provided. You should be able to look at your code and work it out. However if not it is a very easy thing to do, maybe request commercial support or provide comprehensive details

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


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 27 guests