28 replies [Last post]
seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Was this information Helpful?

I sell downloadable products, and have had several people complain after having purchased a single product, they get multiple emails, and have multiple download links show up. The last person said they got 4 emails and 4 download links after their first and only purhcase. They they think that maybe they have been charged multiple times.

I only ever get 1 email from ubercart saying that an order has been completed, and then 1 mail from paypal saying that the order has gone through. Anyone have any ideas of why this might be happening?

I thought maybe it would be a workflow-ng thing, but it seems that there are only 3 rules, and they all seem logical:

"
Update order status on full payment A payment gets entered for an order uc_payment Modified edit reset clone

$0 Order Customer completes checkout workflow-ng Custom edit delete clone

Update order status upon checkout completion with full payment Customer completes checkout uc_payment Default edit clone
"

Any ideas what I can do to make sure that customers don't get multiple emails with multiple download links? I don't want to concern them that they might have been charged multiple times when they haven't.

Thanks in advance for any help!
Jacob

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: Multiple emails with single purchase?

Are they buying multiple file downloads or are these all for the same one?

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Re: Multiple emails with single purchase?

Only one product download. I currently only have 1 downloadable product in my store.

Any ideas?

Thanks!

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Re: Re: Multiple emails with single purchase?

I looked through the product settings, and didn't see anything unusual. The only place I see the number 4 is that I have 4 product images, but that shouldn't generate 4 emails, right?

Thanks!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: Re: Re: Re: Multiple emails with single purchase?

I think e-mails are being generated through the file downloads module itself in 1.x, though in 2.x this has been changed to work through Conditional Actions. Is there anything funky going on with order status updates for those orders?

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Re: Re: Re: Re: Multiple emails with single purchase?

I took a look at the /admin/store/orders and didn't see anything unusual. I'm using 1.x

When I go in ad edit an order, I see this:
* [-] User can now download the file PHAT_Math.rfl.
* [-] User can now download the file PHAT_Math.rfl.
* [-] PayPal IPN reported a payment of 49.00 USD.
* [-] User can now download the file PHAT_Math.rfl.
* [-] User can now download the file PHAT_Math.rfl.
* [-] Order created through website.

It shouldn't be setting the download permissions 4 times, right? I don't know why it is though.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: Re: Re: Re: Re: Re: Multiple emails with single purchase?

It should only send it once, but there was a bug at one time related to which order updates sent out e-mails. What version of 1.x are you on?

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Re: Re: Re: Re: Re: Re: Multiple emails with single purchase

I have the latest version (1.7).

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Re: Re: Re: Re: Re: Re: Re: Multiple emails with single purc

here is the log for the last product that was purchased:

Wed, 04/15/2009 - 02:49 -

* PayPal payment for $49.00 entered by -.

Wed, 04/15/2009 - 02:49 -

* Checkout message sent to xxxx@xxxx.com.

Wed, 04/15/2009 - 02:49 -

* Order status changed from In checkout to Payment received.

Wed, 04/15/2009 - 02:49 -

* Order status changed from Payment received to Completed.

Wed, 04/15/2009 - 02:49 -

* Order status changed from Completed to Completed.

Wed, 04/15/2009 - 02:50 -

* Order status changed from Completed to Completed.

Wed, 04/15/2009 - 02:50 -

* Order status changed from Completed to Completed.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: Re: Re: Re: Re: Re: Re: Re: Re: Multiple emails with single

Can I get you to test updating to the Bazaar version for uc_file.module to see if the problem has been fixed since 1.7? I want to release a 1.8 soon, and this may have already been addressed. You can grab a zip with the whole latest Bazaar code at http://bazaar.ubercart.org and just copy the single file over.

eosrei's picture
Offline
Joined: 04/19/2009
Juice: 2
Same problem as OP

I have much the same problem: instead of four emails, the users receive two. Duplicate downloads are listed in the user's "File" section.

seattle_magician's picture
Offline
Bug Finder
Joined: 02/28/2008
Juice: 62
Re: Multiple emails with single purchase?

Sorry it's taken me so long to respond. I tried the updated file you mentioned, and waited a while for the next customer to make a purchase. I finally got a purchase today, and the customer mailed me saying that the download link in the email, and on the site, were broken. I checked, and sure enough they were broken. It said something like
"user warning: Unknown column 'file_key' in 'field list' query: SELECT granted, filename, accessed, description, `file_key`, f.fid FROM uc_file_users ..."

Reinstalling the Ubercart 1.7 package fixed the broken link problem. The multiple link problem still remains.

Any other ideas?

Thanks,
Jacob

MJH
MJH's picture
Offline
Joined: 09/27/2009
Juice: 2
Re: Re: Multiple emails with single purchase?

I have the same problem with Ubercart 6.x-2.0-rc7, the included uc_file module, the included paypal payment gateway module and Drupal 6.14.

In my shop, there is only one product sold. It is a downloadable product.

If someone buys this one downloadable product once and pays with paypal (PayPal Website Payments Standard), he gets:
- 2 emails "Your order at ..."
- 2 emails "Download link"
- in his account, the download is shown only once, but the customer gets two times the download and address-limits (6 instead of 3 downloads, ...)

The logs show the following:
27.09.2009 7:32:18 PM
User can now download the file Test 123.doc.

27.09.2009 7:32:18 PM
PayPal IPN reported a payment of 29,95 EUR.

27.09.2009 7:32:24 PM
User can now download the file Test 123.doc.

27.09.2009 7:32:24 PM
Order created through website.

> This only happens with the Paypal payment gateway. The Credit card payment gateway works correct.

Any ideas?

Riki's picture
Offline
Joined: 01/10/2009
Juice: 196
Re: Re: Re: Multiple emails with single purchase?

It looks like I'm getting the same thing with PayPal and Ubercart 6.x-2.0-rc7. The user gets double the downloads and I get 2 emails. Any ideas?

- Riki Babington
www.eat3d.com
Feed Your Brain!

mbelos's picture
Offline
Joined: 01/22/2009
Juice: 16
PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

EDIT: Just to let you guys know, this is a PayPal and Ubercart 6.x-2.0-rc7 issue. This may not fix the File Downloads email issue...
----------------
Hey guys, I've found and fixed the issue on my end.

The Conditional Actions (CA's) relating to notifications are running twice on PayPal payments - so to fix this problem, edit the Customer notification predicate (/admin/store/ca/uc_checkout_admin_notification/edit/conditions) and the Admin notification predicate (/admin/store/ca/uc_checkout_admin_notification/edit/conditions) conditions to include: Check the Order Status condition (status: Pending) (do not click the Negate checkbox). Below is why you need to do this...

This is the workflow:

  1. Ubercart creates order (uc_cart_complete_sale() is run, executing both CA's above -> Order status is Pending)
  2. Ubercart sends details to PayPal
  3. PayPal replies with the IPN, registering the payment (uc_cart_complete_sale() is run again, executing both CA's above -> Order status is Payment Received)

So in PayPal's case, the CA's are run twice, once when Ubercart creates the order, and then again when PayPal decides to send its IPN to notify of payment. What I think should happen is that Ubercart should not run the uc_cart_complete_sale() when the IPN is received from PayPal - or if it needs to run, at least pass an additional parameter so that the CA's are not triggered again. Actually, the best way to do this is to pass a CA trigger specifically for receiving the PayPal IPN to the uc_cart_complete_sale().

jasont's picture
Offline
Joined: 07/27/2009
Juice: 76
Re: PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

Changing the status to pending results in no checkout notifications to be sent for me. In fact setting it to Pending, Payment Received, Paypal Pending or Completed didn't work either.

This is a real problem for any site processing PayPal payments right now.

mbelos's picture
Offline
Joined: 01/22/2009
Juice: 16
Re: Re: PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

Are you able to send *any* notifications? Remember, this will only fix the issue documented above, where you receive two emails when performing payments with PayPal...

jasont's picture
Offline
Joined: 07/27/2009
Juice: 76
Re: Re: Re: PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

No checkout notifications are sent when the Order Status Condition is set to Pending. I believe this is because the top predicate is the one that changes the Order Status to Payment Received. Which I believe occurs immediately after a regular PayPal payment is made.

Therefore any predicates below the first one attempting to be triggered by a payment status of pending will not fire.

The current order flow seems to be:

- payment entered into PayPal
- order status updated to Payment Received
- checkout notifications triggered
- order status updated to completed
- any necessary roles notifications are sent
- any necessary roles are granted.

In my testing, I have turned off PayPal Website Payments Pro and only one notification is being sent. However when a user clicks the Return to Store button after a PayPal payment is completed, the notifications are re-sent. Trying to figure out what to do about this now.

Note*: It has come to my attention that the multiple emails being sent regarding roles was due to product kit roles. I have two roles but was trying to only send notification to the user for one of those roles. I thought adding a conditional action requiring one of the roles to be present would be enough to only send one email.

Turns out I needed to set up a conditional action to negate all other roles being sent email notification for that predicate. So I apologize for grouping that particular issue with the current one as I thought they were related.

funny809's picture
Offline
Joined: 10/20/2009
Juice: 16
Re: Re: Re: Re: PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

I am having the same problem as jasont. One thing I realized is that if there is a condition that says payment received in conditional actions and a user buys something if the email arrives in the users inbox and then they click return to store another email is not sent. However if a the email doesn't arrive before a user clicks on return to store another email is sent. I am not sure on how to fix this but I am working on it. Anyone have any ideas?

jasont's picture
Offline
Joined: 07/27/2009
Juice: 76
Re: Re: Re: Re: Re: PayPal and Ubercart 6.x-2.0-rc7 RESOLVED

Here is something interesting that I am seeing in the order details section. On the "admin/store/orders/view" page, all orders are showing up as completed. Seems fine.

However when I click on one of the PayPal orders, in the order comments section there is a big X under the notified column and the Status says "Payment Received". Not exactly sure what this means but there are no Order Comments reported for Credit Card payments.

funny809's picture
Offline
Joined: 10/20/2009
Juice: 16
Solution To Paypal Sending Multiple emails

I figured out how to get around the problem of sending two emails with PayPal. The solution is:
Create a new predicate
Set the trigger to a payment gets entered for an order.
Then make the new predicate an exact copy Email costumer checkout notification
Do the same thing for Email admin checkout notification
Then under trigger costumer completes checkout disable email admin, email costumer and update order status upon checkout completion with full payment.
By doing this Ubercart should only send one email when using paypal website payments standard.

jasont's picture
Offline
Joined: 07/27/2009
Juice: 76
Re: Solution To Paypal Sending Multiple emails

Thanks funny809, this has fixed the issue for me though I made a few different adjustments. Here is what I did to make sure I didn't send out the invoice for failed payments:

- I created the above mentioned predicate by funny809 for the admin checkout notification.
- In that predicate I added a "Check the order status" condition that made sure the order status was payment received.
- I then made sure the predicate was beneath the already existing predicate labeled "Update order status on full payment". This way the invoice will only be sent if the order is paid in full.

Again, thank you funny809 for passing on the solution. I still feel that this shouldn't be necessary for the user to make this happen using CA's. If it is easier to do it this way than to hard code the module then I do hope the devs decide to make this CA standard implementation with a fresh install of Ubercart.

Ubercart really needs to be PayPal ready considering how widely used PayPal is as a payment processor.

Jason

dr wits's picture
Offline
Joined: 03/21/2008
Juice: 68
thanks but...

last two comments helped with notifications but i'm still getting two download link emails.

pretty sure i have tried every single combination of ca's.

from the order admin comments
10:57:00 AM - User can now download the file xyz.mp3.
10/29/2009
10:57:00 AM - PayPal IPN reported a payment of 1.00 USD.
10/29/2009
10:57:05 AM - User can now download the file xyz.mp3.
10/29/2009
10:57:05 AM - Order created through website.

using latest versions of both drupal and ubercart.
and thanks soooo much for fixing most of the multiple email issues for me.

if i can figure this out i will be 100% ported to drupal6 ubercart2

thanks again

dr wits's picture
Offline
Joined: 03/21/2008
Juice: 68
Re: thanks but...

so i think i fixed it...
changed the weight of the download email conditional action to 2

seems to have fixed everything.

mazel tov

JE_Illustration's picture
Offline
Joined: 11/14/2009
Juice: 15
Re: Re: Solution To Paypal Sending Multiple emails

So I followed what Funny809 and Jasont laid out. However after testing it with paypal sandbox, now I get no invoices sent to customer and still double emails to the download file. I am using 2.0 and latest drupal. Also it's a paypal standard account. I'm not sure on the admins end... even though I changed all emails to my personal email, I didn't receive any emails... so not sure if the owner of the site got them or not.

incrn8@drupal.org's picture
Offline
Joined: 12/09/2007
Juice: 22
Same here

Yep, add me to the list as well. Happens with 2.0 (will be trying 2.2 later) and Paypal Standard. My solution to the two emailed invoices was to put a condition in the "E-mail customer checkout notification" predicate. I used the "Check order status" condition and selected "In checkout" from the status list. If I used "Payment received", no emails arrived.

Sadly, no idea on the duplicated number of downloads (shows 2 instead of 1). Not a big deal at the moment, as I simply set the "restrict IP address" option to 1.

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Same here

I am having the same problem with PayPal Standard on 2.2.

I don't offer downloaded files, instead we have products that are shipped. A file 2X file download is really the same as if I shipped 2 of an item if a customer only paid once. I have been experiencing this since late last month and have been trying to fix it with a bunch of different CA configurations, with mixed results. The best i can get is no email and no stock decrement, or 2 times each.

One solution that I saw suggested but haven't tried is with the Convert Configuration option, as I never had a 1.x UC. It shouldn't be necessary if this was a fresh UC 2 install and never had to move from workflow-ng to conditional actions, could it do any harm?
Even setting all the predicates back to their defaults doesn't prevent it.

Hopefully as more people report problems the issue will get some more attention and we can get this fixed. I've read a lot of PayPal issue topics in the forums and it seems this was a problem awhile back and is still plaguing a bunch of people in different scenarios.

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
incrn8@drupal.org
incrn8@drupal.org wrote:

Yep, add me to the list as well. Happens with 2.0 (will be trying 2.2 later) and Paypal Standard. My solution to the two emailed invoices was to put a condition in the "E-mail customer checkout notification" predicate. I used the "Check order status" condition and selected "In checkout" from the status list. If I used "Payment received", no emails arrived.

Sadly, no idea on the duplicated number of downloads (shows 2 instead of 1). Not a big deal at the moment, as I simply set the "restrict IP address" option to 1.

For duplicate downloads, I added the same predicate, but with "Completed" Status for the "Notify customer when a file is granted" trigger! It works for me Smiling

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Dupe http://drupal.org/node/6