2012-05-11 59 views
2

私はMagentoのに新たなんだ、それは初心者の質問オーバーライドitemrender - Magentoの

ですので、もし、SRY基本的にlayout.xmlファイルに次のように宣言ブロックがある:

<block type="checkout/cart" name="checkout.cart"> 
    <action method="setCartTemplate"><value>checkout/cart.phtml</value></action> 
    <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action> 
    <action method="chooseTemplate"/> 
    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action> 
    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action> 
    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action> 

は、

<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>にカスタムテンプレートを上書きしたいと思います。

ここでメソッドが呼び出されているので、テンプレートはどのように変更できますか?

ありがとうございます!

あなたモジュールレイアウトファイルまたはlocal.xml

<reference name="checkout.cart"> 
    <action method="addItemRender"> 
     <type>simple</type><block>checkout/cart_item_renderer</block><template>path/to/your/item/default.phtml</template> 
    </action> 
</reference> 

でKrt_Malta

答えて

関連する問題