无法通过布局更新更改 checkout/cart.phtml [英] Not able to change checkout/cart.phtml through layout update

查看:19
本文介绍了无法通过布局更新更改 checkout/cart.phtml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过模块布局文件(即 mymodule.xml)中的布局更新来更改 checkout/cart.phtml

I am trying to change checkout/cart.phtml through layout update in my module's layout file i.e. mymodule.xml

<layout>
    <checkout_cart_index>
        <reference name="checkout.cart">
            <action method="setCartTemplate"><value>mymodule/checkout/cart.phtml</value></action>
        </reference>
    </checkout_cart_index>
</layout>

但是它不起作用.有什么线索吗?

But It is not working. Any clues?

推荐答案

方法是setTemplate不是setCartTemplate,像这样:

The method is setTemplate not setCartTemplate, like so:

<layout>
    <checkout_cart_index>
        <reference name="checkout.cart">
            <action method="setTemplate"><value>mymodule/checkout/cart.phtml</value></action>
        </reference>
    </checkout_cart_index>
</layout>

这篇关于无法通过布局更新更改 checkout/cart.phtml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆