Post by chapster5 » Wed Jul 31, 2013 5:00 pm

I know it has been covered before but there was no definitive answer. We are building a car parts website and we want to be able to look through the parts either by manufacturer or by part type so...

By Make
-Vauxhall
--Corsa B
--Corsa C
--Corsa D
--Astra H
--Astra G

By Part
-Gaskets
--Head Gasket
---Vauxhall
----Corsa B
----Corsa C
----Corsa D
----Astra H
----Astra G


Now yeah... We could create multiple sub categories and assign them to Find by Make and Head Gasket but each model of car say Corsa B has a lot of filters to it (engine codes, engine size, fuel type) which we would then have to re-enter into each sub category it simply isn't efficient.

So as you can see being able to have multiple category parents is essential for us... Any ideas would be awesome.

Nick

New member

Posts

Joined
Thu Apr 04, 2013 7:30 am

Post by labeshops » Wed Jul 31, 2013 8:20 pm

I manually code my categories in each of the stores header.tpl files so I can mix them up anyway I want and include the same subcat under the main category of my choice. It's actually only under 1 "real" main category, but by manually coding my menu bars, I can put it under any one on the menu I want regardless of what parent category it actually has. This lets me use the same subcats in different ways on my different stores without each store having to have a parent/category structure.

Hope that makes sense lol

Running Opencart v3.0.3.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by ogun » Wed Jul 31, 2013 8:48 pm

Off the top of my head:

Not 100% clear on what's required, but does the catalog content change frequently?

If it doesn't then you could use a database query to create the category information and save yourself some of the data entry through the admin panel.

If it does (and it would be too much of a ballache to update by hand or you don't have any means of automating a query to handle the update) then have a search of the extensions store to see if anyone's created a multi-category system (I remember there being one years ago, so there are probably more now).

Or,.. on a variation of labeshops' post, what about adding a category_type column to the category table? It sounds like it's only the top-level that needs to change - so if you had a category type, you could duplicate and modify the 'category' module (or whatever's generating your menu) to look up categories with a specific category_type, e.g. 1 for "Find by Make" and 2 for "Find by Part".

If you didn't want to modify the tables and only have those two top-level categories (make and part) to worry about, you could use the 'top' value - and have one category module looking for top = '1' and the other looking for 'top' = 0.

Active Member

Posts

Joined
Tue Aug 14, 2007 6:04 am

Post by chapster5 » Wed Jul 31, 2013 10:08 pm

Thanks for the replies guys I dont actually have much experience with PHP so a lot of this isn't making sense to me :( I am mearly HTML and CSS lol!

New member

Posts

Joined
Thu Apr 04, 2013 7:30 am

Post by labeshops » Wed Jul 31, 2013 11:54 pm

chapster5 wrote:Thanks for the replies guys I dont actually have much experience with PHP so a lot of this isn't making sense to me :( I am mearly HTML and CSS lol!
Which is why it was easier for me to hand code them in the menu section of header.tpl - I'm not great with PHP either lol. I hand coded them in html mixing and matching top categories and sub categories on each store.

Running Opencart v3.0.3.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by chapster5 » Wed Jul 31, 2013 11:59 pm

Any chance for a PM with a snippit of your code please?

New member

Posts

Joined
Thu Apr 04, 2013 7:30 am
Who is online

Users browsing this forum: No registered users and 92 guests