I am trying to modify coupon code functionality. I have got a situation where I am not able to find where a coupon code is validated. I have searched the entire code base. Can anyone point me in right direction?
I am trying to apply Multiple Coupon codes.
Best Answer
Take a look at the class
Magento\SalesRule\Model\Utility
located at thevendor/magento/module-sales-rule/Model/Utility.php
. Coupon code validation starts in the methodcanProcessRule()
where it can mark the rule as invalid if coupon code does not match conditions like usage per customer etc.