Skip to content

Commit 4ffcb02

Browse files
committed
ACPT-1408: Investigate 1m call on 1k rules
1 parent 24e68b1 commit 4ffcb02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/SalesRule/Model/Quote/Discount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ public function collect(
196196
unset($itemsToApplyRules[$key]);
197197
}
198198
}
199-
$this->calculator->initTotals($items, $address);
200199
}
200+
$this->calculator->initTotals($items, $address);
201201
foreach ($items as $item) {
202202
if (!isset($itemsAggregate[$item->getId()])) {
203203
continue;

setup/src/Magento/Setup/Fixtures/CartPriceRulesFixture.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function execute()
123123
*/
124124
public function generateCondition($ruleId, $categoriesArray)
125125
{
126-
//$value = $this->cartPriceRulesProductsFloor + $ruleId % 3;
126+
$value = $this->cartPriceRulesProductsFloor + $ruleId % 3;
127127
return [
128128
'conditions' => [
129129
1 => [
@@ -149,8 +149,8 @@ public function generateCondition($ruleId, $categoriesArray)
149149
'type' => \Magento\SalesRule\Model\Rule\Condition\Product::class,
150150
'attribute' => 'category_ids',
151151
'operator' => '==',
152-
// 'value' => $categoriesArray[$ruleId % count($categoriesArray)][0],
153-
'value' => 2,
152+
'value' => $categoriesArray[$ruleId % count($categoriesArray)][0],
153+
// 'value' => 2,
154154
],
155155
],
156156
'actions' => [

0 commit comments

Comments
 (0)