Magento Coupons Limit Per Use or Per Customer Not Working – Troubleshooting

couponmagento-1.9shopping-cart-price-rules

In the screenshot you can see my options.

Coupon configuration

I have created a coupon to have the free first shippings.

What i need is to have one unique code (Example: FREEFIRSTSHIPPING) that can be used only one time, but that every logged customers can use this same code one time.

The code works well, setting my Uses per Coupon value to 0, but i have noticed that i can use this code unlimited times, and this is wrong.

Is it a Magento 1.9 bug? Or am i doing something wrong?

PS: I have no coupons related extensions installed.

Best Answer

It's a known magento bug. Magento does not track coupons with empty discount (as in your case)

Correct settings are:

  • Use per coupon = 0 or empty,

  • Use per client = 1,

And modify the code in the Mage_SalesRule_Model_Observer (copy to local of course) from

    // use each rule (and apply to customer, if applicable)
    if ($order->getDiscountAmount() != 0) {

to, say

    if (true) {

Edit: You can just copy the file from

app\code\ **core** \Mage\SalesRule\Model\Observer.php 

to

app\code\ **local** \Mage\SalesRule\Model\Observer.php

and make all changes in the local version.

Related Topic