Forums / Setting Up Categories, Products, Attributes / Link category to work same way as a linked product, possible?

Link category to work same way as a linked product, possible?

Locked

Started by dedj on 4 Jan 2008, 4:53 PM · Views: 1,069

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
4 Jan 2008, 4:53 PM
#1
dedj avatar

dedj

Zen Follower

Join Date:
Jan 2007
Posts:
129
Plugin Contributions:
0

Link category to work same way as a linked product, possible?

Hi.

I'm into cars, isn't it a way to link a category?

I'm having the webshop setup after carmodel.
example
audi
alfa romeo
bmw
chevrolet
dodge
ford

etc etc.

and in every carmodel category, I wan't to have a category called brakes.
and in brakes category i will have exactly the same products.
the products i will have under brakes is 975 products.

so instead of making xx amount of brakes categories, and linking 975 products under every brakes category under every car, it would be easier to set up 1 brakes category as wanted and link the actual brakes category under all the carmodels.

and whoosh it would be done in matter of minutes instead of linking 975 products many many many times :o)

so my question is
can this be done? hope for good news :D

4 Jan 2008, 4:59 PM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Link category to work same way as a linked product, possible?

The easy answer is unfortunately no, but with a little custom coding, and knowledge of PHP, the answer could be YES!

Basically, the products are linked to a number of categories, as they are all pulled from the products_to_categories table, where there is just a list of products, and a single entry for each category you would find them in. So if you have 100 products, and 5 categories, and each product is in each category, you would have 500 records in this table.

You would need to have the same thing coded in for your store, so that each time it tried to display the categories, rather than grabbing them using the category.parent_id field, it used your new database table.

The downside to this is there are a fairl few places you would have to update, as well as create something in the admin so that you could duplicate the categories easily.

Good luck,

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

6 Jan 2008, 8:01 PM
#3
dedj avatar

dedj

Zen Follower

Join Date:
Jan 2007
Posts:
129
Plugin Contributions:
0

Re: Link category to work same way as a linked product, possible?

nice.
I know a friend that knows php pretty good.
But as you said, the downside to make it easy doable over and over again when you need to duplicate a category.

This should definately be a suggestion to coming zencart version upgrades :D

thanks
Dejan