Help with a multistore ecommerce site best route
Hey, everyone. I have a site I am working on that I am stuck at a point and I am trying to figure out a solution for this, but not sure on the best solutions. It will be a site similar to a multistore ecommerce site – such as Etsy. Any help with this would be much appreciated. I have looked at the commerce marketplace module but I need other modules that don't currently work with an entity type.
I am using Drupal Commerce with the Commerce Order Types module and Organic Groups, plus other modules. I have 2 solutions for this but I am not sure which would be the best one. I am thinking the 2nd route probably would be the best.
The way I have this set up:
- I have a content type store (calling Brand) – node / og group.
- I have a commerce product (calling Variant) – entity bundle.
- I have a content type (calling Product) – node / og group node.
The way the site flow works:
- Brand Owner can create a Brand (group) which they can only create one – thru node limit.
- To add a product the Brand Owner, will need to create a variant first with all the product's info.
- Then after that the Brand Owner will need to create a product node type, which uses the entity reference -field (called field_product_variation) to reference the associated variant type.
I have thought of trying this route. For an authenticated user after they added product/products to the order. Problem: How to separate if there are multiple products from multiple brands (venders).
- Order Type (called Brand Order) that has an entity reference field (called field_cmp_o_store) that references the parent Brand/Brands the product/products are associated with.
- I am hoping to do this on the creation of a new order type ( Brand Order):
- The entity reference field ( field_cmp_o_store) is prepopulated with the associated Brand the product/products is from.
Probably going to go this route. The associated (through entity reference field) Brand is not done on the order creation. Reason: Easier solution to figure the Brand owners per variants (products) on the creation of order.
- On the creation of a variant (product entity) by the brand owner. Through the entity reference field that is associated with the parent (Brand – Organic Group). The entity reference field ( field_brand_reference) is prepopulated with the associated Brand the product is associated with.
How can I set it up so on the creation of a variant (product) by a brand owner the entity reference field is prepopulated with the Brand Owner's associated brand ( group id). In code.
What would be the easiest solution for this.... to credit (send them their money per sale) each vender after the order has been created. Plus, this will work were the vender handles shipping, ect. And the the overall site will take a percentage per each individual product being sold. Any ideas how to set this up?