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(); }
function downloads() { if (!$this->_checkLogin()) { return true; } JRequest::setVar('layout', 'downloads'); return parent::display(); }
function export() { $cids = JRequest::getVar('cid'); if (!empty($cids)) { $_SESSION['hikashop']['entries'] = $cids; } else { $_SESSION['hikashop']['entries'] = ''; } JRequest::setVar('layout', 'export'); return parent::display(); }
public function galleryimage() { $upload_key = JRequest::getVar('field', ''); if (empty($this->controller)) { return false; } $uploadConfig = $this->controller->getUploadSetting($upload_key, 'galleryimage'); if ($uploadConfig === false) { return false; } if (!empty($uploadConfig['type']) && $uploadConfig['type'] != 'image') { return false; } JRequest::setVar('layout', 'galleryimage'); JRequest::setVar('uploadConfig', $uploadConfig); return parent::display(); }
function useselection() { JRequest::setVar('layout', 'useselection'); return parent::display(); }
function savemodules() { JRequest::setVar('layout', 'savemodules'); return parent::display(); }
function checkdb() { $databaseHelper = hikashop_get('helper.database'); $html = $databaseHelper->checkdb(); JRequest::setVar('layout', 'checkdb'); return parent::display(); }
function results() { JRequest::setVar('layout', 'results'); return parent::display(); }
public function product_create() { $formData = JRequest::getVar('data', array(), '', 'array'); $product_quantity = -1; if (isset($formData['order']['product']['order_product_quantity'])) { $product_quantity = (int) $formData['order']['product']['order_product_quantity']; } if ($product_quantity >= 0) { $orderClass = hikashop_get('class.order'); $status = $orderClass->saveForm('products'); if ($status) { JRequest::setVar('cid', $status); JRequest::setVar('fail', null); } } else { JRequest::setVar('layout', 'edit_products'); return parent::display(); } return $this->show_products(); }
function state() { JRequest::setVar('layout', 'state'); return parent::display(); }
function filters() { JRequest::setVar('layout', 'filters'); return parent::display(); }
public function customer_save() { $class = hikashop_get('class.cart'); if ($class === null) { return false; } $cart = new stdClass(); $cart->cart_id = JRequest::getVar('cart_id', '0'); $cart->user_id = JRequest::getVar('user_id', '0'); $cart->session_id = JRequest::getVar('session_id', '0'); $status = $class->save($cart); if ($status) { JRequest::setVar('cid', $status); } JRequest::setVar('layout', 'form'); return parent::display(); }
function display($cachable = false, $urlparams = array()) { static $done = false; $result = true; if (!$done) { $done = true; $result = parent::display(); } return $result; }
function newchild() { JRequest::setVar('layout', 'newchildform'); return parent::display(); }
public function addcharacteristic_ajax() { JRequest::checkToken('request') || die('Invalid Token'); $tmpl = JRequest::getCmd('tmpl', ''); $characteristic_parent_id = JRequest::getInt('characteristic_parent_id', 0); $characteristic_type = JRequest::getCmd('characteristic_type', ''); $value = JRequest::getString('value', ''); if (empty($value)) { return false; } $value = trim($value); $vendor_id = 0; $ret = false; if ($characteristic_type == 'value') { if (!hikashop_acl('characteristic/values/add')) { return false; } if ($characteristic_parent_id <= 0) { return false; } $characteristicClass = hikashop_get('class.characteristic'); $characteristic_vendor_id = $vendor_id; if ($characteristic_vendor_id == 0 && hikashop_acl('characteristic/values/edit/vendor')) { $characteristic_vendor_id = (int) JRequest::getInt('characteristic_vendor_id', 0); } if ($characteristicClass->findValue($value, $characteristic_parent_id, $characteristic_vendor_id) > 0) { return false; } // hikamarket::deny('vendor', JText::sprintf('HIKAM_ACTION_ERROR', JText::_('HIKAM_WRONG_DATA'))); $element = new stdClass(); $element->characteristic_parent_id = $characteristic_parent_id; $element->characteristic_value = $value; if (!empty($characteristic_vendor_id)) { $element->characteristic_vendor_id = $characteristic_vendor_id; } $ret = $characteristicClass->save($element); } else { if (!hikashop_acl('characteristic/add')) { return false; } $characteristicClass = hikashop_get('class.characteristic'); $characteristic_vendor_id = $vendor_id; if ($characteristic_vendor_id == 0 && hikashop_acl('characteristic/edit/vendor')) { $characteristic_vendor_id = (int) JRequest::getInt('characteristic_vendor_id', 0); } if ($characteristicClass->findValue($value, 0, $characteristic_vendor_id) > 0) { return false; } $element = new stdClass(); $element->characteristic_parent_id = 0; $element->characteristic_value = $value; $element->characteristic_alias = strtolower($value); $ret = $characteristicClass->save($element); } if ($tmpl == 'json') { if (!empty($ret)) { $data = array('value' => $ret, 'name' => $value); echo json_encode($data); } else { echo '{err:"failed"}'; } exit; } JRequest::setVar('layout', 'listing'); return parent::display(); }
function selectstatus() { JRequest::setVar('layout', 'selectstatus'); return parent::display(); }
function setcurrent() { $app = JFactory::getApplication(); $db = JFactory::getDBO(); $cart_id = JRequest::getVar('cart_id', '0'); $cart_type = JRequest::getString('cart_type', 'cart'); $cartClass = hikashop_get('class.cart'); $cartClass->cart_type = $cart_type; $cartInfo = $cartClass->loadCart($cart_id); $currUser = hikashop_loadUser(true); if ($cartInfo != null && $currUser->user_cms_id == $cartInfo->user_id) { $result = $cartClass->setCurrent($cart_id, $cart_type); if ($result) { $app->setUserState(HIKASHOP_COMPONENT . '.' . $cart_type . '_id', $cart_id); } } JRequest::setVar('layout', 'showcarts'); return parent::display(); }
function invoice() { if ($this->_check()) { JRequest::setVar('layout', 'invoice'); return parent::display(); } return true; }