From b8554dcdd4590f358cbeedc60f11492f3099bafd Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 24 Sep 2012 14:27:16 +0000 Subject: [PATCH] [-] FO : fixed bug #PSCFV-4336 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17506 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 6 ++++++ controllers/front/ProductController.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 0b08947a7..87962da33 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -2934,6 +2934,12 @@ class CartCore extends ObjectModel { return $this->_addCustomization($id_product, 0, $index, $type, $file, 0); } + + public function deletePictureToProduct($id_product, $index) + { + Tools::displayAsDeprecated(); + return $this->deleteCustomizationToProduct($id_product, 0); + } /** * Remove a customer's customization diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 8afa06354..6839cdf8c 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -172,7 +172,7 @@ class ProductControllerCore extends FrontController $this->textRecord(); $this->formTargetFormat(); } - else if (Tools::getIsset('deletePicture') && !$this->context->cart->deletePictureToProduct($this->product->id, Tools::getValue('deletePicture'))) + else if (Tools::getIsset('deletePicture') && !$this->context->cart->deleteCustomizationToProduct($this->product->id, Tools::getValue('deletePicture'))) $this->errors[] = Tools::displayError('An error occurred while deleting the selected picture'); $files = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_FILE, true);