RavenStar Posted May 26, 2010 Share Posted May 26, 2010 Hi there, hopefully there's a quick answer to this.I've searched through the back office for hours and can't seem to find what I'm looking for.Basically I want to either show "in stock" or "out of stock" instead of the quantity in stock.I took a look at "Display last quantities when qty is lower than" Under Tools, Products and set it to 0 however this made no difference at all.Is there some kind of option that I'm perhaps missing?Thanks a lot in advance~ Link to comment Share on other sites More sharing options...
rocky Posted May 26, 2010 Share Posted May 26, 2010 Edit each of your products and on the "1. Info." tab, enter "In Stock" under "Displayed text when in-stock" and "Out of Stock" under "Displayed text when allowed to be back-ordered". I think that should work. Link to comment Share on other sites More sharing options...
RavenStar Posted May 26, 2010 Author Share Posted May 26, 2010 Thanks for the response rocky,unfortunately I've already given that a try and it made no difference. Link to comment Share on other sites More sharing options...
rocky Posted May 26, 2010 Share Posted May 26, 2010 I guess you'll have to modify code then. Try changing lines 264-270 of product.tpl in your theme's directory from: <!-- availability --> quantity == 0 && !$product->available_later) OR ($product->quantity != 0 && !$product->available_now)} style="display:none;"{/if}> {l s='Availability:'} 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} to: <!-- availability --> {l s='Availability:'} quantity == 0} class="warning-inline"{/if}> {if $product->quantity == 0}{if $product->available_later}{$product->available_later}{else}{l s='Out of Stock'}{/if}{else}{if $product->available_now}{$product->available_now}{else}{l s='In Stock}{/if}{/if} This code should display whatever you enter in the fields I mentioned in my previous post and "Out of Stock" or "In Stock" if you leave those fields blank. Link to comment Share on other sites More sharing options...
archproject Posted June 4, 2010 Share Posted June 4, 2010 Hi there, Is there any updates to this thread ? Link to comment Share on other sites More sharing options...
rocky Posted June 4, 2010 Share Posted June 4, 2010 Does the code I provided not work? Link to comment Share on other sites More sharing options...
John Adams Posted June 4, 2010 Share Posted June 4, 2010 Oour screenshots from the original post #1 are not showing now, so folks are starting to suggest what you have already done. When you take a screenshot off your server, it disappears here too.Have you resolved the issue? If not, you might want to describe all the settings you have made related to this (instead of the screenshots), that way the thread will be more complete for folks to help you now, and for those in the future who encounter a similar problem. Link to comment Share on other sites More sharing options...
sannie Posted September 23, 2010 Share Posted September 23, 2010 hi rocky,i'm using the theme fennecs, the product.tpl looks different from your example (see excerpt below). can you please help me how i should modify the themes/fennecs/product.tpl? <!-- availability --> quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}> {l s='Availability:'} in the attachment you can find the complete product.tpl filethanks! Link to comment Share on other sites More sharing options...
rocky Posted September 24, 2010 Share Posted September 24, 2010 To make the availability status always visible, change: quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}> to: Link to comment Share on other sites More sharing options...
sannie Posted September 24, 2010 Share Posted September 24, 2010 hi rocky,thx for your quick reply. however, the number of items in stock are still visible. and when there are no items in stock, it displays only "availabilty" with an empty value. i just want to show either "in stock" or "out of stock" (like the original request of this post) and remove the "warning: last items in stock!"thx again for your help! Link to comment Share on other sites More sharing options...
rocky Posted September 24, 2010 Share Posted September 24, 2010 Try changing the code to: <!-- availability --> {l s='Availability:'} quantity == 0} class="warning-inline"{/if}> {if $product->quantity == 0}{if $product->available_later}{$product->available_later}{else}{l s='Out of Stock'}{/if}{else}{if $product->available_now}{$product->available_now}{else}{l s='In Stock}{/if}{/if} and go to Preferences > Products and change "Display last quantities when qty is lower than" to 0, then click Save at the bottom. Link to comment Share on other sites More sharing options...
sannie Posted September 24, 2010 Share Posted September 24, 2010 i've changed the code, but now the entire product page won't load. i've attached the modified products.tpl can you have a look what i've done wrong?current settings in Preferences-Products:Display available quantities on product page: noDisplay last quantities when qty is lower than: 0 Link to comment Share on other sites More sharing options...
sannie Posted September 24, 2010 Share Posted September 24, 2010 strange, i can't upload any attachments. i've the following with the products.tpl file:changed: <!-- availability --> quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}> {l s='Availability:'} to your suggestion. resulted in blank product page. Link to comment Share on other sites More sharing options...
kimsmarkin Posted September 25, 2010 Share Posted September 25, 2010 It is a simple way to see the actual inventory of your products in the middle of the "review" and "add to cart" button under your products. It also hides the "add to cart" when in products stock. Link to comment Share on other sites More sharing options...
dahls Posted July 28, 2013 Share Posted July 28, 2013 totaly messed up and only thing did was try change code, even after save it back to the original code, no content is displayed in the product page. this is total disaster. Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 totaly messed up and only thing did was try change code, even after save it back to the original code, no content is displayed in the product page. this is total disaster. hello, this is old topic (from 2010) things have changed since then - especially in 1.5 version so please open new thread with your issues or questions, don't continue discussion here because solution above is for OLD prestahop versions Link to comment Share on other sites More sharing options...
dahls Posted July 28, 2013 Share Posted July 28, 2013 hello, this is old topic (from 2010) things have changed since then - especially in 1.5 version so please open new thread with your issues or questions, don't continue discussion here because solution above is for OLD prestahop versions i am using PrestaShop™ 1.4.5.1 Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 and this tutorial is for 1.3.x Link to comment Share on other sites More sharing options...
dahls Posted July 28, 2013 Share Posted July 28, 2013 (edited) newer mind i delete prestashop not worth waste any more time on it. Edited July 28, 2013 by dahls (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 it's your only your opinion, end of topic, it's not worth waste any more time here 1 Link to comment Share on other sites More sharing options...
Recommended Posts