Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 4dcf911

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-72864: Impossible to export Advanced Prices on a medium profile
1 parent 461009e commit 4dcf911

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ private function tierPriceTypeValue(array $tierPriceData): string
452452
* @param string[] $productIds Link IDs of products to find tier prices for.
453453
*
454454
* @return array Tier prices data.
455+
*
456+
* @SuppressWarnings(PHPMD.NPathComplexity)
457+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
455458
*/
456459
private function fetchTierPrices(array $productIds): array
457460
{
@@ -478,14 +481,12 @@ private function fetchTierPrices(array $productIds): array
478481
ImportAdvancedPricing::COL_TIER_PRICE_PERCENTAGE_VALUE => 'ap.percentage_value',
479482
'product_link_id' => 'ap.' .$productEntityLinkField,
480483
];
481-
if ($exportFilter) {
482-
if (array_key_exists('tier_price', $exportFilter)) {
483-
if (!empty($exportFilter['tier_price'][0])) {
484-
$priceFromFilter = $exportFilter['tier_price'][0];
485-
}
486-
if (!empty($exportFilter['tier_price'][1])) {
487-
$priceToFilter = $exportFilter['tier_price'][1];
488-
}
484+
if ($exportFilter && array_key_exists('tier_price', $exportFilter)) {
485+
if (!empty($exportFilter['tier_price'][0])) {
486+
$priceFromFilter = $exportFilter['tier_price'][0];
487+
}
488+
if (!empty($exportFilter['tier_price'][1])) {
489+
$priceToFilter = $exportFilter['tier_price'][1];
489490
}
490491
}
491492

0 commit comments

Comments
 (0)