You can get such errors while using Generate & Import Coupons extension. This is a known bug in old magento versions, it has been fixed in the latest one.
There errors occur as basically Magento tries to load all coupons in the memory. You can also fix them yourself.
Find this file
app\code\core\Mage\SalesRule\Model\Validator.php
and replace this
protected function _maintainAddressCouponCode($address, $rule)
{
foreach ($rule->getCoupons() as $coupon) {
if (strtolower($coupon->getCode()) == strtolower($this->getCouponCode())) {
$address->setCouponCode($this->getCouponCode());
break;
}
}
}
with that
protected function _maintainAddressCouponCode($address, $rule)
{
/*
Rule is a part of rules collection, which includes only rules with 'No Coupon' type or with validated coupon.
As a result, if rule uses coupon code(s) ('Specific' or 'Auto' Coupon Type), it always contains validated coupon
*/
if ($rule->getCouponType() != Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON) {
$address->setCouponCode($this->getCouponCode());
}
return $this;
}
According to the statistics, you may find helpfull the following question about magento 2 500 error after upgrade.
We use cookies to help improve our services, make personal offers, and enhance your experience. If you do not accept optional cookies below, your experience may be affected. If you want to know more, please read the Cookie Policy
Please select and accept your Cookies Group
Cookie Name | Cookie Provider | Cookie Description | Cookie Lifetime | Cookie Type |
---|---|---|---|---|
Login and Registration Form