config.xml 覆盖导致购物车不可见?
我正在 magento 平台上构建第二个添加到购物车按钮,并具有不同的重定向。 我使用的教程是不言自明的。 参见此处 由于重定向到位,它工作正常。 问题是:购物车本身不再显示其页面(cart.phtml)。
知道如何解决这个问题吗?或者说问题出在哪里? 如果我删除下面的代码,购物车就会再次回来,因为重定向不再起作用。
文件:config.xml
<global>
<routers>
<checkout>
<rewrite>
<cart>
<to>mycheckout/cart</to>
<override_actions>true</override_actions>
<actions>
<add>
<to>mycheckout/cart/add</to>
</add>
</actions>
</cart>
</rewrite>
</checkout>
</routers>
</global>
I am building a second add to cart button with a different redirect on a magento platform.
The tutorial I've used is self explainatory. See here
It works okey as the redirect is in place.
The thing is: The cart itself doesnt show its page (cart.phtml) anymore.
Any idea how to fix this? Or where the problem exists?
If I remove the code underneath the cart is back again, as the redirect isn't working anymore.
File : config.xml
<global>
<routers>
<checkout>
<rewrite>
<cart>
<to>mycheckout/cart</to>
<override_actions>true</override_actions>
<actions>
<add>
<to>mycheckout/cart/add</to>
</add>
</actions>
</cart>
</rewrite>
</checkout>
</routers>
</global>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎您的扩展程序没有扩展您正在覆盖的购物车控制器,从而无法显示原始控制器中的方法
Seems like your extension does not extend the cart controller that you are overwriting making it impossible to display the methods from original controller