noesac Posted October 6, 2012 Share Posted October 6, 2012 When I get a new order I would like the notification email (new_order.html) to display not just the qty ordered by the customer, but how much is left in stock. Is this possible? Link to comment Share on other sites More sharing options...
noesac Posted October 6, 2012 Author Share Posted October 6, 2012 Figured it out. In mailalerts.php replace line 113 (in v1.3.1) replace: <td style="padding:0.6em 0.4em; text-align:center;">'.intval($product['cart_quantity']).'</td> With: <td style="padding:0.6em 0.4em; text-align:center;">'.intval($product['cart_quantity']).' ('.intval($product['quantity_attribute'] - 1).' left)</td> Link to comment Share on other sites More sharing options...
jkousholt Posted November 24, 2013 Share Posted November 24, 2013 (edited) Can anyone confirm that this works on ver. 1.5.4.1 ? I have tried but every linie adds a (-1 left) no matter how many I have on stock. Edited November 24, 2013 by jkousholt (see edit history) Link to comment Share on other sites More sharing options...
jkousholt Posted November 26, 2013 Share Posted November 26, 2013 Can anybody help? Best regards Link to comment Share on other sites More sharing options...
noesac Posted November 26, 2013 Author Share Posted November 26, 2013 I provided the "solution" above, but I need to clarify 2 things: 1) It was for a very old version of PS (1.3), but that area hasn't changed much so it might still apply, however; 2) It never worked to begin with. It didn't work properly when you had combinations. My solution was crap, I'm not exactly the best coder:) Link to comment Share on other sites More sharing options...
jkousholt Posted November 28, 2013 Share Posted November 28, 2013 Thanks for replying. Too bad it didn't worked as planned for you. I hope someone can help with a solution. Have a nice day Link to comment Share on other sites More sharing options...
jkousholt Posted January 1, 2014 Share Posted January 1, 2014 (edited) Happy new year all Prestashoppers! Will this work? '.(int)$product['product_quantity']. ('.intval($product['quantity_attribute'] - '.(int)$product['product_quantity']).') Edited January 1, 2014 by jkousholt (see edit history) 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