Webkul
Services
Technologies Bagisto QloApps
iOS Android SAP BigCommerce Wix
Trusted by
Samsung Intel Toyota Walmart Disney Nokia Nestlé Decathlon
See all customers
Back to Top
DOC

Magento Mass Product delete

$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

. . .

Leave a Comment

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


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home