Bigcommerce Cart Redirect URL not working

2019-08-06 04:08发布

问题:

Hi We have an app where we are trying to shows items that they had selected in their cart and abandoned it. We are doing this for registered and unregistered users.

For this purpose we have created a redirect url for cart as per docs https://developer.bigcommerce.com/api/v3/#/reference/cart/server-to-server-cart/create-redirect-url

And when we try to use the URL generated via the function we have written we get following error "Your cart couldn't be retrieved. Please click here to continue shopping."

Cart url link was used straight after generation so it couldn't be expired or used twice.

Any help will be much appreciated!

回答1:

Redirect URLs can be generated only from carts created using the server-to-server Cart API. If you try to create a redirect_url for a cart that was created on the storefront by a shopper, you'll get an error because the cart is tied to the original shopper's storefront session and it can't be re-assigned to a new one.

The recommended workflow for an abandoned cart use case would be to recreate the shopper's cart with the Cart API and then generate the redirect_url from that cart.



标签: bigcommerce