wsky Posted September 21, 2016 Share Posted September 21, 2016 Hello!I want to add a rule that will display {total_shipping} only store with id 1,2,3 (in order_conf file). Can you help? Thanks and sorry for my english! Link to comment Share on other sites More sharing options...
mister_j Posted September 22, 2016 Share Posted September 22, 2016 Hi, that means you have to check wich store are you using, and load different order_conf mail template. 1 Link to comment Share on other sites More sharing options...
wsky Posted September 22, 2016 Author Share Posted September 22, 2016 Thank you! You are prompted for me how can i change the loading other template order_conf for store id 10? I try add {if $cart->id_shop == '10'} in Language classes file but doesnt work. Link to comment Share on other sites More sharing options...
mister_j Posted September 22, 2016 Share Posted September 22, 2016 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 More sharing options...
wsky Posted September 23, 2016 Author Share Posted September 23, 2016 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 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