I have a coupon code that exists in magento (version I think it it was created with auto generation. At least that is what I guess, because I cannot create a new one and I cannot find it using the filter in the admin panel.

My question is: how can I find out which coupon that is? How can I search/filter them in the admin panel?

1 Answer 1


There is no way to find the rule in the adminpanel.

You can search directly in the Database. All auto generated codes are in the Table salesrule_coupon. With this Query you can find the Rule ID:

SELECT rule_id FROM salesrule_coupon WHERE code = "YOUR_CODE_HERE"

The output is the Rule ID. You can filter the ID in the Shopping Cart Price Rules Grid

If you want to implement this feature in your adminpanel, you could rewrite the block Mage_Adminhtml_Block_Promo_Quote_Grid. In _prepareCollection, you have to join the salesrule_coupon table and create and add a filter to the coupon_code Column:

'filter_condition_callback' => array($this, '_filterMassCouponCode')

In the private function _filterMassCouponCode($collection, $column){} you can add your own filter.

  • Why is magento not able to do that. I know I can find it in the database. But if some else is looking for this, he always has to come to me.
    – Seb
    Sep 12, 2016 at 15:37
  • I think the mass coupon feature was implemented after the basic module was created and the Grid is just the basic grid. So its just a addon to the salerules. I edited by answer add a solution how you could implement this feature.
    – Pawel
    Sep 12, 2016 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.