public function runStep2($run = 0) { $installer = new DrexCartInstaller(); if (!empty($this->request->data)) { //print_r($this->request->data); if (isset($this->request->data['DrexCartConfig']['sitename'])) { $installer->runStep2($this->request->data['DrexCartConfig']['sitename']); } } try { $sitename = $this->DrexCartConfig->getValue('sitename'); $this->request->data['DrexCartConfig']['sitename'] = $sitename; } catch (Exception $e) { echo 'Error:' . $e->getMessage(); } }
public function beforeFilter() { parent::beforeFilter(); // check for installed $installer = new DrexCartInstaller(); if ($installer->isInstalled()) { // software is considered installed $this->loadCartInfo(); $this->set('installed', true); } else { // software is not considered installed if (strtolower($this->params['controller']) != 'drexcartinstall') { $this->redirect('/DrexCartInstall/index'); exit; } } // global functions $this->DCFunctions = new DrexCartFunctions(); $this->set('DCFunctions', $this->DCFunctions); // user manager $this->loadUserManager(); // load category information $this->loadCategories(); }