Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When a payment is entered the system sends out a new order mail as well.
This was not happening on the version of september 1st...
Not sure what triggers the rules....
Comments
Comment #1
bwynants CreditAttribution: bwynants commentedthis only happens for existing orders!
new orders are fine...
uc_cart_complete_sale triggers uc_checkout_complete event when $order->data['complete_sale'] is empty....
guess complete_sale was not there before....
Comment #2
longwaveThis was part of the fix for #1192018: Duplicate order notification e-mail, and duplicate stock decrement
I hadn't considered existing orders like that; most orders receive payment shortly after being made, but I guess in the case of check payments that isn't necessarily the case. Are you using checks or another payment method here?
Comment #3
bwynants CreditAttribution: bwynants commentedyes, i fixed the database and set complete_sale as logged_in for all my existing orders....
update uc_orders set data = 'a:1:{s:13:"complete_sale";s:9:"logged_in";}' where data = 'a:0:{}' and order_status != 'in_checkout'
and a few more querys like that...
that will fix it ....
Comment #4
longwaveI think this will also happen if you create a new order from the admin side, then enter a payment against it.
Comment #5
mitrpaka CreditAttribution: mitrpaka commentedFix for #1192018: Duplicate order notification e-mail, and duplicate stock decrement causes similar type of regression in 6.x-2.7 for all payment methods where payment is entered the system before calling uc_cart_complete_sale() function.
As a result of that new order mail and stock is decreased twice. 1st time when entering payments using uc_payment_enter() and 2nd time when uc_cart_complete_sale() called.
Quick workaround for this seems to be either commenting out uc_cart_complete_sale($order); line from uc_payment_enter() function (that was added part of the fix) or call uc_cart_complete_sale_account($order) function instead (in order to ensure that user account created before payment is made)
Comment #6
longwave#5 is untrue, SimpleTests prove this; appears it was a problem in 2Checkout (and derived modules) only.
Closing as duplicate of #1340782: In 6.x-2.7 entering payment now causes email to be sent out which is more detailed.
Comment #7
longwaveFixing status