Answer the question
In order to leave comments, you need to log in
YII2 add product to different categories?
Hello, how to implement the functionality of adding products to different categories. well, i.e. one product that would belong to several categories. And is it possible to do this on this engine?
Unfortunately, I am not familiar with this engine at all. I don't even know where to look
Answer the question
In order to leave comments, you need to log in
Is it even possible to do this on this engine?
Yii2 is not an engine, but a framework. Regarding your question - the problem here is not the framework level, but the database design level. It is enough to create three tables
products
----------
id
name
...
categories
------------
id
name
...
products_categories
------------------------
product_id
category_id
YII is not an engine. Don't look there.
There is light at the end of the tunnel, but years before it. I'm not exaggerating.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question