示例#1
0
 /**
  * save module configuration
  */
 function saveconfig()
 {
     // create a new RSS object if enable is checked.
     if (!empty($this->params['enable_rss'])) {
         $rssfeed = new expRss($this->params);
         $rssfeed->update($this->params);
     }
     // create a new eAlerts object if enable is checked.
     if (!empty($this->params['enable_ealerts'])) {
         $ealert = new expeAlerts($this->params);
         $ealert->update($this->params);
     }
     // unset some unneeded params
     unset($this->params['module']);
     unset($this->params['controller']);
     unset($this->params['src']);
     unset($this->params['int']);
     unset($this->params['id']);
     unset($this->params['cid']);
     unset($this->params['action']);
     unset($this->params['PHPSESSID']);
     // setup and save the config
     $config = new expConfig($this->loc);
     $config->update(array('config' => $this->params));
     flash('message', gt('Configuration updated'));
     expHistory::back();
 }
 function update_upcharge()
 {
     $this->loc->src = "@globalstoresettings";
     $config = new expConfig($this->loc);
     $this->config = $config->config;
     //This will make sure that only the country or region that given a rate value will be saved in the db
     $upcharge = array();
     foreach ($this->params['upcharge'] as $key => $item) {
         if (!empty($item)) {
             $upcharge[$key] = $item;
         }
     }
     $this->config['upcharge'] = $upcharge;
     $config->update(array('config' => $this->config));
     flash('message', gt('Configuration updated'));
     expHistory::back();
 }
 function saveconfig()
 {
     // unset some unneeded params
     unset($this->params['module']);
     unset($this->params['controller']);
     unset($this->params['src']);
     unset($this->params['int']);
     unset($this->params['id']);
     unset($this->params['action']);
     unset($this->params['PHPSESSID']);
     // setup and save the config
     $this->loc->src = "@store-" . $this->params['cat-id'];
     $config = new expConfig($this->loc);
     $config->update(array('config' => $this->params));
     flash('message', gt('Configuration updated'));
     expHistory::back();
 }
 /**
  * module customized function to circumvent going to previous page
  * @return void
  */
 function saveconfig()
 {
     // unset some unneeded params
     unset($this->params['module']);
     unset($this->params['controller']);
     unset($this->params['src']);
     unset($this->params['int']);
     unset($this->params['id']);
     unset($this->params['action']);
     unset($this->params['PHPSESSID']);
     // setup and save the config
     $config = new expConfig($this->loc);
     $config->update(array('config' => $this->params));
     // update our object config
     $this->config = expUnserialize($config->config);
     //        flash('message', 'Migration Configuration Saved');
     //        expHistory::back();
     if (isset($this->params['fix_database'])) {
         $this->fix_database();
     }
     echo '<h2>' . gt('Migration Configuration Saved') . '</h2><br />';
     echo '<p>' . gt('We\'ve successfully connected to the Old database') . '</p><br />';
     echo "<a class=\"awesome " . BTN_SIZE . " " . BTN_COLOR . "\" href=\"" . expCore::makeLink(array('controller' => 'migration', 'action' => 'manage_users')) . "\">" . gt('Next Step -> Migrate Users & Groups') . "</a>";
 }