Beispiel #1
0
 /**
  * main action
  */
 public function mainAction()
 {
     $Store = new ecommerce_store();
     $store_data = $_POST['store'];
     $page_node_id = $store_data['page_node_id'];
     unset($store_data['page_node_id']);
     if ($_POST['save']) {
         if ($id = $Store->insertStore($store_data)) {
             $store_homepage = $this->insertNewStoreToNode($id, $page_node_id);
             msg("Store has been added.");
             onxshopGoTo("backoffice/stores/{$id}/edit");
         } else {
             msg("Adding of Store Failed.", 'error');
         }
     }
     $store_data['page_node_id'] = (int) $_SESSION['active_pages'][0];
     $this->tpl->assign('STORE', $store_data);
     return true;
 }