When a user enters CHECKOUT from the shopping cart and then presses Cancel, the order remains in the IN_CHECKOUT status even though an admin comment is added that the user canceled the order. Shouldn't the status be changed to CANCELED?

Comments in uc_cart_checkout_form for the cancel button (Line 294) indicate "Disable validation to prevent a new order from being created". However the submit function uc_cart_checkout_form_cancel does an unset($_SESSION['cart_order']) which will cause a new cart order to be generated the next time they checkout.

I am not sure what was intended, but the current action is contradictory. Either remove the unset or change the status.

Comments

longwave’s picture

Component: Code » Cart/checkout
Category: Bug report » Feature request

The "canceled" order status is meant for use by administrators, to manually mark orders that may have progressed to any other status as canceled. "In checkout" orders, whether they were deliberately canceled or just abandoned, will eventually be marked as "abandoned" 24 hours later, and I am not sure it makes sense to explicitly seperate the two as they are effectively the same thing.

However I agree that this is a little confusing, so here's a suggested improvement: add a Rules action for "an order has been canceled from the checkout page", and then you could set the status, delete the order, or do anything else at all when this action is taken.

TR’s picture

Version: 7.x-3.6 » 8.x-4.x-dev
TR’s picture

Status: Active » Closed (works as designed)