Jump to content

"Available quantities" code change question


Recommended Posts

Hi. There in back office is function "display remaining quantites when the qty is lower than". In front office then shows "last quantities in stock" message. I would like to change it to display the available quantities remaining instead of that message. The products I am selling are in hundreds and it is hard a customer to buy the last 37 product for example. It all happens after long guessing on availability. And I don't want to show all my availability, just when it is below 50 for example. Another thing maybe important to mention that most of my products have attributes. I am using Prestashop 1.5.6.1 version. Please tell me which code I should change to achieve that. Thanks in advance for you help.

Link to comment
Share on other sites

  • 4 weeks later...

I got it. Just added the $product->quantity variable in the end of below line in the product.tpl

 

<p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}&nbsp{$product->quantity}&nbsp{l s='pcs'}</p>

Link to comment
Share on other sites

Hi. It is me again :)

What if product has attributes? It now shows the quantity of all the products. For example if product has three different colors and different quantities from every color, it shows the sum of all. Is it too hard to change the code to show the quantities of the product with selected attribute?

Link to comment
Share on other sites

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