Paul de Cocq Posted June 20, 2014 Share Posted June 20, 2014 Hi everyone, For one of our customers we need to make a little tweak in the prestaShop order_conf.html email template. The issue is we want to (see photo) disable the <tr> (circled in red) with the discount tag if the customer has no discount, en we want to enable it when the customer is given a discount. so what i really need is 2 email templates: - order_conf.html (default) - order_conf2.html (with no discount rule) so i'd really appreciate it if anyone can help me in the right direction with this issue. Thanks in advance Paul Link to comment Share on other sites More sharing options...
Paul de Cocq Posted June 24, 2014 Author Share Posted June 24, 2014 (edited) Maybe not the most beautifull way to do it, but it works. If anyone has any suggestions on how to do it in a better way, please let me know ;-) if (Validate::isEmail($this->context->customer->email)) if($order->total_discounts > 0){ Mail::Send( (int)$order->id_lang, 'order_conf_no_discounts', Mail::l('Order confirmation', (int)$order->id_lang), $data, $this->context->customer->email, $this->context->customer->firstname.' '.$this->context->customer->lastname, null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop ); }else{ 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, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop ); } Edited June 25, 2014 by Paul de Cocq (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