Skip to content

Commit 114ac4b

Browse files
author
ashutosh
committed
fixed issue #24410
1 parent 54244f7 commit 114ac4b

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

app/code/Magento/Catalog/Model/Product/TierPriceManagement.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,19 @@ public function getList($sku, $customerGroupId)
182182
: $customerGroupId);
183183

184184
$prices = [];
185-
foreach ($product->getData('tier_price') as $price) {
186-
if ((is_numeric($customerGroupId) && (int) $price['cust_group'] === (int) $customerGroupId)
187-
|| ($customerGroupId === 'all' && $price['all_groups'])
188-
) {
189-
/** @var \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice */
190-
$tierPrice = $this->priceFactory->create();
191-
$tierPrice->setValue($price[$priceKey])
192-
->setQty($price['price_qty'])
193-
->setCustomerGroupId($cgi);
194-
$prices[] = $tierPrice;
185+
$tierPrices = $product->getData('tier_price');
186+
if ($tierPrices !== null) {
187+
foreach ($tierPrices as $price) {
188+
if ((is_numeric($customerGroupId) && (int) $price['cust_group'] === (int) $customerGroupId)
189+
|| ($customerGroupId === 'all' && $price['all_groups'])
190+
) {
191+
/** @var \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice */
192+
$tierPrice = $this->priceFactory->create();
193+
$tierPrice->setValue($price[$priceKey])
194+
->setQty($price['price_qty'])
195+
->setCustomerGroupId($cgi);
196+
$prices[] = $tierPrice;
197+
}
195198
}
196199
}
197200
return $prices;

0 commit comments

Comments
 (0)