-
Notifications
You must be signed in to change notification settings - Fork 10
Home
stephencaosemene edited this page Jul 7, 2016
·
1 revision
The purpose of this plugin is to create a simple solution for connecting all the woocommerce stores in a multisite install. I am looking for such a solution myself and what I have found so far is unsatifactory. The concept is partly built on the process outlined in this article.
This is how I envision the plugin to work.
- Since woocommerce already saves the cart of each user in each site using the persistent cart, this will be retrieved and used to build the global cart.
- If this is too complicated, the hook
woocommerce_cart_updated
will be used to save/update our own cart as a user meta.(I suggest as an array with theblog id
as key and an array of theproduct ids
in the cart). Similarly, the hookwoocommerce_cart_emptied
will be used to empty our cart(for that blog) whenever the cart is emptied. - All cart pages will be redirected to a single cart page on the main site.
- On this page, the cart for each subsite will be displayed where coupons can be added to each cart. Shipping is also calculated per cart depending on the settings on the subsite.
- The there will be a checkbox for the user to select which carts to pay for.
- On checkout, orders are created in each affected subsite and set to pending. The order on the main site is a created with line items of the sub-orders order ids and the subsites on which they were created.
- After the user pays for the composite order through the main site, the sub-order statuses will be set to Complete, and the carts will be cleared.
I would love everyone to contribute to this. This is a pretty complex plugin and I need as much help as I can get. Thanks :)