本文整理汇总了PHP中comquick2cartHelper::getQ2cCatsJoomla方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::getQ2cCatsJoomla方法的具体用法?PHP comquick2cartHelper::getQ2cCatsJoomla怎么用?PHP comquick2cartHelper::getQ2cCatsJoomla使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getQ2cCatsJoomla方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = JComponentHelper::getParams('com_quick2cart');
$user = JFactory::getUser();
$this->logged_userid = $user->id;
// Check for errors.
$errors = $this->get('Errors');
if (count($errors)) {
throw new Exception(implode("\n", $errors));
}
$jinput = JFactory::getApplication()->input;
$layout = $jinput->get('layout', 'default', 'STRING');
$option = $jinput->get('option', '', 'STRING');
$storeOwner = $jinput->get('qtcStoreOwner', 0, 'INTEGER');
$comquick2cartHelper = new comquick2cartHelper();
//$client='com_quick2cart';
//$client='*';
//$products = $model->getProducts($client);
//Get all stores.
$this->store_details = $comquick2cartHelper->getAllStoreDetails();
$this->categoryPage = 1;
global $mainframe;
$mainframe = JFactory::getApplication();
$model = $this->getModel('category');
//store_id is changed from STORE view
$change_storeto = $mainframe->getUserStateFromRequest('$option.current_store', 'current_store', '', 'INTEGER');
$storeOwner = $jinput->get('qtcStoreOwner', 0, 'INTEGER');
// FOR STORE OWNER
if (!empty($storeOwner)) {
$storehelper = new storehelper();
$change_storeto = $storehelper->isVendorsStoreId($change_storeto);
}
$this->change_prod_cat = $mainframe->getUserStateFromRequest('prod_cat', 'prod_cat', '0', 'INTEGER');
//vm: #25029
$this->change_prod_cat = $jinput->get('prod_cat', 0, 'INTEGER');
// retrun store_id,role etc with order by role,store_id
$this->store_role_list = $store_role_list = $comquick2cartHelper->getStoreIds();
$this->store_list = array();
foreach ($this->store_role_list as $store) {
$this->store_list[] = $store['store_id'];
}
//$this->products = $model->getAllProducts();
$this->products = $this->items = $this->get('Items');
//$mainframe->setUserState('$option.current_store', '0'); // VM:commentted for store owner product view
// when chage store,get latest storeid otherwise( on first load) set first storeid as default
$this->store_id = $store_id = !empty($change_storeto) ? $change_storeto : '';
//$store_role_list[0]['store_id'];
$pagination = $model->getPagination();
// ALL FETCH ALL CATEGORIES
$this->cats = $comquick2cartHelper->getQ2cCatsJoomla($this->change_prod_cat);
$this->pagination = $pagination;
//Added by Sneha
$filter_state = $mainframe->getUserStateFromRequest($option . 'search_list', 'search_list', '', 'string');
$lists['search_list'] = $filter_state;
$this->assignRef('lists', $lists);
//End added by Sneha
$this->_setToolBar();
// Get toolbar path
$this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
if ($layout == 'my') {
if (!$this->logged_userid) {
$msg = JText::_('QTC_LOGIN');
$uri = JFactory::getApplication()->input->get('REQUEST_URI', '', 'server', 'string');
$url = base64_encode($uri);
$mainframe->redirect(JRoute::_('index.php?option=com_users&view=login&return=' . $url), $msg);
}
// Creating status filter.
$statuses = array();
$statuses[] = JHtml::_('select.option', '', JText::_('COM_QUICK2CART_SELONE'));
$statuses[] = JHtml::_('select.option', 1, JText::_('COM_QUICK2CART_PUBLISH'));
$statuses[] = JHtml::_('select.option', 0, JText::_('COM_QUICK2CART_UNPUBLISH'));
$this->statuses = $statuses;
// Setup toolbar
$this->addTJtoolbar();
}
$this->_prepareDocument();
parent::display($tpl);
}