/** * Constructor * * @since 2.5 */ function __construct() { parent::__construct(); $array = JRequest::getVar('cid', array(0), '', 'array'); $edit = JRequest::getVar('edit', true); if ($edit) { $this->setId((int) $array[0]); } }
public function getList() { $list = parent::getList(); // If no item in the list, return an array() if (empty($list)) { return array(); } foreach ($list as $item) { $item->link = 'index.php?option=com_k2store&view=addresses&task=edit&id=' . $item->address_id; } return $list; }
function __construct() { parent::__construct(); $app = JFactory::getApplication(); $this->setId($app->input->getInt('product_id')); // Get the pagination request variables $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int'); $limitstart = $app->getUserStateFromRequest($this->_namespace . '.limitstart', 'limitstart', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); }
/** * Constructor * * @since 1.5 */ function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $option = 'com_k2store'; $ns = $option . '.orders'; // Get the pagination request variables $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = $mainframe->getUserStateFromRequest($ns . '.limitstart', 'limitstart', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); }
/** * Constructor * * @since 2.5 */ function __construct() { parent::__construct(); $app = JFactory::getApplication(); $option = 'com_k2store'; $ns = $option . '.products'; // Get the pagination request variables $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int'); //$limit = $app->getUserStateFromRequest( $ns, 'limit', 'limit'); $limitstart = $app->getUserStateFromRequest($ns . '.limitstart', 'limitstart', 0, 'int'); $article_type = $app->getUserStateFromRequest($ns . '.filter_article_type', 'filter_article_type'); $categoryId = $app->getUserStateFromRequest($ns . '.filter.category_id', 'filter_category_id'); // In case limit has been changed, adjust limitstart accordingly $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState('filter.category_id', $categoryId); $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); $this->setState('filter_article_type', $article_type); $this->_article_type = $article_type; // Assining the id $this->_id = $app->input->getInt('id'); }
/** * Clean the cache * * @return void * * @since 11.1 */ public function clearCache() { $classname = strtolower(get_class($this)); parent::cleanCache($classname . '.item'); parent::cleanCache($classname . '.list'); parent::cleanCache($classname . '.list-totals'); }
function __construct($config = array()) { parent::__construct($config); $this->tax = new K2StoreTax(); }