Log in or create an account
If you have an account with us, please log in.

You have no items in your shopping cart.

Frequently Asked Questions

How can we help you?

banner image

Not enough memory or server 500 error while generating coupons in Magento

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

and replace this

protected function _maintainAddressCouponCode($address, $rule)
        foreach ($rule->getCoupons() as $coupon) {
            if (strtolower($coupon->getCode()) == strtolower($this->getCouponCode())) {

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) {

        return $this;

According to the statistics, you may find helpfull the following question about magento 2 500 error after upgrade.

Rate the answer?

Total rating: 5.0

If you didn’t find the answer on your question, please, ask here:

Back to top