Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @since 2.5
  */
 function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = $option . '.products';
     // Get the pagination request variables
     $menu = $app->getMenu()->getActive();
     if (isset($menu->params) && $menu->params->get('page_limit')) {
         $limit = $menu->params->get('page_limit');
     } else {
         $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int');
     }
     $limitstart = $app->getUserStateFromRequest($ns . 'limitstart', 'limitstart', 0, 'int');
     $categoryId = $app->getUserStateFromRequest($ns . 'filter_category', 'filter_category');
     $category_title = $app->getUserStateFromRequest($ns . 'category_title', 'category_title');
     $filter_sort = $app->getUserStateFromRequest($ns . 'filter_sort', 'filter_sort');
     // In case limit has been changed, adjust limitstart accordingly
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('filter_category', $categoryId);
     $this->setState('filter_sort', $filter_sort);
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     $this->setState('category_title', $category_title);
     //		$this->setState('filter_optionvalue',$filter_option_value);
     $id = $app->input->getInt('id');
     $this->setId($id);
 }
Exemplo n.º 2
0
 /**
  * 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]);
     }
 }
Exemplo n.º 3
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_j2store&view=addresses&task=edit&id=' . $item->address_id;
     }
     return $list;
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 /**
  * Constructor
  *
  * @since 1.5
  */
 function __construct()
 {
     parent::__construct();
     $mainframe = JFactory::getApplication();
     $option = 'com_j2store';
     $ns = 'com_j2store.fields';
     // 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);
 }
Exemplo n.º 6
0
 /**
  * Constructor
  *
  * @since 2.5
  */
 function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $option = 'com_j2store';
     $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');
 }
Exemplo n.º 7
0
 function __construct($config = array())
 {
     parent::__construct($config);
 }
Exemplo n.º 8
0
 /**
  * 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');
 }