0

What would be the best way to link products and customers.

I want that all products are assigned to customers. So customers can create their own products. As I am new to Magento I can think of 2 ways:

  • Creating a new table where I link customer ID and product ID
  • Creating a product attribute (EAV) for customer ID with a custom backend model.

What are the pros and cons of them?

As EAV consists of many tables I am afraid that it can become slow. At the same time, Magento EAV has a lot of features that could be beneficial.

  • It would be advisable to create a custom table it will be much faster compared to the EAV structure and don't even think custom backend model will do the trick because you may have many to many relation, one customer can have many products and one product can have many customers, am I right? – Yash Patadia Feb 10 '20 at 5:00
  • I don't think there is enough information about what you are trying to accomplish. Either could work better, depending on multiple unknown factors. One clear upside of using an attribute is that all the CRUD handling already exists. A custom table will require custom methods of managing the data. – jiheison Feb 10 '20 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.