Peace2017 Posted April 23, 2018 Share Posted April 23, 2018 Hi, I try to create a module for me: I want to have a order confirmation for another person, which is an own mail template but very similar. I saw this code: Mail::Send( (int)$order->id_lang, 'order_conf', Mail::l('Order confirmation', (int)$order->id_lang), $data, $this->context->customer->email, $this->context->customer->firstname.' '.$this->context->customer->lastname, null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop ); There is a lot of data in $data. I have this code from classes/PaymentModule.php and sure, I could copy dozens of lines where $data is being created. But is there a simpler solution to have all the data of the order_conf template for a very similar mail template of my own? Thanks for any hint Link to comment Share on other sites More sharing options...
tdsoft Posted April 23, 2018 Share Posted April 23, 2018 Hi, you can open file prestashop\classes\PaymentModule.php function: validateOrder find some hooks in this function and use it Example: actionValidateOrder, actionPDFInvoiceRender Link to comment Share on other sites More sharing options...
Peace2017 Posted April 24, 2018 Author Share Posted April 24, 2018 I didn't find a good hook so I use the mail send method in a module method. Thanks so far 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