Guest Posted December 17, 2008 Share Posted December 17, 2008 Hi, think my title says it all... basically at the moment i have: Home >> >> Product But want: Home >> Category >> Product Basically its just placing the spacer image at the moment and ITS DRIVING ME CRAZY. Please can someone help me. Ta x Caroline Link to comment Share on other sites More sharing options...
Hotclutch Posted December 17, 2008 Share Posted December 17, 2008 Hi, think my title says it all... basically at the moment i have: Home >> >> Product But want: Home >> Category >> Product Basically its just placing the spacer image at the moment and ITS DRIVING ME CRAZY. Please can someone help me. Ta x Caroline Compare what you have in your catalog\includes\application_top.php with what's in the standard file // include the breadcrumb class and start the breadcrumb trail require(DIR_WS_CLASSES . 'breadcrumb.php'); $breadcrumb = new breadcrumb; $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } This will give you the full path including model no of the product in your breadcrumb trail, then search the forum or contribution section to change from model to product name if you want. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2008 Share Posted December 17, 2008 hi thanks for the code i have got it now with what you put to display Top >> Home >> Category >> Model >> Product Name I am gonna search for how to change it to (remove the top, keeping home,category, remove the model no and display the product name) so: Home >> Category >> Product Name Unless you know what i have to remove from the code you submitted, thanks for your reply anyhow i am 3/4 the way there. :) Link to comment Share on other sites More sharing options...
Hotclutch Posted December 17, 2008 Share Posted December 17, 2008 hi thanks for the code i have got it now with what you put to display Top >> Home >> Category >> Model >> Product Name I am gonna search for how to change it to (remove the top, keeping home,category, remove the model no and display the product name) so: Home >> Category >> Product Name Unless you know what i have to remove from the code you submitted, thanks for your reply anyhow i am 3/4 the way there. :) I am not sure how your installation was modified to give you that breadcrumb trail. BTW the definition for TOP is found in your catalog\includes\languages\english.php define('HEADER_TITLE_TOP', 'Home'); Look in the contributions for breadcrumb + product name, to get name instead of model displayed in the trail. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2008 Share Posted December 17, 2008 cool got it all sorted, :) very happy so thanks very much. I basically replaced my code with yours for that section then identifies which was which comand and // got rid of the ones i didnt want. Many thanks and if someone else comes across this issue hope it helps you too. Ta x Caroline Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.