2013-04-27 59 views
0

我正在開發一個新的magento自定義模塊。我需要自定義購物車頁面,而不會影響原始cart.phtml。我的模塊名稱是Stallioni。我已將cart.phtml放在前端/默認/默認/模板/ stallioni/checkout/cart.phtml中。如何在我的新模塊中使用此cart.phtml而不是原件。我知道我們應該在checkout.XML或者stallioni/layout/stallioni.xml文件中改變一些東西。但是因爲我是新人,所以不知道。我一天搜查了一遍,但找不到。 http://blog.chapagain.com.np/magento-overriding-template-file-from-custom-module/這個鏈接告訴了一些東西,但它沒有爲我工作,我需要你的幫助!定製購物車頁面,而不會影響原始

回答

0

如果您layout.xml工作在佈局中添加此代碼

`<checkout_cart_index> 
    <reference name="content"> 
     <reference name="checkout.cart"> 
      <action method="setTemplate">    
       <template>default/default/template/stallioni/checkout/cart.phtml</template> 
      </action> 
     </reference> 
    </reference> 
</checkout_cart_index>` 

它應該工作:)