Magento 购物车重定向到单页结帐,如何停止?
您好,我是 Magento 的新手,所以我们安装了 Magento Simple checkout,它工作正常,但是当您添加产品时,它会将您带到购物车(checkout/cart),这很好,但随后它突然跳转到(checkout/onepage) 。
两个页面看起来非常相似,除了购物车页面让我可以选择继续购物、更改购物车数量和更新购物车,而结帐页面没有此选项。我永远无法更改购物车选项,因为它总是重定向。
有什么办法可以阻止它重定向吗?我什至不知道从哪里开始看,所以我可以粘贴一些代码。
先感谢您。
Hi I'm new to Magento, so we installed the Magento Simple checkout which is working fine but when you add a product it takes you to the cart (checkout/cart) which is fine but then it suddenly jumps to (checkout/onepage).
Both pages look pretty similar except the cart page gives me the option to keep shopping and change cart quantities and update the cart while the checkout page doesn't have this. I can never change the cart options because it always redirects.
Is there anyway to stop it from redirecting? I don't even know where to start to look so I could paste some code.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来 Simple Checkout 就是为了做到这一点而设计的。如果您不喜欢它,请将其卸载。如果您认为存在错误,请直接联系 Simple Checkout 的作者。
It sounds like Simple Checkout is designed to do exactly that. If you don't like it, uninstall it. If you think there is a bug, contact the authors of Simple Checkout directly.
这是一个 JavaScript 问题。如果您查看 checkout/cart/ 的来源(我知道这很困难,它会尝试快速重定向)你可能会在其中找到这个。
基本上,它尝试将更新发布到
checkout/cart/saveMethod/
,这相当于单页结账的第一步。不幸的是,该 URL 不存在,它应该在后台 POST 到checkout/onepage/saveMethod/
,而不是收到 404 错误,该错误会触发页面重新加载为“失败”URL。最后一步是
checkout/
自动重定向到checkout/onepage/
。我不知道为什么扩展程序开始输出以
checkout/cart/*
开头的 URL,而不是checkout/onepage/*
。也许某处有管理员设置?也许一些过度热情的模板编辑“更正”了文件“template/checkout/onepage.phtml”?或者也许 Simple Checkout 依赖于覆盖Mage_Checkout_CheckoutController
而另一个最近的扩展有它自己的覆盖,这是冲突的..?This is a javascript problem. If you view the source of checkout/cart/ (difficult, I know, it tries to redirect quite quickly) you might find this in it.
Basically it tries to POST an update to
checkout/cart/saveMethod/
which is equivalent to the first step of onepage checkout. Unfortunately that URL doesn't exist, it should be POSTing tocheckout/onepage/saveMethod/
in the background, instead it gets a 404 error which triggers the page to reload as the "failure" URL.The final step is
checkout/
redirects automatically tocheckout/onepage/
.I cannot tell why the extension has started outputting URLs that begin with
checkout/cart/*
rather thancheckout/onepage/*
. Perhaps there is an admin setting somewhere? Maybe some over-enthusiastic template editing 'corrected' the file "template/checkout/onepage.phtml"? Or maybe Simple Checkout depends on overridingMage_Checkout_CheckoutController
and another, recent extension has it's own override which is conflicting..?