Skip to content

Commit 6450501

Browse files
committed
ACP2E-1965: load product attributes related to active sales rules only
1 parent bf37250 commit 6450501

File tree

1 file changed

+4
-0
lines changed
  • app/code/Magento/SalesRule/Model/ResourceModel

1 file changed

+4
-0
lines changed

app/code/Magento/SalesRule/Model/ResourceModel/Rule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ public function getActiveAttributes()
312312
['ea' => $this->getTable('eav_attribute')],
313313
'ea.attribute_id = a.attribute_id',
314314
[]
315+
)->joinInner(
316+
['sr' => $this->getTable('salesrule')],
317+
'a.' . $this->getLinkField() . ' = sr.rule_id AND sr.is_active = 1',
318+
[]
315319
);
316320
return $connection->fetchAll($select);
317321
}

0 commit comments

Comments
 (0)