lemonsensation Posted February 25, 2005 Share Posted February 25, 2005 In the picture the item number is ADA4105. The breadcrumb shows the item number but I want it to show the item name which is Big Mama. Currently Top >> Catalog >> Farm Girl >> ADA4105 I want Top >> Catalog >> Farm Girl >> Big Mama Is this possible? Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2005 Share Posted February 25, 2005 In includes/application_top.php look for this code: // 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'])); } } and replace with this: // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($product_query)) { $product = tep_db_fetch_array($model_query); $breadcrumb->add($product['products_name']); } } Bobby Link to comment Share on other sites More sharing options...
lemonsensation Posted February 27, 2005 Author Share Posted February 27, 2005 For whatever reason that gave me a syntax error. I found another thread that talked about this same breadcrumb change... I should have searched more thoroughly first. :-" Well the code I used was this and it worked. if ($HTTP_GET_VARS['products_id']) { $product_bc_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); $product_bc = tep_db_fetch_array($product_bc_query); $breadcrumb->add($product_bc['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); // set which precautions should be checked } Link to comment Share on other sites More sharing options...
241 Posted February 27, 2005 Share Posted February 27, 2005 In includes/application_top.php look for this code: // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($product_query)) { $product = tep_db_fetch_array($model_query); $breadcrumb->add($product['products_name']); } } Bobby <{POST_SNAPBACK}> The error being from tep_db_fetch_array($model_query); which does not exist, as it was replaced by $product_query = tep_db_query No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2005 Share Posted February 27, 2005 oops... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.