I have create a Model and for some development i had to implement delete
method. It is very easy. I also try for conditional delete. But i am using the following code which will fulfill your requirement for conditional delete.
foreach($pid as $spid){
$items
= Mage::getModel('custom/csaabandonedcart')->getCollection()
->addFieldToFilter('csa_id',
Mage::getSingleton('customer/session')->getCustomerId())
->addFieldToFilter('customer_id',
$retailer)->addFieldToFilter('product_id', $spid);
foreach($items
as $item){
$item->delete();
}
}
I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog!
ReplyDeleteNewizze
This comment has been removed by the author.
ReplyDeleteSuch a great and most useful information for me! I appreciate this post so much. I save all information and code separatelyy. Thanks for sharing it
ReplyDeletehire Magento developer