From fac049ef8e91be9d2b7596b8ad9e7ebc921292f6 Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Fri, 18 Jul 2014 15:32:05 +0200 Subject: [PATCH] =?UTF-8?q?Add=20ProductPrice=20import=20=09modifi=C3=A9:?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20core/lib/Thelia/ImportExport/Import/?= =?UTF-8?q?Type/ProductPriceImport.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImportExport/Import/Type/ProductPriceImport.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/ImportExport/Import/Type/ProductPriceImport.php b/core/lib/Thelia/ImportExport/Import/Type/ProductPriceImport.php index 96250a0e4..be1543965 100644 --- a/core/lib/Thelia/ImportExport/Import/Type/ProductPriceImport.php +++ b/core/lib/Thelia/ImportExport/Import/Type/ProductPriceImport.php @@ -86,12 +86,15 @@ class ProductPriceImport extends ImportHandler } $price = ProductPriceQuery::create() - ->filterByProductSaleElements($obj) - ->findOneByCurrencyId($currency->getId()); + ->filterByProductSaleElementsId($obj->getId()) + ->findOneByCurrencyId($currency->getId()) + ; if ($price === null) { $price = new ProductPrice(); - $price->setProductSaleElements($obj) + + $price + ->setProductSaleElements($obj) ->setCurrency($currency) ; } @@ -109,4 +112,4 @@ class ProductPriceImport extends ImportHandler return $errors; } -} \ No newline at end of file +}