Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add a category path on the product_info page


Guest

Recommended Posts

http://shop.kb-online.co.uk

 

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)

http://shop.kb-online.co.uk/marchiorosize-...ige-p-2691.html

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?

regards

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?

 

jon

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...