Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fixing category displayed (expanded) in categories.php


Guest

Recommended Posts

Posted

Hello All

 

I am creating a unique page in my shop based on the information pages such as conditions etc and would like to have a particular category expanded in my catalog navigation.

 

I'm think of creating a new column_left.php file pointing to a customised categories.php file but I have no idea how to make categories.php display the expanded category as my page doesn't form part of the catalog.

 

Does anyone know how to "set" the category category.php shows expanded?

 

Thanks

 

Paul

Posted

Hello All

 

Just a bit more info, after looking at categories php I'm assuming I need to set a variable to the id of the category I wish to be expanded.

 

I have tried editing the following and none of them work.

 

$tree

$categories_string

$cPath_array

$aa;

 

Setting these variables toward the top of categories.php does either nothing or causes an error to occur.

 

Anyone know what I need to do here?

 

Thanks

 

Paul

Posted

Add the following two lines to the beginning of the output of your new category box:

 

$cPath = 3;
 $cPath_array = tep_parse_category_path($cPath);

 

Where 3 is the Id of the category you want to display.

Posted
Add the following two lines to the beginning of the output of your new category box:

 

$cPath = 3;
 $cPath_array = tep_parse_category_path($cPath);

 

Where 3 is the Id of the category you want to display.

 

Mr Honka

 

You are a genius, that worked perfectly.

 

Thanks a lot.

 

Cheers

 

Paul

Archived

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

×
×
  • Create New...