示例#1
0
文件: option.php 项目: A-Bush/pprod
 /**
  * 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]);
     }
 }
示例#2
0
文件: address.php 项目: A-Bush/pprod
 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;
 }
示例#3
0
文件: paimport.php 项目: A-Bush/pprod
 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);
 }
示例#4
0
文件: orders.php 项目: A-Bush/pprod
 /**
  * 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);
 }
示例#5
0
文件: products.php 项目: A-Bush/pprod
 /**
  * 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');
 }
示例#6
0
文件: _base.php 项目: A-Bush/pprod
 /**
  * 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');
 }
示例#7
0
文件: mycart.php 项目: A-Bush/pprod
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->tax = new K2StoreTax();
 }