function __construct($config = array(), $skip = false) { parent::__construct($config, $skip); if (!$skip) { $this->registerDefaultTask('save'); } $this->display[] = 'save'; }
function downloads() { if (!$this->_checkLogin()) { return true; } JRequest::setVar('layout', 'downloads'); return parent::display(); }
function __construct($config = array()) { $this->modify[] = 'apply_table'; parent::__construct($config); $this->modify_views[] = 'tableform'; $this->display[] = 'csv'; $this->display[] = 'edit'; }
function __construct() { parent::__construct(); $this->db = JFactory::getDBO(); $this->modify[] = 'import'; $this->registerDefaultTask('show'); $this->helper = hikashop_get('helper.import'); }
function __construct($config = array(), $skip = false) { $this->display[] = 'update'; if (!$skip) { parent::__construct($config, $skip); $this->registerDefaultTask('update'); } JRequest::setVar('tmpl', 'component'); }
function __construct($config = array()) { $this->display = array('listing', 'csv', 'cpanel'); $this->modify_views = array('edit'); $this->add = array('add'); $this->modify = array('save'); $this->delete = array('delete', 'remove'); parent::__construct($config); }
function export() { $cids = JRequest::getVar('cid'); if (!empty($cids)) { $_SESSION['hikashop']['entries'] = $cids; } else { $_SESSION['hikashop']['entries'] = ''; } JRequest::setVar('layout', 'export'); return parent::display(); }
function __construct($config = array(), $skip = false) { parent::__construct($config, $skip); $this->display = array(''); $this->modify_views = array('form', 'edit', 'newentry', 'save'); $this->add = array(); $this->modify = array(); $this->delete = array(); if (!$skip) { $this->registerDefaultTask('edit'); } }
function __construct($config = array(), $skip = false) { parent::__construct($config, $skip); $this->display = array('clicks', 'leads', 'sales', 'cancel', ''); $this->modify_views = array('show'); $this->add = array(); $this->modify = array('save', 'apply'); $this->delete = array(); if (!$skip) { $this->registerDefaultTask('show'); } }
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(); }
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 listing() { $user = JFactory::getUser(); if ($user->guest) { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('PLEASE_LOGIN_FIRST')); global $Itemid; $url = ''; if (!empty($Itemid)) { $url = '&Itemid=' . $Itemid; } if (version_compare(JVERSION, '1.6', '<')) { $url = 'index.php?option=com_user&view=login' . $url; } else { $url = 'index.php?option=com_users&view=login' . $url; } $app->redirect(JRoute::_($url . '&return=' . urlencode(base64_encode(hikashop_currentUrl('', false))), false)); return false; } return parent::listing(); }
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 results() { JRequest::setVar('layout', 'results'); return parent::display(); }
function __construct($config = array()) { parent::__construct($config); $this->modify_views[] = 'unpublish'; $this->modify_views[] = 'publish'; }
function __construct() { parent::__construct(); $this->modify[] = 'update'; }
function display($cachable = false, $urlparams = array()) { static $done = false; $result = true; if (!$done) { $done = true; $result = parent::display(); } return $result; }
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 selectstatus() { JRequest::setVar('layout', 'selectstatus'); return parent::display(); }
function filters() { JRequest::setVar('layout', 'filters'); return parent::display(); }
function newchild() { JRequest::setVar('layout', 'newchildform'); 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 __construct($config = array()) { parent::__construct($config); }
function checkdb() { $databaseHelper = hikashop_get('helper.database'); $html = $databaseHelper->checkdb(); JRequest::setVar('layout', 'checkdb'); return parent::display(); }
function state() { JRequest::setVar('layout', 'state'); return parent::display(); }
function useselection() { JRequest::setVar('layout', 'useselection'); return parent::display(); }
public function __construct($config = array(), $skip = false) { parent::__construct($config, $skip); $this->display = array_merge($this->display, array('updatecart', 'cart', 'cleancart', 'contact', 'compare', 'waitlist', 'send_email', 'add_waitlist', 'price', 'download', 'printcart', 'sendcart')); }
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 __construct($config = array()) { parent::__construct($config); $this->modify[] = 'trigger'; }