Jump to:

2088 Posts in 1007 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Send email to new user/member upon registration

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1465 Views
  • Optic Blaze
    Avatar
    Community Member
    162 Posts

    Send email to new user/member upon registration Link to this post

    Hi I am using SS2.3.2 and rc4 and ecommerce 0.6 beta. I want the system to email any new user that signs up/ is registered their username and password to the email address that they specified.

    As far as i can tell from the documentation i have to extend the Member class and the write a onBeforeWrite() function that tells silverstripe to send an email to the new member, but i am not sure where to begin.

    Some help please

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Send email to new user/member upon registration Link to this post

    Hi Optic Blaze,
    The Ecommerce module decorates the member class in the ecommerce/_config.php
    DataObject::add_extension('Member', 'EcommerceRole');

    You'll find the file in ecommerce/code/model/EcommerceRole.php
    Around line 107 you'll see the code for making a new memeber. Something along the lines of

          $email = new Email($from, $to, $subject, $body);
          $email->sendPlain();

    Will send mail. But you'll need to sus out what you want to send.

  • Optic Blaze
    Avatar
    Community Member
    162 Posts

    Re: Send email to new user/member upon registration Link to this post

    Thanks your a star

    1465 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.