diff --git a/commerce_checkout_progress.module b/commerce_checkout_progress.module index b1a1bac..e3f211b 100644 --- a/commerce_checkout_progress.module +++ b/commerce_checkout_progress.module @@ -33,11 +33,6 @@ function commerce_checkout_progress_block_view($delta = 'indication') { if ($delta === 'indication') { // Get the current page that was created/stored earlier by commerce checkout. $page_id = commerce_checkout_progress_commerce_checkout_router(); - - if (empty($page_id) && variable_get('commerce_checkout_progress_cart', FALSE) && $_GET['q'] = 'cart') { - $page_id = 'cart'; - } - $block_pages = variable_get('commerce_checkout_progress_block_pages', array()); // on block configuration page, use select nothing, it mean, we need @@ -59,6 +54,12 @@ function commerce_checkout_progress_block_view($delta = 'indication') { if ($visible) { // Get non-empty pages. $pages = commerce_checkout_progress_get_items(); + if (empty($page_id)) { + if (!isset($pages['cart'])) { + return; + } + $page_id = 'cart'; + } $content = array( '#theme' => 'commerce_checkout_progress_list', '#items' => $pages,