$salesShares[$storeId]['marketplace'] = round($market / $total, 4);
}
}
+
foreach ($weeklyForecasts as $item) {
+ $groupsArr = explode('_', (string)$item['matrix_group']);
+ $baseGroup = $groupsArr[0];
$storeItem = (int)$item['store_id'];
$guid = (string)$item['product_guid'];
+ $group = $baseGroup;
+ if (!in_array($guid, $actualProducts)) {
+ continue;
+ }
+ $group = (string)$item['matrix_group'];
$type = (string)$item['type'];
$forecastValue = (float)$item['week_forecast'];
if (isset($salesShares[$storeItem]) && isset($salesShares[$storeItem][$type])) {