Tags/topics: 
1
Answers
Vote up!
1
Vote down!

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.

------

Route 1
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.

------

Route 2
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.

Question:
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.

-----

Last question.
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?

Asked by: gdbwb05
on September 14, 2015

1 Answer

Vote up!
0
Vote down!

I built something similar using the standard commerce modules plus a lot of custom coding, no organic groups. We're generating split orders after each sale so each shop and product owner get their share. We have 4 entities sharing the total of a sale. It's a lot to talk about so drop me a line if you need more info. nick - digitaltrotter.com

Answer by: Nick
Posted: Sep 15, 2015