Skip to content

Commit 54830d6

Browse files
author
Cristian Partica
committed
FearlessKiwis-MAGETWO-35688-FPT-Final-price-of-Simple-Product-isn-t-recalculated-after-selecting-options-on-product-page
- fix for product with multiple options, area type
1 parent 787564d commit 54830d6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

app/code/Magento/Weee/Model/Observer.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,17 @@ public function getPriceConfiguration(\Magento\Framework\Event\Observer $observe
209209
if (is_array($priceConfig)) {
210210
foreach ($priceConfig as $keyConfigs => $configs) {
211211
if (is_array($configs)) {
212-
foreach ($configs as $keyConfig => $config) {
213-
$priceConfig[$keyConfigs][$keyConfig]['prices']['weeePrice']= [
214-
'amount' => $config['prices']['finalPrice']['amount'],
212+
if (array_key_exists('prices', $configs)) {
213+
$priceConfig[$keyConfigs]['prices']['weeePrice'] = [
214+
'amount' => $configs['prices']['finalPrice']['amount'],
215215
];
216+
} else {
217+
foreach ($configs as $keyConfig => $config) {
218+
$priceConfig[$keyConfigs][$keyConfig]['prices']['weeePrice'] = [
219+
'amount' => $config['prices']['finalPrice']['amount'],
220+
];
221+
}
216222
}
217-
218223
}
219224
}
220225
}

0 commit comments

Comments
 (0)