function __construct() { parent::__construct(); // always use same method for cidName $vName = $this->getName(); $this->_cidName = 'virtuemart_' . $vName . '_id'; // var_dump($this); //Template path and helper fix for Front-end editing $this->addTemplatePath(JPATH_VM_ADMINISTRATOR . '/views/' . $vName . '/tmpl'); $this->addHelperPath(JPATH_VM_ADMINISTRATOR . '/helpers'); $this->frontEdit = jRequest::getvar('tmpl') === 'component' ? true : false; if ($this->frontEdit) { $this->tmpl = '&tmpl=component'; JLoader::register('JToolBarHelper', JPATH_VM_ADMINISTRATOR . '/helpers/toolbarhelper.php'); JLoader::register('JToolbarButton', JPATH_VM_ADMINISTRATOR . '/helpers/button.php'); JLoader::register('JToolbar', JPATH_VM_ADMINISTRATOR . '/helpers/toolbar.php'); } // this is to check, in most cases $this->adminVendor = Permissions::getInstance()->isSuperVendor(); }