2000 Posts in 532 Topics by 435 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » order notify via email
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 583 Views |
-
order notify via email

1 June 2011 at 12:09am
Hi,
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?
-
Re: order notify via email

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...
themes/mytheme_ecommerce/templates/email
...and amend as necessary.
Note that any css must be inline, because these are html email templates, not html web pages.
-
Re: order notify via email

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.
Thank you.
-
Re: order notify via 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
Email::setAdminEmail('support@mysite.com');// Sender & subject for ecommerce receipt emails
Order::set_email("Name <sales@mysite.com>");
Order::set_subject("thank you for your order at www.mysite.com");Note:
- 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 <sales@mysite.com>'
...but Email::setAdminEmail must include just the email address without a name
e.g. 'sales@mysite.com'
...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)
| 583 Views | ||
|
Page:
1
|
Go to Top |

