Add ProductPrice import

modifié:         core/lib/Thelia/ImportExport/Import/Type/ProductPriceImport.php
This commit is contained in:
Benjamin Perche
2014-07-18 15:32:05 +02:00
parent 43ab7af583
commit fac049ef8e

View File

@@ -86,12 +86,15 @@ class ProductPriceImport extends ImportHandler
} }
$price = ProductPriceQuery::create() $price = ProductPriceQuery::create()
->filterByProductSaleElements($obj) ->filterByProductSaleElementsId($obj->getId())
->findOneByCurrencyId($currency->getId()); ->findOneByCurrencyId($currency->getId())
;
if ($price === null) { if ($price === null) {
$price = new ProductPrice(); $price = new ProductPrice();
$price->setProductSaleElements($obj)
$price
->setProductSaleElements($obj)
->setCurrency($currency) ->setCurrency($currency)
; ;
} }
@@ -109,4 +112,4 @@ class ProductPriceImport extends ImportHandler
return $errors; return $errors;
} }
} }