From 77a4c45aa4927e45a6d20bd3afe1e4ed5fb848c4 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 24 Jun 2014 10:30:46 +0200 Subject: [PATCH] remove commented code --- .../lib/Thelia/Controller/Admin/TranslationsController.php | 7 ------- core/lib/Thelia/Coupon/Type/FreeProduct.php | 4 ---- 2 files changed, 11 deletions(-) diff --git a/core/lib/Thelia/Controller/Admin/TranslationsController.php b/core/lib/Thelia/Controller/Admin/TranslationsController.php index 93aab31cb..6c2aed749 100644 --- a/core/lib/Thelia/Controller/Admin/TranslationsController.php +++ b/core/lib/Thelia/Controller/Admin/TranslationsController.php @@ -181,13 +181,6 @@ class TranslationsController extends BaseAdminController case 'ma' : $template = new TemplateDefinition($item_name, TemplateDefinition::EMAIL); break; - - default: - /* - throw new \InvalidArgumentException( - $this->getTranslator()->trans("Undefined translation type: %item", ['%item' => $item_to_translate]) - ); - */ } if ($template) { diff --git a/core/lib/Thelia/Coupon/Type/FreeProduct.php b/core/lib/Thelia/Coupon/Type/FreeProduct.php index 5fe65b1b0..42a106f4e 100644 --- a/core/lib/Thelia/Coupon/Type/FreeProduct.php +++ b/core/lib/Thelia/Coupon/Type/FreeProduct.php @@ -230,10 +230,6 @@ class FreeProduct extends AbstractRemoveOnProducts $this->setRelatedCartItem($eligibleProduct, $cartEvent->getCartItem()->getId()); $freeProductCartItem = $cartEvent->getCartItem(); - - // Setting product price is dangerous, as the customer could change the ordered quantity of this product. - // We will instead add the product price to the order discount. - // $cartEvent->getCartItem()->setPrice(0)->save(); } }