Hi All,
I am creating a customized shopping cart for my Wix Stores. I want to know the wix stores checkout work flow or checkout API to use the same at my checkout.
Basically, I want that when customer perform a successful checkout on my store, my checkout should perform the same actions. As for as I understand, wix stores perform below actions while checkout:
-
Enter the order details into Store Dashboard order collection
-
Update payment status into order collection
-
Clear the customer cart
-
Notification to customer and store admin with order details
-
reduce the order items from store inventory etc.
Therefore, I want to use the wix stores workflow/API to do the same things by just passing my cart item details to checkout API.
Please suggest if Wix has exposed their API to use by developer. if Yes, how can I use it.
Raman Mittal.
Hi Raman
You can achieve these steps with their respective functions.
Q: Enter the order details into Store Dashboard order collection.
A: Use the getCurrentCart() to get the items in your cart, then createPayment() with the current cart items.
Q: Update payment status into order collection.
A: The payment status is automatically updated, you can also use the onPaymentUpdate() function to perform custom tasks.
Q: Clear the customer cart.
A: You can’t clear the built-in Cart, you can only clear custom carts.
Q: Notification to customer and store admin with order details.
A: You can use the onNewOrder() function to send a trigger emails to both admins and the owner of the new order.
Q: reduce the order items from store inventory etc.
A: Use the onNewOrder() function along with the updateInventoryVariantFields( ) function to reduce the inventory accordingly.
Hope this helps~!
Ahmad