2088 Posts in 1007 Topics by 455 members
|Go to End|
1 June 2011 at 12:09am
have anybody know how to creat the notification via e-mail for new orders? Simply it could be the copy of email that has sent to customers. Where can I edit the code?
1 June 2011 at 3:27am
The code is already there in order.php. See Order::sendReceipt and Order::sendEmail
See the .ss files in the directory ecommerce/templates/email
I haven't got this far yet, but I guess you copy those to...
...and amend as necessary.
Note that any css must be inline, because these are html email templates, not html web pages.
1 June 2011 at 9:27pm
Thanks so much. I found function $copyToAdmin = true, but the copy did not work for me... so I check the _config file and TaDaa... there was wrong email.
2 June 2011 at 1:42am Last edited: 2 June 2011 1:44am
Toothy, now it's my turn to thank you! I didn't know about copyToAdmin or Email::setAdminEmail, but emails to the store owner were next up on my list.
Email::setAdminEmail should probably be in most _config.php files, ecommerce or not.
This is what I have in _config.php now...
// Default email sender address for the Email class
// Also receives a copy of ecommerce receipt emails
// Sender & subject for ecommerce receipt emails
Order::set_subject("thank you for your order at www.mysite.com");
- If Email::setAdminEmail is not defined, no receipt is sent to the shop owner - just the customer
- If Email::setAdminEmail is defined, but not Order::set_email, then setAdminEmail is also the sender of receipts. If neither are defined, the sender of receipts is empty.
- Order::set_email can include a name
e.g. 'MySite Sales <firstname.lastname@example.org>'
...but Email::setAdminEmail must include just the email address without a name
...otherwise the receipt emails don't arrive.
- The Debug::friendlyError function code implies that Email::setAdminEmail is also shown in error pages when no corresponding error page is set up in the CMS (although I didn't test this)
|Go to Top|