Skip to content

Commit f12aac1

Browse files
committed
ACP2E-841: Advanced Pricing Import status message shows wrong count products number of updates
1 parent c302397 commit f12aac1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ protected function saveAndReplaceAdvancedPrices()
436436
if ($listSku) {
437437
$this->setUpdatedAt($listSku);
438438
}
439-
$this->countItemsCreated -= $this->countItemsUpdated;
440439
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $behavior) {
441440
if ($listSku) {
442441
$this->processCountNewPrices($tierPrices);
@@ -446,6 +445,7 @@ protected function saveAndReplaceAdvancedPrices()
446445
}
447446
}
448447
}
448+
$this->finalizeCount();
449449

450450
return $this;
451451
}
@@ -650,11 +650,18 @@ protected function processCountNewPrices(array $tierPrices)
650650
foreach ($tierPrices as $productPrices) {
651651
$this->countItemsCreated += count($productPrices);
652652
}
653-
// $this->countItemsCreated -= $this->countItemsUpdated; ///
654653

655654
return $this;
656655
}
657656

657+
/**
658+
* Finalize count of new and existing records
659+
*/
660+
protected function finalizeCount()
661+
{
662+
$this->countItemsCreated -= $this->countItemsUpdated;
663+
}
664+
658665
/**
659666
* Get product entity link field
660667
*

0 commit comments

Comments
 (0)