«

»

Jun 01

Wishlist in Magento

Wishlist by customer id in Magento


$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($custid);

OR

$wishList = Mage::getSingleton(‘wishlist/wishlist’)->loadByCustomer($customer);
$wishListItemCollection = $wishList->getItemCollection();
if (count($wishListItemCollection)) {
$arrproduct = array();
foreach ($wishListItemCollection as $item) {

$product = $item->getProduct();
$arrproduct  [‘product’][] =array($product->getName(),$product->getPrice(),$product->getQuantity(),Mage::getBaseUrl(‘media’) . ‘catalog/product/’ . Mage::getModel(‘catalog/product’)->load($product->getId())->getThumbnail());

}
}

print_r($arrproduct );

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>