function action_Remove() { PermissionHelper::Verification('Editor'); $catalog_id = $_GET['id']; $catalogue = CatalogueService::GetById($catalog_id); CatalogueService::Delete($catalogue); header("Location: /catalog/item"); }
public static function PopulateProductViewModel($product) { $model = new ProductViewModel(); $model->Id = $product->product_id; $model->name = $product->name; $model->price = $product->price; $model->description = $product->description; $model->ImagePath = './../images/items/item_' . $product->product_id . '.jpg'; $model->catalogueName = CatalogueService::GetById($product->catalogue_id)->name; $model->attributesFloat = AttributeValueFloatHelper::PopulateAttributeValueFloatViewModelList(AttributeValueFloatService::GetByProductId($product->product_id)); $model->attributesList = AttributeValueListHelper::PopulateAttributeValueListViewModelList(AttributeValueListService::GetByProductId($product->product_id)); return $model; }