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 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

Multiple Order Emails to User

Go to End

5 Posts   2644 Views


Community Member, 3 Posts

15 May 2012 at 2:53am

We've added the E-commerce module for one of our websites and the way it works is users can come and purchase a membership (not a product). They enter in their details such as address, user name, password (because they have to create account for the records) and CC information. When a user hits submit and the payment gets processed the user then receives two emails. They are identical emails using the same email template ( except for one part which is Outstanding Balance. Seems the system sends an email before it gets processed and one after, so in the first email it says Outstanding Balance $50.00 and the second email it says Outstanding Balance $0.00.

Since our users receive these two emails they sometimes think they got charged twice, when they actually didn't. Is there a reason why the module sends these two emails? Does someone know a way to just have the system send one email, preferably just the email after payment has been processed and says Outstanding Balance $0.00?

Not sure if that is enough information, but hoping I can get some guidance on how to tweak the email autoresponders here. Thanks!



Forum Moderator, 238 Posts

15 May 2012 at 8:35am

Edited: 15/05/2012 8:35am

Hi Thomaso,

I've heard of this issue before, and if it still exists in my latest code, I'd like to resolve it.
Can you clarify which version of ecommerce you are using? Note that I maintain the 'shop' module, and not the ecommerce module. Shop is a fork of ecommerce.



Community Member, 3 Posts

15 May 2012 at 10:23am

I believe version 0.6.1.


Forum Moderator, 238 Posts

15 May 2012 at 11:06am

Ah, in that case, I think the issue has been resolved.

I would suggest you try to upgrade to the latest version, or diving into the code to understand and find where the extra email is being sent...I suspect it is something to do with the Order onBeforeWrite (or onAfterWrite) function ...where the system used to perform the saving of an order, triggering an email.

I have version 0.8.3 of shop out currently, with another version not far off. The latest (unreleased) code is pretty stable at the moment, and I'm also writing a migration script to help upgrade from older versions.

If you want to try latest (unreleased):
..some upgrading help here:

If you want to try 0.8.3:


Community Member, 5 Posts

16 April 2015 at 1:06pm

I'm having a similar problem with the latest version of silverstripe-shop. Two email being generated. The first with Order Reference eg. 57 and the second with Order Reference 571
So I think there might be two problems:
Obviously the generateReference function is being called when the reference already exists.
And then the matter of email being sent twice.

Now I notice that completePayment() is responsible for calling sendReceipt() and that completePayment() is being called twice. Once in ShopPayment.php and again in OrderProcessor->makePayment() function
I wonder if one of these calls is redundant?