At the moment there is a silent dependency on commerce_cart if you want to display links:
function theme_commerce_checkout_progress_list($variables) {
...
// Option to display back pages as links.
if ($link) {
// Load the *shopping cart* order. It gets deleted on last page.
if ($order = commerce_cart_order_load($GLOBALS['user']->uid)) {
$order_id = $order->order_id;
}
}
...
}
Either the dependency should be declared in the .info or, better yet, we should wrap this in module_exists(). Along with this, would it not be better to pull the order from the active menu item if we are on the checkout pages?
Comments
Comment #1
andrewbelcher commentedHere is a patch implementing the suggested fix.
Comment #2
jcisio commentedThanks. Committed with a modification to keep it backward compatible: b1493e0.
Comment #4
andrewbelcher commentedThanks for committing this. However, I think the modification you made results in unexpected behavior. If you are in the checkout process for an order that isn't your 'cart' order, this will continue using the cart order.
Comment #5
andrewbelcher commentedHere's a patch that swaps them round to what I believe to be the correct precedent.
Comment #7
jcisio commentedI don't understand what could be "an order that isn't your 'cart' order". However I've committed a fix which logically fallback to commerce_cart if it can't detect $order from the URL.