19 replies [Last post]
hang10dive's picture
Offline
Joined: 12/31/2008
Juice: 37
Was this information Helpful?

On Friday (10/23/09) we updated to UC 6.x-2.0 (from 6.x-2.0 r7 if I remember correctly). With this update we now are having the stock levels decrease twice, which it was not doing before we updated. It looks like it decreases by 1 when the order is created and then again after PayPal has reported the payment (see copy of log below). The other thing that is happing is I received 2 e-mails that said I had a new order. The only difference between the e-mails were under Order Comments. One said “No comments left” and the other e-mail said “Payment of 85.69 USD submitted through PayPal". I have had 3 orders since the update and they all do the same thing.

I've seen on other posting that there was the same problem in previous versions, but it also go fixed on following updates. Any thoughts?

Thanks,
Randy

10/25/2009
7:52:30 AM - The stock level for 1-091 has been decreased to 2.
10/25/2009
7:52:30 AM - The stock level for 1-084 has been decreased to 1.
10/25/2009
7:52:31 AM - PayPal IPN reported a payment of 85.69 USD.
10/25/2009
7:52:32 AM - The stock level for 1-091 has been decreased to 1.
10/25/2009
7:52:33 AM - The stock level for 1-084 has been decreased to 0.
10/25/2009
7:52:34 AM - Order created through website

doxwrx's picture
Offline
Joined: 07/11/2009
Juice: 14
Having same problem, any real fix out there?

I am using Ubercart 6.x-2.0-rc7 and am having the same problem when customer uses PayPal. The inventory is decreased by 2 and I get the double email. I also know that the customer receives 2 email receipts. I did a conditional action for "Decrement stock upon order submission" which tells not to decrease if payment type is PayPal. This stopped both decrements so that now the inventory does not change. I still get the double emails as does the customer. By the way, If the customer uses a credit card every thing works properly.

From my readings of this forum I can see that this is a known issue that has been a problem for at least a couple years back in the versions. I am guessing it must be something with the uc_stock module. Is anyone working on a fix or do we just have to continue searching for a work around?

I am obviously not an expert with PHP but have been working with Ubercart and Drupal for a while now and would appreciate any input on this matter.

thank you, Mark

ybresson's picture
Offline
Joined: 11/14/2009
Juice: 5
Re: Having same problem, any real fix out there?

I had the same problem (emails sent out twice and stock decreased twice) using PayPal payment (caused by a double notification because PayPal sends the IPN when payment occurs + a second notification is triggered when the customer clicks the "back to the merchant site" button).

I did try all suggestions I could find (including the "check the order balance is less than or equal to $0.00." condition), but none fixed the problem Sad.

After playing with conditional actions and test orders for some hours, I came up with a simple solution that's working fine for me Smiling !

What I did is add a "Check the order status is 'in checkout'" condition to the three first predicates ('Decrement stock upon order submission', 'E-mail admin checkout notification' and 'E-mail customer checkout notification') under the 'Customer completes checkout' trigger.

I've tested this solution with IPNs enabled/disabled and with/without clicking the "back to merchant site" button.

Hope it can help you!

adcalguy's picture
Offline
Joined: 06/01/2008
Juice: 31
Solution works great

ybresson - Thanks for the tip. I had the same issue described in the original thread and your solution works great. Now the stock level is decreasing correctly and duplicate e-mails are no longer sent.

doxwrx's picture
Offline
Joined: 07/11/2009
Juice: 14
ybresson--- This solution

ybresson---
This solution works perfectly when customer uses PayPal...however, now I am not getting emails or decremation of stock now when customer uses a credit card.
How about you guys.
Any ideas?
Thanks

checkmark's picture
Offline
Joined: 11/23/2009
Juice: 21
Nice fix

@ybresson: THANKS!!
@doxwrx: would it work to setup separate predicates for sending emails, depending on which payment method is chosen? Payment method does show up in the list of conditions, and on the one hand you could have two conditions:
1) payment method: paypal
2) order status: in checkout
whereas with the other version of the email predicate you could have
1) payment method: paypal NEGATED

JamesOakley's picture
Offline
Joined: 06/04/2009
Juice: 25
checkmark wrote: @ybresson:
checkmark wrote:

@ybresson: THANKS!!
@doxwrx: would it work to setup separate predicates for sending emails, depending on which payment method is chosen? Payment method does show up in the list of conditions, and on the one hand you could have two conditions:
1) payment method: paypal
2) order status: in checkout
whereas with the other version of the email predicate you could have
1) payment method: paypal NEGATED

Of course, this could be done using Condition Groups.

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: checkmark wrote: @ybresson:

I've tried ybresson's solution, and as i understood it the condition should be set to 'negated'. This doesn't always resolve the issue. Is this the correct way to set up the conditions?

If someone reporting the problem has successfully resolved this issue with any of the above suggestions, could they please post back? Or maybe offer some more insight, as I have actually had customers calling me with question both about getting double emails and not receiving an email other than PayPal's.

I currently have authorize.net with SSL on this site as well (with no issues), but we offer PayPal for customers who might want the convenience or assurances that PayPal gives to them. Might just dump PayPal altogether but it's being used by about a third of our customers, I'm afraid we might lose sales if we do though.

I should also add that this is a 2.2 site, not the 2.0 from the original post.

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

biocomp.pat's picture
Offline
Joined: 01/05/2009
Juice: 61
Re: Re: checkmark wrote: @ybresson:

Hmmm... I was having major issues that sounded very similar (something to do with in checkout status), and what seemed like two instances of doubled emails (4 were being sent out to admin and customer). I'd just installed a few complicated add-ons, so had no idea where to start.

Anyhow, I finally gave up and just clicked "the convert predicates" button (which supposedly converts from workflow-ng to conditional actions when going from UC 1.0 to 2.0), and reset all my predicates at the same time. Not sure what happened, but things started working again (albeit I have to redo my customizations).

Anyhow, I'd recently updated, so maybe it was an update thing. Hopefully it helps someone else Smiling

cookiesunshinex's picture
Offline
Joined: 10/14/2009
Juice: 127
ybresson wrote: I had the
ybresson wrote:

I had the same problem (emails sent out twice and stock decreased twice) using PayPal payment (caused by a double notification because PayPal sends the IPN when payment occurs + a second notification is triggered when the customer clicks the "back to the merchant site" button).

I did try all suggestions I could find (including the "check the order balance is less than or equal to $0.00." condition), but none fixed the problem Sad.

After playing with conditional actions and test orders for some hours, I came up with a simple solution that's working fine for me Smiling !

What I did is add a "Check the order status is 'in checkout'" condition to the three first predicates ('Decrement stock upon order submission', 'E-mail admin checkout notification' and 'E-mail customer checkout notification') under the 'Customer completes checkout' trigger.

I've tested this solution with IPNs enabled/disabled and with/without clicking the "back to merchant site" button.

Hope it can help you!

Thanks for this post. I am using only paypal and was getting double stocke decrements and double emails.

Pulling my hair out to try and figure out why and this solved it.

Does anyone know if this will work with credit cards processed by Paypal as well?

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Stock Levels Decrease Twice with latest update 6.x-2.0

I tried this before but when I set the new conditions I thought it made sense to 'Negate' the condition, and the problem continued with even worse results, it started affecting authorize.net orders as well.

If this suggestion fixed it for you how EXACTLY did you set your conditions? I have forgotten everything I've tried, so many variations, including resetting to the defaults a few times.
Currently I have recreated the default conditions as new predicates and disabled the real defaults. Some PayPal transactions work fine, others don't and decrement + email twice. This helped someone else somewhere...

I do notice that I get 2 different PayPal email subjects - "Notification of payment received..." - these orders are the 2X ones - OR "Payment received from..." - these orders go through fine.
This is a fairly new site so most users are first time customers, some are probably creating their accounts at checkout while I know some create their accounts right away and then shop.

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

cookiesunshinex's picture
Offline
Joined: 10/14/2009
Juice: 127
Re: Re: Stock Levels Decrease Twice with latest update 6.x-2.0

I'm only using Paypal (standard).

BTW, I tested it with a Paypal processed credit card and it works exactly the same as a Paypal account payment.

The only thing that I'm seeing is that I'm now seeing an error in the recent log when a user checks out, logs into Paypal, Pays, but DOES NOT return to the site. They just close the browser.

I get a mail error stating that:

Error sending e-mail (from "mydomain.com" <info@mydomain.com> to ).

I still receive an email and the user still receives an email.

Before I fixed the conditional rules, this was happening as well as the me and the user were receiving 2 emails, and the user was receiving a message when they returned to the site that an email could not be sent, contact administrator.

I can live with an error in the logs, but it seems like Paypal sub-module is horked up.

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Re: Re: Stock Levels Decrease Twice with latest update 6.x-2

Thanks for the additional info, I'm using PayPal Standard as well as processing cards though Authorize.net. So now I'm thinking I might need to add a 'check payment type' as well to the new conditions so as to differentiate between credit cards and PayPal. My flawed logic here is that i can then some how have it ignore the authorize.net credit card transactions, and only apply the 'in checkout' conditions if it's PayPal.
Did you set the 'in checkout' condition to be 'negated', this is one thing that is confusing me as i read that it helped other people.
Yeah, yet another attempt, but maybe after the holidays...

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

JamesOakley's picture
Offline
Joined: 06/04/2009
Juice: 25
j.mead wrote: If this
j.mead wrote:

If this suggestion fixed it for you how EXACTLY did you set your conditions? I have forgotten everything I've tried, so many variations, including resetting to the defaults a few times.
Currently I have recreated the default conditions as new predicates and disabled the real defaults. Some PayPal transactions work fine, others don't and decrement + email twice. This helped someone else somewhere...

For all affected Conditional Actions...

I have two Conditions groups. They are related with OR, so that the trigger fires if either group evaluates to TRUE.

1. The first group contains two Conditions, which are related with AND, so that the group evaluates to TRUE iff both conditions are true.

1.1 The first Condition in the first group is a Check the payment Method condition, and it is checking to see if this is a PayPal order.

1.2 The second Condition in the first group is a Check the order status condition, and it is checking to see if the status is "In checkout"

2. The second group contains just one Condition, so I've left it on the default relationship of AND (but it should make no difference!)

2.1 The Condition in the second group is a Check the payment method condition, and it is checking to see if this is NOT a PayPal order. I.e., the payment method ticked is PayPal, but the NEGATE box is also ticked.

That's it. The result: The conditional action fires either if the order was not placed through PayPal, or if it was PayPal but the order status was "In Checkout".

I should add that I only have two Payment Methods enabled - PayPal and Check, so I can't comment on what things like Authorize.NET would do. But I can say what you need to do with it. If any additional payment method turns out to be issuing duplicate e-mails, tick it in both the Payment Method Conditions (1.1 and 2.1). If it does not cause duplicate e-mails, leave it out of the equation.

Finally, on my store, I needed this on three Conditional Actions (all with the Customer Completes Checkout trigger). Those 3 Actions are:

  • E-mail customer checkout notification
  • E-mail admin checkout notification
  • Decrement stock upon order submission
jgoggan's picture
Offline
Joined: 09/17/2009
Juice: 43
Re: Stock Levels Decrease Twice with latest update 6.x-2.0

Thanks -- those Conditions will help me also.

However, just to be clear, there IS some sort of bug here, right? I mean, something is wrong in the PayPal or Checkout module somewhere, isn't it? Meaning, it seems that this still needs to be reported and fixed internally -- as opposed to setting up conditions to work around the problem, yes?

- John...

JamesOakley's picture
Offline
Joined: 06/04/2009
Juice: 25
jgoggan wrote: Thanks --
jgoggan wrote:

Thanks -- those Conditions will help me also.

However, just to be clear, there IS some sort of bug here, right? I mean, something is wrong in the PayPal or Checkout module somewhere, isn't it? Meaning, it seems that this still needs to be reported and fixed internally -- as opposed to setting up conditions to work around the problem, yes?

- John...

I believe so: http://drupal.org/node/644538, especially as the problem occurs with a brand-new "out of the box" 6.x-2.2 installation (http://drupal.org/node/644538#comment-2336754)

cookiesunshinex's picture
Offline
Joined: 10/14/2009
Juice: 127
Re: jgoggan wrote: Thanks --

I have fixed the double emails and notification to the user when they return from Paypal that an email could not be sent and that they needed to contact the administrator.

I used the conditional rules above to fix the issue.

However, I just installed uc_coupon and the double emails started again along with the error message on the screen when the users returns from paypal.

This only happens on orders where a customer uses a coupon code. It does not happen when customers do not use a coupon code.

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Re: jgoggan wrote: Thanks --

jgoggan - Thanks for your help, I have set up the conditional actions exactly as you describe. I'm awaiting new orders to see the results. Authorize.net has never been a problem so I left it out.

cookiesunshinex - I have the coupon module installed and I have seen that some PayPal orders are fine, others are not. I had the coupon module installed right from the start, as well as gift certificates, and PayPal was one of the last things I set up. I can't rule it out completely, but coupon usage is not a cause of my problems.

If you fixed the problem previously, but it came back after installing the coupon module, maybe redoing the CA changes might help? A previous post related to this topic or another (i have read so much in the last few weeks, I'm sorry i don't remember where) suggested re-creating the CA's or resetting them and making the changes again. Don't know why this would fix it, but I've seen that it did work for someone.

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
Re: Stock Levels Decrease Twice with latest update 6.x-2.0

I am having the same issue with Paypal WPS.

With the test credit card gateway emails are fine, they are sent only a single time.

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Re: Stock Levels Decrease Twice with latest update 6.x-2.0

As mentioned before, this definitely is a duplicate
http://drupal.org/node/644538