Skip to content

Commit

Permalink
ACPT-1408: Investigate 1m call on 1k rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vzabaznov committed Jun 21, 2023
1 parent 24e68b1 commit 4ffcb02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/SalesRule/Model/Quote/Discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ public function collect(
unset($itemsToApplyRules[$key]);
}
}
$this->calculator->initTotals($items, $address);
}
$this->calculator->initTotals($items, $address);
foreach ($items as $item) {
if (!isset($itemsAggregate[$item->getId()])) {
continue;
Expand Down
6 changes: 3 additions & 3 deletions setup/src/Magento/Setup/Fixtures/CartPriceRulesFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function execute()
*/
public function generateCondition($ruleId, $categoriesArray)
{
//$value = $this->cartPriceRulesProductsFloor + $ruleId % 3;
$value = $this->cartPriceRulesProductsFloor + $ruleId % 3;
return [
'conditions' => [
1 => [
Expand All @@ -149,8 +149,8 @@ public function generateCondition($ruleId, $categoriesArray)
'type' => \Magento\SalesRule\Model\Rule\Condition\Product::class,
'attribute' => 'category_ids',
'operator' => '==',
// 'value' => $categoriesArray[$ruleId % count($categoriesArray)][0],
'value' => 2,
'value' => $categoriesArray[$ruleId % count($categoriesArray)][0],
// 'value' => 2,
],
],
'actions' => [
Expand Down

0 comments on commit 4ffcb02

Please sign in to comment.