config.xml 覆盖导致购物车不可见?

发布于 2024-12-15 12:10:21 字数 1020 浏览 1 评论 0原文

我正在 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 技术交流群。

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

发布评论

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

评论(1

天涯沦落人 2024-12-22 12:10:21

似乎您的扩展程序没有扩展您正在覆盖的购物车控制器,从而无法显示原始控制器中的方法

Seems like your extension does not extend the cart controller that you are overwriting making it impossible to display the methods from original controller

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