Page 1 of 1
I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 8:44 am
by ransom1
Hi guys,
I am trying to change the emails that Opencart sends to customers. Specifically the order_edit email. I updated the twig in catalog\view\theme\default\template\mail\order_edit.twig and I also updated the text contained in catalog\language\en-gb\mail\order_edit.php
I refreshed the template cache. I tried editing the twig file from the Theme editor.
Despite all these changes, the email stays exactly the same. No text nor twig layout changes are reflected.
What am I doing wrong?
Re: I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 11:12 am
by grgr
If you are trying to edit the email that is sent when you add order history and notify customer, then that is the correct file.
Delete the changes made in the theme editor and just edit the template file, you should see the changes in the email.
Also refresh the modification cache, if that file has been changed by an OCMOD.
Re: I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 11:31 am
by ransom1
edit the template file, you should see the changes in the email
I should, but I'm not. I even tried deleting order_edit.twig from the server and the email still sends! Where is it coming from?
I changed it and refreshed template, sass and mods. Then I deleted it and refreshed the same, and the email still sends, exactly the same.
Re: I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 12:02 pm
by ransom1
I think I'm going insane. I deleted order_edit.twig from the server. I went into the storage/cache on the server and deleted everything. Then I deleted catalog\controller\mail\order.php and the email STILL WORKS. How? When I update the order status and tick to notify customer it still sends. I'm totally lost.
Re: I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 1:43 pm
by thekrotek
One word: caching.
Re: I can't change the emails Opencart sends to customers
Posted: Fri Nov 26, 2021 2:55 pm
by hpwebdesign
I think the order_edit.twig and order_edit.php edit files have been changed by OCMOD or VQMOD
refresh modifications in menu extensions->modifications
if there is no change then the file is changed by vqmod
Re: I can't change the emails Opencart sends to customers
Posted: Mon Nov 29, 2021 7:39 pm
by paulfeakins
Re: I can't change the emails Opencart sends to customers
Posted: Mon Jan 30, 2023 6:05 pm
by fredJ
I struggled with this too.
Eventually decided to just rename the file order_edit to order_edit2, and in order.php change this line like this
$mail->setText($this->load->view('mail/order_edit2', $data));
It seems to get cached again, so change it to order_edit3 if you need to change again.