Skip to main content
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Source Link

For anybody who finds this question, the answer is on here: Using the same Coupon code for multiple Price RulesUsing the same Coupon code for multiple Price Rules

It expands on the answer by @Amasty (deleting the unique code index from the database) but crucially it reveals the changes you need to make to Mage_SalesRule_Model_Resource_Coupon

To get it working I copied:

Mage/SalesRule/Model/Resource/Coupon.php

to

local/Mage/SalesRule/Model/Resource/Coupon.php

and commented out this statement:

$this->addUniqueField(array(
            'field' => 'code',
            'title' => Mage::helper('salesrule')->__('Coupon with the same code')
        ));

I also found it helped to ensure the two coupons had different labels - but I have a feeling that was an extension complaining rather than Magento core.

For anybody who finds this question, the answer is on here: Using the same Coupon code for multiple Price Rules

It expands on the answer by @Amasty (deleting the unique code index from the database) but crucially it reveals the changes you need to make to Mage_SalesRule_Model_Resource_Coupon

To get it working I copied:

Mage/SalesRule/Model/Resource/Coupon.php

to

local/Mage/SalesRule/Model/Resource/Coupon.php

and commented out this statement:

$this->addUniqueField(array(
            'field' => 'code',
            'title' => Mage::helper('salesrule')->__('Coupon with the same code')
        ));

I also found it helped to ensure the two coupons had different labels - but I have a feeling that was an extension complaining rather than Magento core.

For anybody who finds this question, the answer is on here: Using the same Coupon code for multiple Price Rules

It expands on the answer by @Amasty (deleting the unique code index from the database) but crucially it reveals the changes you need to make to Mage_SalesRule_Model_Resource_Coupon

To get it working I copied:

Mage/SalesRule/Model/Resource/Coupon.php

to

local/Mage/SalesRule/Model/Resource/Coupon.php

and commented out this statement:

$this->addUniqueField(array(
            'field' => 'code',
            'title' => Mage::helper('salesrule')->__('Coupon with the same code')
        ));

I also found it helped to ensure the two coupons had different labels - but I have a feeling that was an extension complaining rather than Magento core.

Source Link
WillPS
  • 157
  • 9

For anybody who finds this question, the answer is on here: Using the same Coupon code for multiple Price Rules

It expands on the answer by @Amasty (deleting the unique code index from the database) but crucially it reveals the changes you need to make to Mage_SalesRule_Model_Resource_Coupon

To get it working I copied:

Mage/SalesRule/Model/Resource/Coupon.php

to

local/Mage/SalesRule/Model/Resource/Coupon.php

and commented out this statement:

$this->addUniqueField(array(
            'field' => 'code',
            'title' => Mage::helper('salesrule')->__('Coupon with the same code')
        ));

I also found it helped to ensure the two coupons had different labels - but I have a feeling that was an extension complaining rather than Magento core.