0

I'm using Magento 1.7.0.2

How can I delete store view by id programmatically?

1

If you look at the Mage/Adminhtml/controllers/System/StoreController.php file there is the deleteStorePostAction(), the following code is used (just like every other Magento model can delete a record):

$model = Mage::getModel('core/store')->load($itemId);
$model->delete();
  • Hi, After deleting the store view, I got this error messageFatal error: Call to a member function getFrontNameByRoute() on a non-object in public_html/includes/src/__default.php on line 17507 – gonzo Oct 16 '14 at 11:02
  • @gonzela2006 You should disable the compilation – Marius Oct 16 '14 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.