Magento 购物车重定向到单页结帐,如何停止?

发布于 2024-10-03 05:11:36 字数 280 浏览 4 评论 0原文

您好,我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

戏舞 2024-10-10 05:11:36

听起来 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.

够运 2024-10-10 05:11:36

这是一个 JavaScript 问题。如果您查看 checkout/cart/ 的来源(我知道这很困难,它会尝试快速重定向)你可能会在其中找到这个。

var checkout = new Checkout(accordion,{
    progress: 'http://metrotemplate.com/checkout/cart/progress/',
    review: 'http://metrotemplate.com/checkout/cart/review/',
    saveMethod: 'http://metrotemplate.com/checkout/cart/saveMethod/',
    failure: 'http://metrotemplate.com/checkout/'}
);

基本上,它尝试将更新发布到 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.

var checkout = new Checkout(accordion,{
    progress: 'http://metrotemplate.com/checkout/cart/progress/',
    review: 'http://metrotemplate.com/checkout/cart/review/',
    saveMethod: 'http://metrotemplate.com/checkout/cart/saveMethod/',
    failure: 'http://metrotemplate.com/checkout/'}
);

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 to checkout/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 to checkout/onepage/.

I cannot tell why the extension has started outputting URLs that begin with checkout/cart/* rather than checkout/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 overriding Mage_Checkout_CheckoutController and another, recent extension has it's own override which is conflicting..?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文