Jump to content

[SOLVED] On stock color


Recommended Posts

Hello,

 

In the standard theme of the last version are the avaibility buttons both red.

But i want that the on stock button is green, and the other is red.

 

So, i changed the product.css to this:

#availability_statut span#availability_value {
display:inline-block;
padding:1px 5px;
font-size:10px;
color:#fff;
text-transform:uppercase;
background:green
}

#availability_statut span#availability_value_out {
display:inline-block;
padding:1px 5px;
font-size:10px;
color:#fff;
text-transform:uppercase;
background:red
}

 

But, how to do it in product.tpl?

This is product.tpl:

		   	 <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
			{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}
			</span>

 

I have tried so many things, but nothing works.

Both green, both red, red and green, all posibilities, except the right one :)

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

Hello,

 

In the standard theme of the last version are the avaibility buttons both red.

But i want that the on stock button is green, and the other is red.

 

So, i changed the product.css to this:

#availability_statut span#availability_value {
display:inline-block;
padding:1px 5px;
font-size:10px;
color:#fff;
text-transform:uppercase;
background:green
}

#availability_statut span#availability_value_out {
display:inline-block;
padding:1px 5px;
font-size:10px;
color:#fff;
text-transform:uppercase;
background:red
}

 

But, how to do it in product.tpl?

This is product.tpl:

		   	 <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
			{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}
			</span>

 

I have tried so many things, but nothing works.

Both green, both red, red and green, all posibilities, except the right one :)

 

you can always try to change it in tpl file like:

 

<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if} style="background:green;">
{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}
</span>

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...