Skip to content

Commit

Permalink
update performance
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapjansma committed Mar 28, 2023
1 parent d9f4a5b commit fdf11c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description":"Isotope Stock.",
"type": "contao-bundle",
"license":"AGPL-3.0-or-later",
"version": "1.0.16",
"version": "1.0.17",
"require": {
"contao/core-bundle": "^4.9",
"isotope/isotope-core": "^2.6",
Expand Down
6 changes: 6 additions & 0 deletions src/Helper/ProductHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ public static function loadStockInfoForProducts(array $product_ids) {
}
}
foreach($pids as $pid) {
if (!isset($productAccounts[$pid])) {
$productAccounts[$pid] = $accounts;
}
if (!isset($productAccountTypeBalance[$pid])) {
$productAccountTypeBalance[$pid] = $accountTypeBalance;
}
self::$productAccounts[$pid] = $productAccounts[$pid];
self::$productAccountTypes[$pid] = $productAccountTypeBalance[$pid];
}
Expand Down

0 comments on commit fdf11c9

Please sign in to comment.