Commit cf03935940174f2d6e0fd350e16a37a44009ff49
1 parent
a1aeeadf
-Import price fix
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
common/modules/product/models/Import.php
@@ -165,7 +165,14 @@ | @@ -165,7 +165,14 @@ | ||
165 | if (!$city_name) { | 165 | if (!$city_name) { |
166 | if (!$count) { | 166 | if (!$count) { |
167 | $productVariant->status = 0; | 167 | $productVariant->status = 0; |
168 | - $productVariant->save(false, ['status']); | 168 | + if ($price_promo) { |
169 | + $productVariant->price_old = $price; | ||
170 | + $productVariant->price = $price_promo; | ||
171 | + } else { | ||
172 | + $productVariant->price = $price; | ||
173 | + $productVariant->price_old = $price_promo; | ||
174 | + } | ||
175 | + $productVariant->save(false, ['status', 'price', 'price_promo']); | ||
169 | continue; | 176 | continue; |
170 | } | 177 | } |
171 | $city_name = 'Склад'; | 178 | $city_name = 'Склад'; |