I am trying to get the wish list products in Magento 1.9, I am facing some problem. Based on customer id am fetching customer details, Unable to fetch the wishlist product collections.
$customer_id= 4;
$customer = Mage::getSingleton('customer/customer')->load($customer_id);
if($customer){
$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
print_r($wishList);
$wishListItemCollection = $wishList->getItemCollection();
if (count($wishListItemCollection)) {
$arrProductIds = array();
foreach ($wishListItemCollection as $item) {
$product = $item->getProduct();
$arrProductIds[] = $product->getId();
}
}
}