Last active
August 29, 2015 14:13
-
-
Save ifnull/57c631c8791720270b04 to your computer and use it in GitHub Desktop.
Add multi store support to Magento MegaMenu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: /app/design/adminhtml/default/default/template/mgs_megamenu/category.phtml | |
// append at line #3 directly after the "$category = Mage::getModel[...]" line. | |
// HACK: Allow us to use root categories not part of default store | |
$mmId = $this->getRequest()->getParam('id'); | |
if ($mmId){ | |
// Use the first selected store ... hopefully this won't be a problem. | |
// We should be creating seperate menus for each store anyway. But this | |
// could be an issue when we get into localization. | |
$mmStoreId = current(Mage::getModel('megamenu/megamenu')->load($mmId)->getStoreId()); | |
if($mmStoreId !== 0) { | |
// Override category | |
$category = Mage::getModel('catalog/category')->load(Mage::app()->getStore($mmStoreId)->getRootCategoryId()); | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem with this solution is that is requires you to save first before selecting category.