/** * Display the view * * @return void */ function display($tpl = null) { $this->latest_orders = DigiComHelperDigiCom::getOrders(5); $this->most_sold = DigiComHelperDigiCom::getMostSoldProducts(5); $this->totalOrder = $this->get('reportTotal'); $this->reportOrders = $this->get('reportOrders'); $this->reportCustomer = $this->get('reportCustomer'); $this->configs = $this->get('configs'); //load the toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('digicom'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }
function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('digicom.reports', 'com_digicom')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $this->latest_orders = DigiComHelperDigiCom::getOrders(5); $this->most_sold = DigiComHelperDigiCom::getMostSoldProducts(5); $this->totalOrder = $this->get('reportTotal'); $this->reportOrders = $this->get('reportOrders'); $this->reportCustomer = $this->get('reportCustomer'); $this->configs = $this->get('configs'); //load the toolber $this->addToolbar(); DigiComHelperDigiCom::addSubmenu('reports'); $this->sidebar = DigiComHelperDigiCom::renderSidebar(); parent::display($tpl); }