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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewbelcher’s picture

Status: Active » Needs review
FileSize
1.41 KB

Here is a patch implementing the suggested fix.

jcisio’s picture

Issue summary: View changes
Status: Needs review » Fixed

Thanks. Committed with a modification to keep it backward compatible: b1493e0.

Status: Fixed » Closed (fixed)

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

andrewbelcher’s picture

Status: Closed (fixed) » Needs work

Thanks 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.

andrewbelcher’s picture

Status: Needs work » Needs review
FileSize
1.12 KB

Here's a patch that swaps them round to what I believe to be the correct precedent.

  • jcisio committed 41b1b99 on 7.x-1.x
    Issue #1948096 by andrewbelcher: Silent and unneccesary dependency on...
jcisio’s picture

Status: Needs review » Fixed

I 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.

Status: Fixed » Closed (fixed)

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