Hi there,
I have a requirement where I should apply a discount (based on a voucher code) only the first time for a user. This should work for anonymous and logged in users.
Since it should work for anonymous users too, I was thinking about using a cookie that indicates if the user has been given the discount before. (I realize that this isn't foolproof as people can clear their cookies but the customer is willing to take that risk). However, I can't find a way to set the cookie when the discount has been applied (maybe in CheckoutDoneOrderIsComplete?) nor can I find a way to override / intercept the validation of the voucher code or to enable / disable the discount based on that cookie.
Does anyone have any pointers on how I could implement this?
Thanks,
Imar