Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Breadcrumb


lemonsensation

Recommended Posts

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

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

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

 

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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...