Exemplo n.º 1
0
 public function deleteProduct()
 {
     $http = new Http();
     $id = $http->post("id");
     if ($id) {
         $product = new Product($id);
         $product->delete();
         $product_additional_images = new ProductAdditionalImages($id, true);
         $product_additional_images->deleteAllAdditionalImages();
         $product_additional = new ProductAdditional($id, true);
         $product_additional->deleteAllFields();
         $product_promotion = new Promotion();
         $product_promotion->deletePromotionByProductId($id);
         $product_comments = new Comments($id);
         $product_comments->deleteAllComents();
     }
 }