diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 35a209208..57eb6d50a 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -397,20 +397,20 @@ $oscTemplate = new oscTemplate(); // calculate category path + $cPath = ''; + if ( isset($_GET['cPath']) ) { $cPath = $_GET['cPath']; } elseif ( isset($_GET['products_id']) && !isset($_GET['manufacturers_id']) ) { $cPath = tep_get_product_path($_GET['products_id']); - } else { - $cPath = ''; } + $current_category_id = 0; + if ( !empty($cPath) ) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; - } else { - $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail