deal with 'non-admin area' warn
We usually use the follow code to delete product in Magento
$product = Mage::getSingleton('catalog/product')->load($productId); $product->delete();
Of course, you are given a warn from magento. To solve this problem, you should add the follow code before and after delete
Mage::register('isSecureArea', true);
Mage::unregister('isSecureArea', true);