0

I'm using Magento 1.7.0.2

How can I delete store view by id programmatically?

1 Answer 1

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();
2
  • 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 Commented Oct 16, 2014 at 11:02
  • @gonzela2006 You should disable the compilation Commented Oct 16, 2014 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.