3

Would there be any way for me to know how many times a promotion rule was used to buy products in magento? Is there a table that saves this data?

2
  • You need to get this info programmatically or just as a info for the store owner (as this would be available in the backend already)? Feb 5, 2018 at 13:51
  • I need to simply visualize this, to have a control over some rules. Feb 5, 2018 at 14:01

2 Answers 2

1

Please check out Reports > Sales > Coupon in backend.

In this report you will be able to get a list of coupons used by your customers. You can specify a date range (mandatory), a particular order status (or all) and a specific coupon code (or all).

Please note that the data is fetched on a regular basis by the scheduler (the task relevant for this report is aggregate_sales_report_coupons_data) hence your cron jobs must be up an running to review this data (else you may have to refresh the stats manually whenever needed).

2
  • 1
    This is for rules that have coupons, is there any other way to see this for rules that do not use coupons? I give discounts for parameters in the url, so it automatically picks up and applies the discount, how could I recover it? Feb 5, 2018 at 15:23
  • @GustavoSouza - What do you mean by giving discount parameters in the url? Can you update your question with more details as based on the given description I just can assume that you use a common setup - where else your comment now makes me wonder how you even apply the discounts. You do create shopping cart price rules from backend, right? Feb 5, 2018 at 15:31
0

unfortunately you can't get order reports based on cart rules which doesn't have coupon code associated with it

so this reports need to be generated through custom sql queries refer the table sales_order and column is applied_rule_ids where you can find rule id's so based on that you can prepare you reports

Note: if order contains multiple rules in it then applied_rule_ids has comma seperated values so consider that case too and if you prefer to get shipped orders report add order status filter accordingly

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.