Post by silversurfer5150 » Mon Mar 28, 2011 5:38 pm

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


Posts

Joined
Mon Mar 21, 2011 11:12 pm

Post by justinv » Tue Mar 29, 2011 3:14 pm

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.

Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Image


Active Member

Posts

Joined
Tue Oct 12, 2010 1:24 pm

Post by silversurfer5150 » Wed Apr 06, 2011 6:24 am

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


Posts

Joined
Mon Mar 21, 2011 11:12 pm

Post by rahul075manocha » Fri Apr 08, 2011 8:11 pm

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.
thanks for the posting, i really needed for that, i have got a very nice idea by this.

Connect the Dots Numbers | Seo Services in india | Website development India | Article submission



Posts

Joined
Fri Apr 08, 2011 7:27 pm

Post by onlinemarketer » Sun Aug 14, 2011 1:42 pm

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!

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by strigona » Mon Aug 15, 2011 10:44 pm

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!
Take a look at this file: https://code.google.com/p/opencart/sour ... er.php#148.

New member

Posts

Joined
Thu Jul 07, 2011 11:31 pm
Who is online

Users browsing this forum: No registered users and 2 guests