Jump to content

[Help] Changing Color For Availability


Recommended Posts

Hello,

i want to change the status color for the orderable product in product list.

At this time i have Available and Orderable products in green and out of stock producs in red.

 

I think that i need to change something here (product-list.tpl)  but i dont know what.... i see too many "if" for me  :huh:

<div class="availability">
	{if ($product.allow_oosp || $product.quantity > 0)}
		<span class="{if $product.quantity <= 0 && !$product.allow_oosp}out-of-stock{else}available-now{/if}">
			{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{l s='Ordinabile'}{else}{l s='In Stock'}{/if}{else}{l s='Non disponibile'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}
		</span>
	{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
		<span class="available-dif">
			{l s='Product available with different options'}
		</span>
	{else}
		<span class="out-of-stock">{l s='Non disponibile'}
	</span>
	{/if}
</div>

Thank you for helping

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

color change?  do it in css file!

search for classes like out-of-stock, available-dif, available-now

you can manage colors in that way

at this time products available and products available for order have the same class (avaiable-now) i need to differentiate them.

Link to comment
Share on other sites

  • 5 weeks later...

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