WP-e-Commerce icon indicating copy to clipboard operation
WP-e-Commerce copied to clipboard

Single use coupon always remains used.

Open benhuson opened this issue 10 years ago • 6 comments

Set a coupon to "Deactivate coupon after it has been used.".

After making a purchase with a single use coupon the coupon is deactivated as expected.

However, if you reactivate the coupon or change it's name, it stays flagged as used so it is impossible to re-use it by editing it.

I suggest that a single use coupon should be reset under any of the following conditions:

  • If the coupon is reactivated
  • if the coupon name is changed

I don't think the flag should be removed if any other parameters are changed. I'm not entire certain we should remove the flag on name change, maybe only on re-activation.

Thoughts anyone?

benhuson avatar Jan 21 '15 08:01 benhuson

My two-cents - it is bad accounting practice to “re-enable” a used single-use coupon. Instead, one should be able to duplicate a used single-use coupon creating a new enabled coupon. If a coupon can be re-enabled or renamed, there is a loss of audit trail.

--  Tom Ransom Sent with Airmail

1bigidea avatar Jan 21 '15 18:01 1bigidea

Good work @benhuson @1bigidea :)

instinct avatar Jan 21 '15 19:01 instinct

@1bigidea I agree with you from an audit trail point of, but at the moment you can change the coupon code, edit parameters and delete the coupon after it has been used which would also mess up that audit trail, so the option is there to mess up that audit trail if you do any of those things.

So I guess the discussion is how should this work? Should we allow people to mess up that audit trail if they want?

Also bear in mind that the current DB structure doesn't actually link a coupon use to a specific order, it just records the code used for a purchase. As you are allowed duplicate coupon codes (for valid reasons) this doesn't provide a complete accurate audit trail anyway.

It is feasible I guess that if you have a single use code, you may want to set up that same code again in future - obviously not best practice but I don't know that we should limit that possibility? I guess it should be set up as a new coupon with the same code as we allow duplicates.

My issue at the moment is it feels like you can edit/change/reuse that code, but it won't work and there's no feedback to say that it has been used and cannot be re-used.

benhuson avatar Jan 22 '15 09:01 benhuson

Look forward to seeing the outcome, re. audit best practise and coupons. I had similar concerns for Sales Logs... https://github.com/wp-e-commerce/WP-e-Commerce/pull/183

ace-dent avatar Jan 22 '15 19:01 ace-dent

Punting this to a future release pending any further traction.

JustinSainton avatar Jul 16 '15 19:07 JustinSainton

Just got this report: https://github.com/wp-e-commerce/WP-e-Commerce/pull/2090#issuecomment-263758477

Not totally related, but at least in the ballpark

JustinSainton avatar Nov 30 '16 02:11 JustinSainton