File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ProductPriceDataExporter/Model/Provider Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,14 @@ public function get(array $values): array
140140 $ priceAttributeCode = $ this ->resolvePriceCode ($ row );
141141 if ($ priceAttributeCode === self ::REGULAR_PRICE ) {
142142 $ output [$ key ]['regular ' ] = $ row ['price ' ];
143- } else {
143+ } elseif ( $ priceAttributeCode !== self :: UNKNOWN_PRICE_CODE ) {
144144 $ this ->addDiscountPrice ($ output [$ key ], $ priceAttributeCode , (float )$ row ['price ' ]);
145145 }
146+
147+ // cover case when _this_ product type doesn't have regular price, but this field is required in schema
148+ if (!isset ($ output [$ key ]['regular ' ])) {
149+ $ output [$ key ]['regular ' ] = 0 ;
150+ }
146151 }
147152 $ filteredIds = array_unique (array_column ($ output , 'productId ' ));
148153 $ this ->addCustomerGroupPrices ($ output , $ filteredIds );
@@ -184,6 +189,7 @@ private function resolvePriceCode(array $row)
184189 {
185190 return $ this ->getPriceAttributes ()[$ row ['attributeId ' ]] ?? self ::UNKNOWN_PRICE_CODE ;
186191 }
192+
187193 /**
188194 * Add Customer Group Prices
189195 *
You can’t perform that action at this time.
0 commit comments