The code uses a 'has_item' properly to decide weather or not a checkout page should be included in the progress bar. It hard sets this to TRUE for everything except commerce_payment_redirect. Other modules do a similar redirect technique (eg commerce_extra's login page), as can custom checkout pages/panes.

This module should respect the has_item property set on a checkout page's definition. This would allow us to set/unset this using hook_commerce_checkout_page_info_alter() or something similar to dynamically include/exclude checkout pages from showing in the progress bar.


webmasterkai’s picture

I agree. A patch or code snippet would be greatly appreciated. Thanks!

mrfelton’s picture

Status:Active» Needs review
new954 bytes

This does the trick.

mrfelton’s picture

Actually, I needed a little more than this, as we need to be able to alter the state based on attributes of the order, which we can not do from hook_commerce_checkout_page_info_alter() as it's no possible to get the $order object from there. See #1509450: Unable to load current order from hook_commerce_checkout_page_info_alter.

So, I added a drupal_alter function to allow other module to be able to directly alter the include/exclude state of checkout pages.

mrfelton’s picture

Updated patch fixes whitespace issue.

Simon Georges’s picture

I just closed #1438836: Show all checkout panes in progress as a duplicate of this one.

brephraim’s picture

OK, so how do I implement this?

As in, what is the specific line I need to set so that $page[page_id] will not display in the checkout progress bar?

And also, so I am sure, do I call mymodule_commerce_checkout_progress_get_items_alter(&$pages) ?

brephraim’s picture

I changed

drupal_alter('commerce_checkout_progress_items', $pages);


drupal_alter('commerce_checkout_progress_get_items', $pages);

in order to get things working.

deggertsen’s picture

Here's an updated patch against dev including the change in #7.

joelpittet’s picture

Issue summary:View changes
Status:Needs review» Reviewed & tested by the community

Been using this for a while. Thank you.

  • nvahalik committed 5f95de2 on 7.x-1.x authored by deggertsen
    Issue #1508472 by mrfelton, deggertsen: Ability to dynamically specify...
nvahalik’s picture

Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)

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