Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public function removeWishList($customer_id,$product_id)
  2. {
  3. $itemCollection = Mage::getModel('wishlist/item')->getCollection()
  4. ->addCustomerIdFilter($customer_id);
  5.  
  6. foreach($itemCollection as $item) {
  7. $item->delete();
  8. //Mage::getModel('wishlist/item')->load($product_id)->delete();
  9. }
  10. }
  11.  
  12. Mage::getModel('wishlist/item')->load($id)->delete();
  13.  
  14. **$itemCollection = Mage::getModel('wishlist/item')->getCollection()
  15. ->addCustomerIdFilter($customerId);
  16. foreach($itemCollection as $item) {
  17. if($item->getProduct()->getId() == $productId){
  18. $item->delete();
  19. }
  20. }**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement