Get Free Audit

Mаgentо Coupons Report

Sep 18, 2013

1555 Pavel Novitsky

Mаgentо Coupons Report

It is sad to say, but in spite of the contemporary well developed and tool-rich marketing system, the main methods to attract customers and increase sales are still quite traditional and involve various promotions, sales, discounts and coupons.  Of course, Magento provides a sufficiently rich functionality for analysis and statistics.  But, as you know, there are never too many tools.  That is why we decided to make another present surprise to our sales managers.

Basically, there is, of course, available a default report on used coupons under the Reports – Sales – Coupons section.  But we have decided to push the limits and go further.  First of all, we will start with creating a module with a custom grid (check here for more details about creating a module).

We will describe only the main part – that is creating of a grid.


The main request is to find all orders where соupоn_соde is specified.  This will provide us with the number, amount, status of the order and the used coupon itself.  However, coupon code looks not informative enough.  That is why let’s also add the name of the coupon: simply join the models salesrule/coupon and salesrule/rule and thus we will get the information about the rule used.

Seems to me, now it looks pretty informative and functional.

1Mаgentо Coupons Report

Actually, we could already stop here, yet there is still a question to be answered:  What should we actually do with all these results?

Let’s add the possibility to instantly go to coupon and order pages.

Not to show the entire listing let me give you just an example for the name of the rule.  Indicate your renderer in the grid’s block:

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey


And the renderer itself:


Now it looks like to be complete.  Let’s see how the module will perform in test runs.

Check out the ready-to-use module on GitHub:

CouponUsage

Download CouponUsage from GitHub

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey
Tags:

7 Comments

  1. Nice extension! I tried to add a column to show the subtotal of order instead of grand total (I don’t want to include shipping costs), but column is blank. I’ve tried these:

    $this->addColumn(‘subtotal_amount’, array(
    ‘header’ => Mage::helper(‘salesrule’)->__(‘Sales Subtotal Amount’),
    ‘sortable’ => false,
    ‘type’ => ‘currency’,
    ‘currency_code’ => $currencyCode,
    ‘total’ => ‘sum’,
    ‘index’ => ‘subtotal_amount’,
    ‘rate’ => $rate,
    ));

    and this:

    $this->addColumn(‘subtotal_amount’, array(
    ‘header’ => Mage::helper(‘sales’)->__(‘Subtotal Amount’),
    ‘index’ => ‘subtotal_amount’,
    ‘type’ => ‘currency’,
    ‘currency’ => ‘order_currency_code’,
    ));

  2. A million thanks for this. Its a pity that this is not available out of the box in magento. I was stuck doing this, and your blog post certainly helped

  3. Firstly, thank you for posting this, it has been a lifesaver!!!! I just have one quick query – is it possible to also display the customer name? (we are looking to be able to reconcile commission payments to reps based on a coupon code they use).

    Your help is greatly appreciated, Dan

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *