Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

breadcrumb


yesudo

Recommended Posts

Posted

for some reason the breadcrumb on my site shows the products model number rather than the product name.

 

 

HOME ? Catalog ? Puzzle Me This ? 301003-69

 

instead of

 

HOME ? Catalog ? Puzzle Me This ? Product Name

 

I have looked at the breadcrumb class but cannot understand how the breadcrumb is built - to be able to amend this.

 

Can anyone advise please.

 

Many thanx.

Your online success is Paramount.

Posted

Looks like I need to amend the function

 

function add

 

but cannot locate the file it is in?

Your online success is Paramount.

Posted

in includes/application_top.php:

 

change:

 

// 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']));

 

to:

// add the products model to the breadcrumb trail
 if (isset($HTTP_GET_VARS['products_id'])) {
   $name_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($name_query)) {
     $name = tep_db_fetch_array($name_query);
     $breadcrumb->add($name['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS[

'products_id']));

Your online success is Paramount.

Archived

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

×
×
  • Create New...