Hello there,
I have been customising opencart for my own uses and I am now on the final stage where I need to customise what is sent by email to the customer and back to the store (if email alert enabled) at the end of an order.
I have to try and gain an understanding of the process which opencart goes through to build up the mail headers and where the actual send command is executed. Can anyone give me a brief breakdown including which files I need to examine?
thanks
There is a Mail class in (from memory) system/library/mail.php.
This is used by catalog/model/checkout/order.php when a new order comes through, and by catalog/controller/account/create.php on account creation.
They might be a good place to start.
This is used by catalog/model/checkout/order.php when a new order comes through, and by catalog/controller/account/create.php on account creation.
They might be a good place to start.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Thanks for the reply,
I have it sorted now so for anyone else reading this post wishing to customize emails here is what I found.
I am using 1.4.9.3
Yes the final mail class is in system/library/mail.php, all of the methods called by the script at catalog/model/checkout/order.php are here. If you want to trace back farther, look in catalog/controller/payment/your payment module for the public function confirm(). This is where the address/payment details etc are sent to the order.php script.
In order.php you can see the construction of the the main html order confirmation email template variables and also those for the plain text version. The final template can then be found in catalog/view/theme/default/mail/order_confirm.tpl.
I have it sorted now so for anyone else reading this post wishing to customize emails here is what I found.
I am using 1.4.9.3
Yes the final mail class is in system/library/mail.php, all of the methods called by the script at catalog/model/checkout/order.php are here. If you want to trace back farther, look in catalog/controller/payment/your payment module for the public function confirm(). This is where the address/payment details etc are sent to the order.php script.
In order.php you can see the construction of the the main html order confirmation email template variables and also those for the plain text version. The final template can then be found in catalog/view/theme/default/mail/order_confirm.tpl.
thanks for the posting, i really needed for that, i have got a very nice idea by this.justinv wrote:There is a Mail class in (from memory) system/library/mail.php.
This is used by catalog/model/checkout/order.php when a new order comes through, and by catalog/controller/account/create.php on account creation.
They might be a good place to start.
Connect the Dots Numbers | Seo Services in india | Website development India | Article submission
great stuff, has anyone contructed a more thorough looking email confirmation, as 1.5 seems to send a very simple email, without customer address etc whereas 1.4.x sent out a full printable email confirmation to the admin email which could be printed directly from the email without logging into the admin!
Take a look at this file: https://code.google.com/p/opencart/sour ... er.php#148.onlinemarketer wrote:great stuff, has anyone contructed a more thorough looking email confirmation, as 1.5 seems to send a very simple email, without customer address etc whereas 1.4.x sent out a full printable email confirmation to the admin email which could be printed directly from the email without logging into the admin!
Who is online
Users browsing this forum: No registered users and 58 guests