/** * Load the item data */ protected function loadData() { $this->id = $this->getParameter('id', 'int', null); if ($this->id == null || !BackendCatalogModel::exists($this->id)) { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } $this->record = BackendCatalogModel::get($this->id); $this->categories = (array) BackendCatalogModel::getCategories(true); $this->products = (array) BackendCatalogModel::getAll(); $this->allProductsGroupedByCategories = (array) BackendCatalogModel::getAllProductsGroupedByCategories(); $this->relatedProducts = (array) BackendCatalogModel::getRelatedProducts($this->id); $this->specifications = (array) BackendCatalogModel::getSpecifications(); // get brands $this->brands = BackendCatalogModel::getBrandsForDropdown(); }