问题描述
我们有一个应用程序,我们试图在其中显示他们在购物车中选择并放弃的商品.我们正在为注册和未注册的用户执行此操作.
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.
为此,我们根据文档 https://developer.bigcommerce.com/api/v3/#/reference/cart/server-to-server-cart/create-redirect-url
当我们尝试使用通过函数编写的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!
推荐答案
只能从使用服务器到服务器购物车API创建的购物车中生成重定向URL.如果您尝试为购物者在店面中创建的购物车创建redirect_url,则会收到错误消息,因为该购物车与原始购物者的店面会话相关联,并且无法将其重新分配给新购物者.
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.
对于废弃的购物车用例,建议的工作流程是使用购物车API重新创建购物者的购物车,然后从该购物车生成redirect_url.
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购物车重定向网址无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!