2012-08-03 56 views

回答

0

注:沒有測試。這裏沒有什麼袖珍手段。

// 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); 

然後做你的正常收集迭代。

相關問題