Google Checkout:处理购物车编辑和结账确认的最佳方式
我正在一家电子商店中实施 Google Checkout。 一旦客户点击“Google Checkout”按钮,我的项目要求他们能够导航回电子商店以编辑购物车。 客户应该能够点击“后退”按钮,输入我的购物车页面的网址,或者点击 Google 的“编辑”链接。
同时,我需要清除购物车,并在客户点击 Google 一侧的确认按钮后立即向他们提供空白的信息。 我已经在监听来自谷歌的新订单通知,但这并不总是足够快地到达,以防止客户返回电子商店并摸不着头脑为什么他们的购物车仍然显示他们刚刚购买的商品。
Google Checkout 实施者是否针对这个问题提出了新颖的解决方案? 任何想法表示赞赏!
I am in the process of implementing Google Checkout in an e-store. Once customers click the 'Google Checkout' button, my project requires that they are able to navigate back to the e-store to possibly edit the cart. Customers should be able to click the 'back' button, type in the URL to my cart page, or click the 'edit' link from Google.
At the same time, I need to clear the cart and provide customers with a blank slate as soon as they click the confirmation button on Google's side. I am already listening for a new-order-notification from Google, but this does not always arrive quickly enough to prevent customers from returning to the e-store and scratching theirs heads as to why their carts still show the items they just purchased.
Have any Google Checkout implementors come up with a novel solution to this problem? Any ideas are appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用了两种不同的方法来完成此操作,两者都不能正确满足您处理后退按钮和在完成订单时清除购物篮的要求,但它们在实践中为我工作,没有任何抱怨。
第一种方法:清除购物篮并提供通过“EditCartUrl”Google Checkout 请求参数中的查询字符串重建购物篮的方法。 然后,当客户单击编辑购物篮按钮时,他们的购物篮就会被重建。 然而,后退按钮在这种情况下不起作用。
第二种方法:不要清除购物篮,但(可选)在重定向到 Google Checkout 之前将其设置为只读。 我们这样做是为了让购物篮记录在 Google Checkout 中时无法更改。 如果他们随后点击返回或编辑购物车,则每次都会在我们的网站上创建一个新的购物篮(从原始购物车克隆)。 这为后退按钮提供了支持,但仅当订单已完成且我们已在客户返回网站之前处理了请求时,才会向客户提供已清空的购物篮。
将购物篮设置为只读是可选的 - 我们这样做是为了保留购物篮记录以匹配 Google Checkout 生成的订单。 如果您不需要这个,那么就像不清理篮子一样简单。
在过去的几年里,第二种方法对我来说效果很好,没有收到任何客户的投诉。 我希望客户能够点击后退按钮,而不是太担心他们在使用 Google 结帐后看到购物篮未清空。
I've done this using 2 different approaches, neither properly fulfils your requirement of handling the back button AND clearing the basket if they complete the order, but they've worked for me in practice without any complaints.
First approach: clear the basket and provide way of reconstructing it via query string in the "EditCartUrl" Google Checkout request parameter. Then, when the customer clicks the edit basket button their basket is reconstructed. The back button, however, does not work in this situation.
Second approach: don't clear the basket, but (optionally) make it read-only before redirecting to Google Checkout. We do this so that the basket record cannot be changed while they are within Google Checkout. If they then click back, or edit cart, a NEW basket is created on our site (cloned from the original) each time. This provides support for the back button, but will only provide the customer with a cleared basket if the order has gone through and we have processed the request before they return to the site.
Making the basket read-only is optional - we do it so we can preserve the basket record to match the resulting order from Google Checkout. If you don't require this, it's as simple as not clearing the basket.
The second approach has done me fine for the last few years without any complaints from customers. I'd rather the customer be able to click the back button than worry too much about them seeing the basket not empty itself after checking out using Google.