Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Add a category path on the product_info page


Recommended Posts



you will see when you go on a product

above the image the 'Category' however i want the Category path (including main / subs etc)


for example:

product: (Marchioro)(Size 1) Skipper Wire Door Pet Carrier (Red/Beige)


The Categories you go through to get to the product are

Pet Products > Dog Products > Kennels / Cages

It displays as Kennels / Cages, however i want the full path to the product, so for it to look like something like :

Pet Products > Dog Products > Kennels / Cages


at the moment the code is:

on product_info.info


Category: <?= $category['categories_name'];?>


$categories_name_query = tep_db_query("select p.products_id, cd.categories_name from " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and p2c.products_id = p.products_id and p2c.categories_id = cd.categories_id");


$category = tep_db_fetch_array($categories_name_query);



any one help?


Link to comment
Share on other sites

You're looking for the "Breadcrumb," normally in includes/header.php. It gives the visitor a visual "path" like what you describe.


Pet Products » Dog products » Kennels / Cages » (Marchioro)(Size 1) Skipper Wire Door Pet Carrier (Red/Beige)


Do you have anything like the following in that file?


<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>


I know you're using a template. Did it come with something like includes/classes/breadcrumb.php?



It's all just ones and zeros....

Link to comment
Share on other sites


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

  • Create New...