So im building a multi vendor ecommerce website and having this issue

and how do we assign another datatype where the sellers and the customers data get stored in such a way that when we introduce a product that specific product gets assigned to their respective seller or like for example in a multi vendor website when a customer places an order on two different products from two different websites the order request goes to the specific sellers off the specific product

Think this way. You already have it explained. You have products P1, P2, Now you have suppliers S1, S2. You have one Client C1.
Now relate one product to many suppliers. You have P1S1, P1S2, P2S1 and P2S2. How client will related to a product? Never C1P1, instead create a thing where you have C1P1S1, C1P1S2 and all the combinations. Now add client C2, C3 etc. As long as this relationship is maintained in below things in one database you are good. Products (uid P1), Suppliers (uid S1), customer (usid C1), ProductSuppliers(uid P1S1), CustomersProductSuppliers (uid C1P1S1).

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.