2
在magento中,我想根據目錄類別過濾登錄用戶的心願單項目。 有人可以建議我任何解決方案?如何根據類別過濾添加到心願單中的magento產品
任何幫助,將不勝感激。
請通過以下網址查看圖像:
https://dl.dropbox.com/u/53435938/wishlist.png
在magento中,我想根據目錄類別過濾登錄用戶的心願單項目。 有人可以建議我任何解決方案?如何根據類別過濾添加到心願單中的magento產品
任何幫助,將不勝感激。
請通過以下網址查看圖像:
https://dl.dropbox.com/u/53435938/wishlist.png
注:沒有測試。這裏沒有什麼袖珍手段。
// ID of the category you wish to filter by
$category_id = 35;
// Instantiate a category model and load it
$_category = Mage::getModel('catalog/category')->load($category_id);
// Grab the wishlist collection
$_wishlistCollection = Mage::helper('wishlist')->getWishlistItemCollection();
// Filter it by category as you would any normal collection
$_wishlistCollection->addCategoryFilter($_category);
然後做你的正常收集迭代。