MathiasReker Posted January 1, 2016 Share Posted January 1, 2016 Hello, I would like to displayed text ("in stock") when in-stock on products page for each product. I know I can add it manually for each product, but I would like to hard code it, since I need it for every product. I think the edit should be done in /themes/warehouse/product.tpl, but I am not sure what to change. Can anyone help me please? :-) Thank you, and happy new year! I am using Prestashop 1.6.1 Best regards Mathias Link to comment Share on other sites More sharing options...
vekia Posted January 1, 2016 Share Posted January 1, 2016 you can use: {if $product->quantity > 0} {l s='In stock'} {/if} Link to comment Share on other sites More sharing options...
MathiasReker Posted January 1, 2016 Author Share Posted January 1, 2016 Where should I place this? Link to comment Share on other sites More sharing options...
vekia Posted January 1, 2016 Share Posted January 1, 2016 as you already mentioned - in product.tpl file where exactly? everything depends on where you want to display it :-) Link to comment Share on other sites More sharing options...
MathiasReker Posted January 2, 2016 Author Share Posted January 2, 2016 Thank you alot. It worked! I end up with this: <span id="availability_value" class="label label-success">{if $product->quantity > 0}{l s='In stock'}{/if}</span> 1 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