- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2015
04:32 AM
09-09-2015
04:32 AM
Fatal error: Call to a member function children() on a non-object
hello
i am new in magento.
when i want to install a new template in an admin area
1- list de install demo is empty
2- when I click submit action its gives me this :
Fatal error: Call to a member function children() on a non-object in /home/lalablue/public_html/app/code/local/Etheme/Coolbabyconfig/controllers/Adminhtml/LoadpresetconfigController.php on line 28
code of function children() in "LoadpresetconfigController.php" file
public function configinstallAction() { $configset=$this->getRequest()->getParam('configset'); $store=$this->getRequest()->getParam('store'); $scope = $store ? 'stores' : 'default'; $configxml=new Varien_Simplexml_Config(Mage::getBaseDir().'/cb_presets/'.$configset.'.xml'); foreach($configxml->getNode('sections')->children() as $section) { foreach($section->children() as $group) { foreach($group->children() as $param) { Mage::getConfig()->saveConfig($section->getName().'/'.$group->getName().'/'.$param->getName(), (string)$param, $scope, $store); } } }
how can i fixed it?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015
12:28 AM
09-10-2015
12:28 AM
Re: Fatal error: Call to a member function children() on a non-object
Hi @hatim_jlidat,
You bug caused by it cannot get result in the xml file. You should check the file "Mage::getBaseDir().'/cb_presets/'.$configset.'.xml'" again.
Hope it's helpful for you.
MageWoo
Best Magento Extensions and Services: One Step Checkout, POS Pro, Social Login, Delivery Date...
www.magewoo.com
www.magewoo.com