Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Order email


Go to End


4 Posts   1489 Views

Avatar
Webdoc

Community Member, 349 Posts

15 November 2009 at 7:17am

Is there anyway possible that after client makes order from ecommerce he or she receives email also the storeadmin will recive it.

Avatar
Double-A-Ron

Community Member, 607 Posts

15 November 2009 at 9:44pm

Edited: 15/11/2009 9:45pm

Yes this is the default behaviour as long as you have your admin email setup in /mysite/_config.php.

Email::setAdminEmail('me@domain.co.nz'); 

That means the custom will get an email, and so will the address set in the above line.

Aaron

Avatar
Webdoc

Community Member, 349 Posts

16 November 2009 at 1:06pm

Its already done so but why they dont come my inbox when someone order something??

Avatar
Double-A-Ron

Community Member, 607 Posts

16 November 2009 at 1:26pm

Could be a number of things. Have you tried a different email address?

The code that does the emailing can be found in /ecommerce/code/Order.php in

protected function sendEmail($emailClass, $copyToAdmin = true)

I have to admit, I did find in ecommerce module I customized, I was having trouble not recieving emails. It was because for some reason the Email class was resetting the "to" field to blank.

I had to fix that in the above function by using;

if(isset($subject)) $e->setSubject($subject);
if(isset($to))$e->setTo($to);

To manually set these before $e->send(); I thought this was because of the way I had customized the ecommerce system, but it may be a bug. What version of SS are you using?

Aaron