Skip to content

Commit b787fc6

Browse files
lemundo-teamlemhannesfballiano
authored
Improved cart/checkout performance optimizing coupon code check query (#1110)
Co-authored-by: Hannes Drittler <[email protected]> Co-authored-by: Fabrizio Balliano <[email protected]>
1 parent cacdb5f commit b787fc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/core/Mage/SalesRule/Model/Resource/Rule/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function setValidationFilter($websiteId, $customerGroupId, $couponCode =
8585
$connection->quoteInto(
8686
'main_table.rule_id = rule_coupons.rule_id AND main_table.coupon_type != ?',
8787
Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON
88-
),
88+
) . $connection->quoteInto(' AND rule_coupons.code = ?', $couponCode),
8989
['code']
9090
);
9191

0 commit comments

Comments
 (0)