嘗試一個新的車塊添加到local.xml中內的頭,這是我有什麼添加新的車擋local.xml中內 - Magento的
<default>
<reference name="header">
<block type="checkout/cart_sidebar" name="cart_topbar" as="topCart" template="checkout/cart/top-cart.phtml"/>
</reference>
</default>
然後在頭我然而<?php echo $this->getChildHtml('topCart')?>
叫它它什麼都沒顯示。
如果我嘗試將類型更改爲type="core/template"
,那麼模板將顯示內容。所以這讓我想到我錯過了checkout/cart_sidebar
類型特定的東西?
top-cart.phtml
文件簡單包含單個文本行以消除該文件中的任何內容。
你已經採取了所有正確的診斷步驟,非常好的工作! – benmarks