Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Only show selected categories in cat infobox


maz

Recommended Posts

I have been looking for ages for a categories infobox which will only list certain categories selectively....

Look at this site:

 

http://www.hechts.com/gifts/OnlineShopping...&cm_id=hdr_logo

 

Its got a menu bar across the top with main categories and subcategories as dropdowns. When one clicks any main category 'women', for example, on the next page the categories infobox in the left hand column ONLY shows selected categories and subcategories related to women. The same applies if category 'men' is selected from the top navigation bar.... and so on.

 

Is there a contribution our there taht does this? Even some code would be ok and i could create a new infobox. Any advice would be appreciated.

 

Many thanks.

Link to comment
Share on other sites

Should be fairly simple to achieve. Assume you have a top navigation bar where you show top categories only. Then in the boxes/categories.php you modify the code to match the sub categories of the selected category in the top navigation bar. Use the following function (located in functions/general.php)

 

tep_has_category_subcategories - to check if there are subdirs.

tep_get_category_tree - grab a copy from the admin section place it in the catalog general.php then call it with the selected top category as input to generate the subtree.

 

Finally show only the subtree the last function returns in the infobox.

Link to comment
Share on other sites

There is a faily new contribution that allows you to have multible category boxes where you can pick and choose which categories show up where.

 

I think if you do a search for multible boxes it comes up but I can't remember for sure.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...