Skip to content

Instantly share code, notes, and snippets.

@vanilla-thunder
Created May 8, 2013 10:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanilla-thunder/5539547 to your computer and use it in GitHub Desktop.
Save vanilla-thunder/5539547 to your computer and use it in GitHub Desktop.
[OXID eShop] create/update CMS page by using shop framework
$aParams = array(
'oxcontents__oxid' => 'hdinotificationactplain', // OXID
'oxcontents__oxloadid' => 'hdi_notification_act_plain', // ident
'oxcontents__oxtitle' => 'Konto wieder aktiv PLAIN', // title
'oxcontents__oxcontent' => 'here comes the content', // content
'oxcontents__oxactive' => 1,
'oxcontents__oxtype' => 3, // 0 = snippet, 1 = mainmenu, 2 = category, 3 = manual
'oxcontents__oxsnippet' => 0,
'oxcontents__oxfolder' => 'CMSFOLDER_USERINFO',
'oxcontents__oxshopid' => oxSession::getVar("actshop"),
);
$oContent = oxNew("oxcontent");
$oContent->setLanguage(0); //will be saved to default language
$oContent->assign($aParams);
$oContent->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment