Jump to content

Change the color of In Stock block


Recommended Posts

Hi

 

I'm hoping someone can help. I have changed every aspect of my shop's theme but I can not find the place where I can change the color of the "In Stock" block's background.

 

Does anybody know where this is done?

 

I just want it to be red, not green

Edited by Zakkatoom (see edit history)
Link to comment
Share on other sites

Hi

 

I'm hoping someone can help. I have changed every aspect of my shop's theme but I can not find the place where I can change the color of the "In Stock" block's background.

 

Does anybody know where this is done?

 

I just want it to be red, not green

 

 

 

Has no-one ever needed to, or wanted to do this? Is it possible?

Link to comment
Share on other sites

It seems that "in stock" color is set by .label-success Class defined in global.css.

There are two ways what can you do

1) Change colors in label-success class (not recommended)

2) Change class assigned to the "in stock" (hard way)

 

You need to open files [your_shop]/themes/[your_theme]/product.tpl and [your_shop]/themes/[your_theme]/product_list.tpl

and find similar code:

<span id="availability_value" class="label{if $product->quantity <= 0 && !$allow_oosp} label-danger{elseif $product->quantity <= 0} label-warning{else} label-success{/if}">{if $product->quantity <= 0}{if $PS_STOCK_MANAGEMENT && $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{elseif $PS_STOCK_MANAGEMENT}{$product->available_now}{/if}</span>

change label-success to other class that has the color you want.

Link to comment
Share on other sites

Simonas!!! You ROCK!!! Three days! Three days I've been searching and I thought it could have been the .label section, but for some reason I just never bothered trying it out.

 

It works like a charm, and my problem is solved!

 

Thank you thank you thank you!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...