Skip to content

Commit 4cfa983

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-72864: Impossible to export Advanced Prices on a medium profile
1 parent 8fc10a2 commit 4cfa983

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,13 @@ protected function getExportData()
269269
try {
270270
$productsByStores = $this->loadCollection();
271271
if (!empty($productsByStores)) {
272-
$productLinkField = $this->getProductEntityLinkField();
273-
/** @var string[] $productLinkIds */
272+
$linkField = $this->getProductEntityLinkField();
274273
$productLinkIds = [];
275274

276-
foreach ($productsByStores as $productByStores) {
277-
$productLinkIds[]
278-
= array_pop($productByStores)[$productLinkField];
275+
foreach ($productsByStores as $product) {
276+
$productLinkIds[array_pop($product)[$linkField]] = true;
279277
}
280-
$productLinkIds = array_unique($productLinkIds);
278+
$productLinkIds = array_keys($productLinkIds);
281279
$tierPricesData = $this->fetchTierPrices($productLinkIds);
282280
$exportData = $this->prepareExportData(
283281
$productsByStores,

0 commit comments

Comments
 (0)