Jump to content

Mailalerts - edit template


Recommended Posts

There is payment module class, you have to create override for that. The function is called validateOrder, there you can set which template you have to load on order confirmation. I suggest you to check order->id_shop and depending on your needs to pass order_conf_wt instead of order_conf, where you are sending mail. In your mail template dir you create order_conf_wt.html and order_conf_wt.txt files. That should work for you

Link to comment
Share on other sites

Like this?:

 

{if $id_shop = (int)Context::getContext()->shop->id != '10'}
                        if (Validate::isEmail($this->context->customer->email)) {
                            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
                            );
                        }
						{/if} {else} 
						
						if (Validate::isEmail($this->context->customer->email)) {
                            Mail::Send(
                                (int)$order->id_lang,
                                'order_conf_wt',
                                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
                            );
                        }
						{/if} 
						
						
						
						{/if}
						 
                    }
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...