This feature is designed to transfer the cart over to the native version of your store. It allows the customer to continue shopping or checkout what they already have in the cart added via your decoupled store.
It’s defiantly handy if you don’t yet have a checkout system supported and just want to use the native checkout page.
FYI
This feature is best used for guest customers. If the customer is a registered customer, then all that customer has to do for the cart to load via the web is login.
You can choose to override the cart (if anything is set) or merge the cart items together. Please note: Only the cart data will be loaded. Customer details are not transferred.
If a customer is logged in via the native version of your store then WooCommerce will merge any items in the cart together with the items the guest customer has in cart. Please note: Items that are in both carts will not increase the quantity of that item. The item from the guest cart will have priority.
Properties
Property | Type | Description |
---|---|---|
cocart-load-cart | string | Set the cart key of the cart you wish to load from session. Mandatory |
notify | bool | Set as true to notify customers once arrived on the web version of your store. Optional, Default is false |
keep-cart | bool | Set as false to merge cart data with a logged in customers cart. Optional, Default is true |
To load the cart from session on your native store, you must use the properties above to query your website. You can query any page you prefer your customer to land on as the cart is loaded in the background so long as it does not redirect after.
Example
https://example.com/cart/?cocart-load-cart=bbfa8e97ac9cff4c861d62a109e83bb6