Problem occur when discount line item should be deleted first before re-apply in checkout review page.

This issue related with bug reported happen in Drupal 6. I have applied the same solution from patch in D7 alpha-3 version.

The problem solved which make the discount applied only once.

CommentFileSizeAuthor
fix.discount_applied_twice_d7.patch2.8 KBparasolx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

overbythere’s picture

This fixed the issue for me too, could this be committed into the live version?

chnewso’s picture

This work for me as well - THANK YOU!

parasolx’s picture

Status: Needs review » Reviewed & tested by the community

I change the status to RTC.

Stoob’s picture

I was having trouble with a role-discount applied a second time on checkout when someone pressed the "Click to calculate discounts" button. To clarify the role-discount was already applied automatically, it was added double when someone pressed this button.

Reviewing the above patch, some of the work seemed unnecessary. This single line replacement was all that was required to fix the issue.

-        $order->line_items = $new_order_line_items;
+        $order->line_items = uc_order_load_line_items($order, TRUE);
DrCord’s picture

Patch worked for me as well.

Charindu_J’s picture

i have applied the patch and i'm still getting this error. It's not happening occasionally. anybody has any idea why?

hockey2112’s picture

Thanks this seems to have fixed the issue I was having... when the "click to calculate discounts" button was clicked multiple times, it was allowing the discount to be applied more than once.