foreach ($productData['values'] as &$value) {
$storeId = $value['store_id'];
-
- if (!isset($forecast[$storeId][$guid])) continue;
-
- $forecastData = $forecast[$storeId][$guid];
$value['title'] = [];
- foreach ($forecastData as $type => $groups) {
- foreach ($groups as $group => $amount) {
- $value['title'][$type][$group] = $amount;
+ if (isset($forecast[$storeId][$guid])) {
+ $forecastData = $forecast[$storeId][$guid];
+
+ foreach ($forecastData as $type => $groups) {
+ foreach ($groups as $group => $amount) {
+ $value['title'][$type][$group] = $amount;
+ }
}
}
}