applecart_girl Posted May 27, 2012 Share Posted May 27, 2012 Hi All, When customers are browsing products in each category of my shop, I'd like to be able to automatically show that a product is out of stock, without the customer having to go into each product individually, by either: - showing text 'more soon' under products when viewing by category OR - add an 'out of stock' label, banner or overlay to a product image when viewing by category OR - by adding a 'more coming soon!' tag like the 'new' tag currently available, but position it underneath the product title or price This is a feature already found on alot of other sites, so wondering if anyone has been able to recreate successfully for their Prestashop site ??? Thanks for any help!! :-) Link to comment Share on other sites More sharing options...
jhnstcks Posted May 27, 2012 Share Posted May 27, 2012 You could try adding something like {if $product.quantity > 0}{else}{l s='Out of stock'}{/if} in your product-list.tpl file. Don't forget to force compile and turn off cache. 3 Link to comment Share on other sites More sharing options...
applecart_girl Posted May 27, 2012 Author Share Posted May 27, 2012 jhnstcks .... if you no idea how many hours I've spent searching looking for an answer to this!! So simple!! Thanks so much!! One last thing ... I have 'more soon!' now appearing where I want it, but how to I change to italic font and colour of font?? Thanks again! :-) 1 Link to comment Share on other sites More sharing options...
jhnstcks Posted May 28, 2012 Share Posted May 28, 2012 Just need to add some styling html to the code, so something like <p style="color:#FFFFFF; font-style:italic;">{if $product.quantity > 0}{else}{l s='Out of stock'}{/if}</p> 2 Link to comment Share on other sites More sharing options...
applecart_girl Posted May 28, 2012 Author Share Posted May 28, 2012 Thank you!! Brilliant :-) Link to comment Share on other sites More sharing options...
radoz Posted July 31, 2012 Share Posted July 31, 2012 Actually i try it but not function i need this function so is this code require any addition declaration in order to work I put it in the product-list.tpl which is located in the theme folder but did not appear on out of stock product page try please to clarify many thanks Link to comment Share on other sites More sharing options...
jhnstcks Posted July 31, 2012 Share Posted July 31, 2012 Actually i try it but not function i need this function so is this code require any addition declaration in order to work I put it in the product-list.tpl which is located in the theme folder but did not appear on out of stock product page try please to clarify many thanks Did you turn on force compile and turn off cache on preferences>performance tab? Link to comment Share on other sites More sharing options...
Bejo Posted June 26, 2013 Share Posted June 26, 2013 thx for sharing~ i have problem i'm ps 1.5.4.1 default template ps, i'm already disable display product in stock on preference and product menu, but when i was trying use search at FO, di product display with info Product in stock, i need disable that info " in stock " how disable category products list -> in stock info thx you Link to comment Share on other sites More sharing options...
saintofinternet Posted December 19, 2015 Share Posted December 19, 2015 You could try adding something like {if $product.quantity > 0}{else}{l s='Out of stock'}{/if} in your product-list.tpl file. Don't forget to force compile and turn off cache. i tried this but it still is not showing the label on the item photo. help please!!! Link to comment Share on other sites More sharing options...
vekia Posted August 20, 2016 Share Posted August 20, 2016 for what ps version? Link to comment Share on other sites More sharing options...
kunal Turankar Posted January 19, 2019 Share Posted January 19, 2019 On 8/21/2016 at 5:20 AM, vekia said: for what ps version? 1.7.4v Link to comment Share on other sites More sharing options...
ahmadsab Posted November 1, 2019 Share Posted November 1, 2019 On 5/28/2012 at 9:27 AM, jhnstcks said: Just need to add some styling html to the code, so something like <p style="color:#FFFFFF; font-style:italic;">{if $product.quantity > 0}{else}{l s='Out of stock'}{/if}</p> where should i add this please 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