0
我使用這個tutorial並在多個類別的基礎上顯示產品,但現在我遇到的問題是,尋呼機工具欄無法正常工作。 我的塊的代碼是:傳呼機工具欄在magento的自定義模塊中
<reference name="content">
<block name="mymodule" type="mymodule/product_listcategories" template="catalog/product/list.phtml">
<action method="setCategories">
<ids>2,3,4</ids>
</action>
</block>
</reference>
我也與上述
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
它顯示的工具欄添加此代碼,但工具欄不工作(限,排序依據)。 我的區號是
class Mymodule_Block_Product_Listcategories extends Mage_Catalog_Block_Product_List
{
protected function _getProductCollection()
{
$this->_productCollection = Mage::getModel('catalog/product')->getCollection();
$this->_productCollection->addAttributeToSelect('*');
if($this->getCategories()!="")
$this->_productCollection->addCategoriesFilter($this->getCategories());
return $this->_productCollection;
}
}
}
有沒有人知道問題在哪裏?我想我錯過了尋呼機的一些代碼?在此先感謝