Hi all,
I'm sure everyone knows and remembers yellow1912's contribution (combined with Simple Category Tree) - a function that displayed all products of a main category's sub-categories within the main category itself (what a hell of a way to explain that, sorry).
Anyway - while the code provided works great, the problem is that:
If you have 10 Sub-Categories, each with 10 Products in them - when a customer opens the Main Category - he's going to have a total of 100 products shoved in his/her face. Other than that, I'm sure that, apart from the flood of products, your database would be put through quite a load each time a Main Category page is opened.
I've decided to take this approach:
Have all products within a main category listed in a sub-category called "All Products".
Then created product links to the various products in "All Products" to the various other appropriate sub-categories.
The only thing I need to figure out, is to get the "All Products" sub-category to be opened automatically when the main category is visited.
For illustrative purposes.
My website has one category:
1. Cars
Within Cars, I have 4 Categories:
1a. Audi
1b. BMW
1c. Mercedes
1d. All Products
All the products are listed in "All Products" - and then product links are created to apply them to the Audi, BMW and Mercedes Category.
When I click on Cars, which is the main category, it must automatically open up "All Products".
The simplest way to do this, I know would be to set up redirects. But SEO doesn't like redirects. The other way would probably be to write to the .htaccess - but this wouldn't be practical, and there would be too much manual work involved every time you have a new category.
Any Advice?
I should point out that I'd like to be able to drill further as well.
If for example, the BMW sub-category has sub-categories of its own, namely:
i. Parts
ii. Stying
iii. All Products
See where this is going? I'd want the sub-category to also open up with its' own "All Products" sub-category.



Reply With Quote
