A few Ubercart users have been experiencing the following difficulty with the occasional order being completed without shipping fees added. It took some time to locate the source of the problem and reproduce it.

See: http://www.ubercart.org/forum/support/6239/customer_can_complete_checkou...

Thanks to this thread, I've discovered if an invalid coupon code is entered and the Review button is clicked the user ends up on the REVIEW page with an error message saying to click the BACK button and try again.

However, the order is then missing shipping and taxes and can be completed by the user.

This very simple patch uses drupal_goto() to redirect the user back to 'cart/checkout' to avoid the possibility of order completion without shipping and taxes included. Also, the error message is changed slightly to describe the new scenario.

This is my first patch ever, I'm not sure if this is the correct approach to solving the problem. Any feedback is appreciated. Hope it's helpful. It seems to work for me.

CommentFileSizeAuthor
uc_coupon.patch868 bytessleepingmonk

Comments

sleepingmonk’s picture

Title: Invalid coupon code. » Invalid coupon code allows orders to complete without shipping or tax charges.

Made title more descriptive.

webmasterkai’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the patch. It works.

Also, I'm willing to co-maintain this module.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

This has been reworked and should be fixed in the latest -dev release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.