Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5606

Magento Mass Product delete

$
0
0
$products=Mage::getModel('catalog/product')->getCollection();
Mage::register('isSecureArea', true); // its set for admin secure area in frontend
foreach($products as $product){
$temp=Mage::getModel('catalog/product')->load($product->getId());
$temp->delete();
}	
Mage::unregister('isSecureArea'); //its unset  admin secure area from frontend

Note : You also delete (in Mass amount) categories, customers,orders etc using this pattern

Facebook Twitter Email Reddit Stumbleupon

Viewing all articles
Browse latest Browse all 5606

Trending Articles