Ripe Posted June 21, 2011 Share Posted June 21, 2011 Hi all,Can you please somebody help how to insert customers VAT number to the new order template for merchant in Mailalerts module in Prestashop 1.4.2.5? I must add some directives to mailalerts.php, but I don't know how do I do this.Thanks a lot Link to comment Share on other sites More sharing options...
bellini13 Posted June 21, 2011 Share Posted June 21, 2011 The VAT number is stored along with the customers Address, so you first need to decide if you want to display the VAT for both delivery and invoice address, or just one of them.after deciding that, then edit the new_order.html and new_order.txt files and add a new parameter exactly where you want the vat to appear, give it a name like {delivery_vat} and {invoice_vat}then edit mailalerts.php and find the code that sets the templateVars variables in the 'hookNewOrder' function.you want to add 2 new array keys like '{delivery_vat}' => $delivery->vat_number, '{invoice_vat}' => $invoice->vat_number, 4 Link to comment Share on other sites More sharing options...
Ripe Posted June 21, 2011 Author Share Posted June 21, 2011 Excelent, thank you very much. I hope, that will works also for DNI. 1 Link to comment Share on other sites More sharing options...
Gimba Posted November 8, 2011 Share Posted November 8, 2011 Hello Ripe, how did you get this work for DNI? Thanks! Link to comment Share on other sites More sharing options...
fulnet Posted January 26, 2013 Share Posted January 26, 2013 (edited) ThanX Bellini! It is good to solve my problem: vat/iva displayed into invoice in prestashop 1.5.3. Modify HTMLTemplateInvoice.php and invoice.tpl In the first add in the array 'invoice_vat' => $invoice_address->vat_number, 'invoice_dni'=> $invoice_address->dni in the second file add: <br> C.F.: {$invoice_dni} <br> P.Iva/Vat: {$invoice_vat} Bye. Edited February 12, 2013 by fulnet (see edit history) 4 Link to comment Share on other sites More sharing options...
mehnihma Posted March 2, 2013 Share Posted March 2, 2013 Can you explain what to add where for Invoice? Thanks Link to comment Share on other sites More sharing options...
_Nicola_ Posted May 23, 2013 Share Posted May 23, 2013 to be completed the 'invoice_vat' => $invoice_address->vat_number, 'invoice_dni'=> $invoice_address->dni, has to be insert into the function function getContent() when it put data in the array 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