Lucif Posted October 24, 2012 Share Posted October 24, 2012 (edited) 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 October 24, 2012 by Lucif (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 24, 2012 Share Posted October 24, 2012 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 More sharing options...
Lucif Posted October 24, 2012 Author Share Posted October 24, 2012 Thankyou! When my other problem is solved: http://www.prestashop.com/forums/topic/196881-show-always-the-out-of-stock-button-and-more/ Then i gonna try out! The on stock button is good now, green. I hope the out of stock button is red, when they shows up. Link to comment Share on other sites More sharing options...
Lucif Posted October 24, 2012 Author Share Posted October 24, 2012 SOLVED! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now