Ejemplo n.º 1
0
 function edit()
 {
     $tmpl = JRequest::getCmd('tmpl', '');
     $subtask = JRequest::getCmd('subtask', '');
     $addrtype = JRequest::getCmd('address_type', '');
     $config = hikashop_config();
     if ($tmpl == 'component' && ($addrtype != '' || $subtask != '') && $config->get('checkout_address_selector', 0)) {
         JRequest::setVar('hidemainmenu', 1);
         JRequest::setVar('layout', 'show');
         JRequest::setVar('edition', true);
         ob_end_clean();
         if (HIKASHOP_J25) {
             $app = JFactory::getApplication();
             $messages = $app->getMessageQueue();
             if (!empty($messages)) {
                 foreach ($messages as $message) {
                     hikashop_display($message['message'], 'error');
                 }
             }
         }
         parent::display();
         exit;
     }
     parent::edit();
 }
Ejemplo n.º 2
0
 function edit()
 {
     if (JRequest::getInt('fromjoomla')) {
         $app = JFactory::getApplication();
         $context = 'com_modules.edit.module';
         $id = hikashop_getCID('id');
         if ($id) {
             $values = (array) $app->getUserState($context . '.id');
             $index = array_search((int) $id, $values, true);
             if (is_int($index)) {
                 unset($values[$index]);
                 $app->setUserState($context . '.id', $values);
             }
         }
     }
     return parent::edit();
 }
Ejemplo n.º 3
0
 public function edit()
 {
     $task = JRequest::getVar('subtask', '');
     if (empty($task)) {
         $config = hikashop_config();
         if ($config->get('fallback_order_edition', 0) || JRequest::getVar('fallback', 0)) {
             return parent::edit();
         }
         JRequest::setVar('task', 'show');
         return $this->show();
     }
     if (!in_array($task, $this->subtasks)) {
         $tmpl = JRequest::getVar('tmpl', '');
         if ($tmpl == 'component') {
             exit;
         }
         return false;
     }
     JRequest::setVar('layout', 'show_' . $task);
     if (!in_array($task, $this->popupSubtasks)) {
         $tmpl = JRequest::getVar('tmpl', '');
         if ($tmpl == 'component') {
             ob_end_clean();
             parent::display();
             exit;
         }
     } else {
         JRequest::setVar('layout', 'edit_' . $task);
     }
     return parent::display();
 }