File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
app/code/Magento/Catalog/Model/Product Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -182,16 +182,19 @@ public function getList($sku, $customerGroupId)
182
182
: $ customerGroupId );
183
183
184
184
$ 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
+ }
195
198
}
196
199
}
197
200
return $ prices ;
You can’t perform that action at this time.
0 commit comments