Jump to content

order confirmation message according to store - multi-store


acpkor

Recommended Posts

In principle, I am interested in the client's.

The ones in the /mails/en/ folder

I wish a different "order_conf.html" could be sent depending on the store.

I suppose that it could be done by creating another mail template "xxxxx.html", for the second store, but in some place or form, I have to tell it to send it if it is that second store.

Link to comment
Share on other sites

hello

thank you very much for your answers

I have these lines in the file: /classes/PaymentModule.php

 

                       if (self::DEBUG_MODE) {
                            PrestaShopLogger::addLog('PaymentModule::validateOrder - Mail is about to be sent', 1, null, 'Cart', (int) $id_cart, true);
                        }

                        $orderLanguage = new Language((int) $order->id_lang);

                        if (Validate::isEmail($this->context->customer->email)) {
                            Mail::Send(
                                (int) $order->id_lang,
                                'order_conf',
                                Context::getContext()->getTranslator()->trans(
                                    'Order confirmation',
                                    array(),
                                    'Emails.Subject',
                                    $orderLanguage->locale
                                ),
                                $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
                            );
                        }
                    }

 

it's fine?
How would I put the code?

Link to comment
Share on other sites

Yes, PaymentModule.php

It's just a demonstration of how to do it. The condition of verifying the existence is still missing in the example
email templates and default email template settings.

I will ask colleagues, he will definitely have a module for that.

Edited by knacky (see edit history)
  • Like 1
Link to comment
Share on other sites

Thank you very much for example.

I have created the mail templates and modified the file
I have applied it and it works fine.

Thanks!

if I wanted to do the same with the email that the employee receives

which file/class should I modify?

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...