saleor / saleor

Saleor Core: the high performance, composable, headless commerce API.
https://saleor.io
BSD 3-Clause "New" or "Revised" License
20.86k stars 5.53k forks source link

Support adding product to multiple categories #5350

Closed khalibloo closed 2 years ago

khalibloo commented 4 years ago

What I'm trying to achieve

We sometimes run into situations where a single product can fall into multiple categories. Depending on how the category tree has been modeled, the categories may not even be closely related. For example, a laptop bag may be rightly classified under computer/electronics as well as under school bags. Other common examples are fashion products that belong in both "men" and "women" categories. Related: https://github.com/mirumee/saleor/issues/278

Describe a proposed solution

Allow a product to belong to multiple categories.

Other solutions I've tried and won't work

Collections do not quite fit this situation. When a user browses through a store, categories have the advantage of being organized in a tree structure, and therefore easier to understand.

karolkielecki commented 4 years ago

Hi there! Thank you for your suggestion. You can assign only one category to one product for now. We will discuss your feedback. Thanks!

maarcingebala commented 4 years ago

It's not on our nearest roadmap but I think we'll need it anyway at some point.

amesas commented 4 years ago

Is this "some point" in a near horizon? :P

khalibloo commented 4 years ago

For my newer saleor projects, I'm ditching categories for the storefronts. I use collections and navigation menus to achieve the same hierarchical arrangement as categories, but with the flexibility of being able to assign products to multiple collections.

It is a chore to have to manually make large navigation menus, though. There's a bug on the dashboard where the menu items "fight back" whenever you try to sort them. So I often just do this from the django shell.

amesas commented 4 years ago

We use custom storefront, and our categories tree is "complex".

Right now trying to figure how to import and sync more than 150k products.

Izayda commented 4 years ago

We use custom storefront, and our categories tree is "complex".

Right now trying to figure how to import and sync more than 150k products.

How did you realize that?

amesas commented 4 years ago

@Izayda still not solved, when i refer to our categories tree, i'm talking about our real catalogue, not Saleor's one.

We need to find a way to mimic the same hierarchical structure. Maybe using collections metadata and setting a "parent collection". But performance is a concern here.

gorjan-mishevski commented 3 years ago

Its a shame this is not present given there are discussions from 2015. Most of all e commerce sites have this. Such a basic and crucial feature. Maybe its quite difficult to add it on the existing saleor core.

narayanpromax commented 2 years ago

This is a basic feature for all e-Commerce. one to many mapping need to be done from 1 product to multiple categories in DB

TurkaljGoran commented 2 years ago

Hello,

is there any update on this, possibly on the horizon?