This topic contains 5 reply and 4 voices, and was last updated by Lahcen B. 5 years ago
Viewing 5 Posts - 1 through 5 (of 5 total)
Author Posts
October 2, 2014 at 2:47 am 27871
Lahcen B. I bought 3 items in Ebay from 3 different sellers in the same order and paied with paypal once. But in my paypal i see them as 3 different payments to the sellers and not to ebay. But for Dokan I think you are making the payment for the main order and not for the suborders. That is why you had to impose the single seller mode in your Dokan PayPal Adaptive Payments plugin ( which is not good and the marketplace will loose its value if you force the buyer to only buy from one seller at once. Also that is why the myCred Escrow will not work with Dokan ( You should split the order and create suborders first then make the payments for each suborder and not pay before splitting. That is how it should work i think. Ebay is doing like that. May be you should use the woocommerce filter "woocommerce_create_order" which is meant for that. Eid Mubarek and happy vacation.
October 2, 2014 at 7:39 am 27875
Mahi Mahi

Thank you for great suggestions Lahcen. We are desperately looking for a solution for this. Will forward it to dev team to dig more.


October 3, 2014 at 4:42 pm 27952
Lahcen B. Lahcen B.

See in this screenshot how ebay splits the cart view by seller:

You can do them for woocommerce cart by personalizing it to group items by seller.
If the buyer chooses to pay only one seller then you create only one order and pay it, and remove the paid items from the cart but let others from other sellers in the cart.
If the seller pays all items then you should use the filter woocommerce_create_order in the function create_order() of the class WC_Checkout (file includes/class-wc-checkout.php line 161)
You create one suborder per seller then create the main order and make it the parent order and return its id, that way, Woocommerce won’t create any order. you can see how that function ( WC_Checkout.create_order() ) is coded to use the same logic.

October 14, 2014 at 12:54 pm 28345
Sekander Badsha Sekander Badsha

We really appreciate your awesome suggestions. I will personally discuss with our developer team about these features.
Thank You 😀

October 14, 2014 at 5:05 pm 28371
Tareq Hasan Tareq Hasan

Thanks for the suggestions Lahcen, could you post a screenshot of the transaction lists from PayPal. And I guess you authorize the payments first in PayPal, then you finally purchase the products? That way PayPal can create as many transactions they want?

October 14, 2014 at 10:01 pm 28395
Lahcen B. Lahcen B.

Tareq, there is nothing special in the paypal transactions list, this is what i see for the items that were in the same order:

JUL 29 2014   eBay - Synergy Fulfillment Services Inc     - $0.78 USD
JUL 29 2014   eBay - shen zhen song hua dian zi ke ji     - $7.26 USD
JUL 29 2014   eBay - 高 汉华                               - $17.20 USD

For the process, it is the same as woocommerce, i first added the items to the cart then view the cart and click on Checkout, it will take me to paypal where i see the logo of Ebay and a one total amount of all the orders i click pay and it is done.

You can see how is this explained in the PayPal API, and i think the one that you are after is called
Parallel Payment. See it here:

May be you should try this yourself try to by two items or three of 1$ each and see how it happen.

For woocommerce orders, I think there is another solution that you can do, try only creating separate orders and do not create any parent order (Ebay does not create parent order) because this parent order will make your plugin incompatible with any other plugin that do further treatment on the created order. Think of FreshBooks plugin for example, which will automatically create an invoice in the FreshBook account of the store owner, it will certainly not work with the Dokan plugin because it will only see the parent order.

Viewing 5 Posts - 1 through 5 (of 5 total)