Created
July 30, 2015 08:55
-
-
Save toh82/1c24d82316ed74966bbc to your computer and use it in GitHub Desktop.
Updating Magento CMS Pages
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
/** @var Mage_Cms_Model_Page $oMagePageModel */ | |
$oMagePageModel = Mage::getModel('cms/page'); | |
foreach ($aHomePageTeaserContent as $iStoreId => $sHomePageTeaserContent) { | |
$iPageId = $oMagePageModel->checkIdentifier('home', $iStoreId); | |
$oPage = $oMagePageModel->load($iPageId); | |
$sPagePrevContent = $oPage->getContent(); | |
$oPage->setData('stores', array($iStoreId)); | |
$oPage->setContent($sPagePrevContent . $sHomePageTeaserContent)->save(); | |
$oPage->clearInstance(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment