almost 11 years ago
Delete category and Products By Ids in Magento by following the steps:
1 - Deleting Category: send category id with Query String to controller such as
Then write the controller as
public function deletcatAction(){ Mage::register('isSecureArea', 1); $categoryId = $_REQUEST['id']; $category = Mage::getModel('catalog/category')->load($categoryId); try{ $category->delete(); } catch (Exception $e){ echo $e->getMessage(); } }
Deleting Products:
send category id with Query String to controller such as
public function deletprdctAction(){ Mage::register('isSecureArea', 1); $productId = $_REQUEST['id']; $product = Mage::getModel('catalog/product')->load($productId); try{ $product->delete(); $this->_redirect('manager/account/dashboardedit'); } catch (Exception $e){ echo $e->getMessage(); } }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)