1
我已經triyng更改默認的默認結果頁面,我希望產品按類別分組,它不包括子類別,但產品,搜索條件是產品名稱,所以,我triyng使用defalt簡單搜索magento,直到現在沒有結果,也許我必須重寫搜索,並作出新的,我知道這個我可以得到所有的類別和其產品收集,Magento搜索結果以我的方式
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('*');
foreach($categories as $category)
{
$array = $category->getParentIds();
$children = explode(',',$category->getChildren());
$products = $category->getProductCollection();
}
,但我需要通過produc名稱進行篩選,我secting顯示結果是這個樣子
Category I
- Product I
- Product II
Category II
- Product III
- Product IV
那麼你在問什麼?你到目前爲止試過什麼改變? – 2010-08-12 18:43:46