Prestafan1234 Posted November 29, 2012 Share Posted November 29, 2012 (edited) Hi For a B2B site, I am looking for a way to print the database field "location" onto the delivery slip (PDF-file). The PDF is printed automatically, whenever an order is received, but it contains information about delivery address, payment method and reference only. Any suggestions on how to modify it so that the database field location is added? I have searched for a module that allows this with no luck. Edited December 3, 2012 by Prestafan1234 (see edit history) Link to comment Share on other sites More sharing options...
mytwocentimes Posted December 1, 2012 Share Posted December 1, 2012 I'm a hack - certainly the way I solved the problem isn't correct, but here it is ... it's in the delivery-slip.tpl ... as I have only two warehouses, I test for $product.id_warehouse and print accordingly. hope this helps, but remember - it's not elegant <td style="text-align: center; width: 7%">{$product.product_quantity}</td> <td style="text-align: center; width: 21%"> {if $product.id_warehouse < 2} {l s='St.Louis, FR' pdf='true'} {else} {l s='Commugny, CH' pdf='true'} {/if} </td> </tr> Link to comment Share on other sites More sharing options...
Prestafan1234 Posted December 3, 2012 Author Share Posted December 3, 2012 (edited) Thanks for your answer. What I was looking for, was the excact location in the warehouse of the product, sorry if that wasn't clear - eg. row 7, shelf 4, so your solution didn't work for me. I paid a developer fix this for me. The solution is (at your own risk - it worked for me): /modules/mailalert/mailalerts.php around line 147 add: $product_table = new Product($product['product_id'], true, (int)$id_lang); and further down <td style="padding:0.6em 0.4em;">'.$product_table->location.'</td> Open: /modules/mailalert/mails/LANG/new_order.html in line 39 add this: <th style="width: 15%; padding: 0.6em 0;">Location or whatever text you wish</th> EDIT: This was implemented in version 1.4.9 Edited December 3, 2012 by Prestafan1234 (see edit history) Link to comment Share on other sites More sharing options...
carelessoul Posted December 17, 2012 Share Posted December 17, 2012 Is there a solution for this in Prestashop 1.5.1? Link to comment Share on other sites More sharing options...
mizou125 Posted March 19, 2013 Share Posted March 19, 2013 Up Up 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