0
0
Read Time:15 Second
/**
* @param int $customerId
*/
public function getWishlistByCustomerId($customerId)
{
$wishlist = $this->wishlist->loadByCustomerId($customerId)->getItemCollection();
return $wishlist;
}
getWishlistByCustomerId($customerId);
if(count($wishlistCollection)) {
foreach ($wishlistCollection as $_item) {
/* You can get ID, Name, Desc. ... */
echo $_item->getProduct()->getId();
}
} else {
/* Display message if no item found in wishlist */
echo __("Nothing found in your wishlist!");
}