Jump to content

link to products belonging to more than one category?


stratboy
 Share

Recommended Posts

Hi, I've got a category structure like this:

 

Category 1

- Category 2

- Category 3

 

Category 4

- Category 5

- Category 6

 

Category 7

Category 8

 

And wanna show all the products that belong to Category 8 AND Category 3. Category 8 is not a child of 3.

 

How can I do it? How (first of all) can I build the relative link?

Share this post


Link to post
Share on other sites

when customer click on category 3 you want to display products from category 8 + category 3 ?

and when someone click on category 8 you want to display products from category 8 + category 3 ?

Share this post


Link to post
Share on other sites

Yes. That's because I've got a catalogue with product styles that belong to collection. Then every style have shared products categories. For example:

 

The real (and that's not the way i set up categories in prestashop) product catalogue is like this:

 

Collection 1

> style 1

* type 1

* type 2

 

> style 2

* type 1

* type 2

 

Collection 2

> style 3

* type 1

* type 2

 

> style 4

* type 1

* type 2

 

So, say, collection Must Have has Classica and Rock styles. To both styles, belong earrings and bracelets.

 

The customer should then be able to select products in both of these ways:

 

a. All the bracelets (despite of collection and style they belong)

 

b. Only the bracelets that belong to Style Rock of Collection Must Have (Must have > Rock > bracelets).

 

In prestashop, if I want case a., then the bracelets category should not be nested in any other category. Like this:

 

Must Have (collection)

> Rock (style)

> Classica (style)

 

Fashion (collection)

> Jazz (style)

> Reggae (style)

 

Bracelets (type)

Earrings (type)

 

Otherwise, if I had a subcategory bracelets for every style category (Classica/bracelets, Rock/bracelets), they would have maybe the same name, but different ID, so in fact they would be different categories.

 

So, to recall, if I keep bracelets as a 'stand alone', not nested category, I have no problem in achieving a. But to achieve b., I have to select products that belong both, say, to Rock AND Bracelets categories.

Share this post


Link to post
Share on other sites

you can try to add products from category 8 to category 3, and products from category 3 to category 8

if you don't want to reconfigure products - in this case it is necessary to change the controllers, there is no other way to achieve this (by default feature for that doesnt exist)

Share this post


Link to post
Share on other sites

  • 2 months later...

Hi Strat and Vekia,

I've been loosing the last hour trying to figure out the best solution for a scenario like Strat's

Maybe I found a workaround on this subject:

 

How about using the "supplier" or "manufaturer" menu (whichever you don't use) and changing it to "style"?

In the next hour or soo I'll try this out and see if something doesn't fit....

Share this post


Link to post
Share on other sites

Hi Strat and Vekia,

I've been loosing the last hour trying to figure out the best solution for a scenario like Strat's

Maybe I found a workaround on this subject:

 

How about using the "supplier" or "manufaturer" menu (whichever you don't use) and changing it to "style"?

In the next hour or soo I'll try this out and see if something doesn't fit....

 

Hi, I ended up assigning products both to category 3 and 8. That's a bit of replication, like the following show, but it's ok..

 

categories setup:

collection 1
   dishes
   glasses
collection 2
   dishes
   glasses

types
   dishes
   glasses

---

than, say I've got product in collection 1 > glasses, and I've got 2 menus, one by collections, one by 'types'.

To make a product be listed both under collections > collection 1 glasses AND types > glasses, I will assign it

to both collection 1 > glasses AND types > glasses.

  

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hi,

how does that display on the product list page?

ex. if you're in collection1 and click on dishes

did you achieve to link in someway to dishes of collection 2?

I don't know. I can do it, though. I mean, I absolutely do not use any preset theme. I use only custom themes made by me. First design, then program. So I've got a modified category.tpl file. I can group and separate products just as I want by overriding the controller, or maybe there are already enough smarty vars to do it, I don't know.

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More