Amasty Wildcard Compatibility

Extension Name

Amasty_Wildcard (Wildcard and URL Coupons)



Issue Status

Resolved with modifications.


The  Amasty wildcard coupon code extension by Amasty is incompatible with MageRewards out of the box because there is a conflict on the Sales Quote model rewrite.

You may experience SQL state errors when applying coupon codes while both extensions are installed if you have not completed the required compatibility steps. The error may look like:

SQLSTATE[420000]: Syntax error or access violation: 1064 You have a n error in your SQL syntax; check the manual that coresponds to your MySQL serverversion for the right syntax to use near '`AS `primary_coupon` ON main_


1. Copy app/code/ community/TBT/Rewards/Model/Sales/Quote.php to app/code/local/TBT/Rewards/Model/Sales/Quote.php so that you are not modifying core extension files.

2. Open app/code/ local/TBT/Rewards/Model/Sales/Quote.php, change line 45:

class TBT_Rewards_Model_Sales_Quote extends Mage_Sales_Model_Quote


class TBT_Rewards_Model_Sales_Quote extends Amasty_Wildcard_Model_Sales_Quote

3. Open app/etc/modules/TBT_Rewards.xml and locate the following in lines 7-13:


4. Add the following dependency to the node (see  Resolving extension conflicts):


5. Upload new and modified files to your server.

6. Clear your cache.

Please keep in mind that implementing any modifications to your MageRewards core code does void your support agreement because you're adding dependency to the other module.

Still need help? Get Help Get Help