function display($tpl = null) { $model = $this->getModel('product', 'EcommerceModel'); $product = $model->getData(); $EcommerceModelCategories = new EcommerceModelCategories(); $catoption = $EcommerceModelCategories->genOptioncat(0, '', true, $product->category_id); JToolBarHelper::title(JText::_('Product infomation')); JToolBarHelper::save(); JToolBarHelper::cancel('cancel', 'close'); $this->assignRef('product', $product); $this->assignRef('catoption', $catoption); parent::display($tpl); }
function getCatgories() { if (empty($this->_catgories)) { $EcommerceModelCategories = new EcommerceModelCategories(); $catgories = array(); $EcommerceModelCategories->getCategories(0, $catgories, ""); $this->_catgories = $catgories; } return $this->_catgories; }