Limit purchase to one time only

gl330kgl330k Member
in Bugs & Feature Requests edited June 2008
Hey all,

We are trying to setup a situation where someone can purchase an item once and only once. We know how to limit quantity in the shopping cart but I'm wondering how we can prevent them from coming back and purchasing again? Would this have to be a cookie set following purchase and then during checkout we look for cookie? or is there a better way to accomplish this?

Thanks
Comments
  • brettbrett FoxyCart Team
    Interesting question that I'm not sure I've ever heard before. There are obviously going to be problems no matter how you do it, so it's kind of a matter of what you're willing to do.

    COOKIES:
    If you go cookies, the user could just open up a different browser or clear their cookies. Or use a different computer. So... you definitely need to consider that.

    IP:
    You could potentially block IPs, though that might have unintended side effects with certain ISPs (AOL, I believe, might be a problem) or people using proxies (though I imagine that'd be a little less common).

    DATAFEED XML:
    You could run the XML through your own system to compare against fields like name, email, IP, and address. If you flag the order as a repeat (according to whatever criteria you want) you could void out the transaction and send an email notifying the customer that it's been cancelled.

    The cookie method would certainly work and be the "easiest", but it's also potentially the easiest to abuse, which may or may not be a problem depending on what you're trying to do.

    I hope that helps. Let me know.
  • gl330kgl330k Member
    Brett,

    I like the idea about Datafeed XML. Assuming we were successful in getting all the data from the feed into our own db or whatever... how could we catch someone at the login to checkout process. Because I see that as the point where we compare their login email with the emails we'd have on file from the datafeed. Basically is there a way to get at the customer's email address once they are logged in? From there we could throw up an alert and hide checkout button, etc.

    Thanks
  • brettbrett FoxyCart Team
    Yeah, you could add an onchange event to the email field on checkout, do some AJAX to compare it to your own db, and return whatever is appropriate. It's kind of cross domain, but I'm pretty sure you could get around it one way or another.

    At that point, however, they might just enter a different email address. Would that be acceptable? I'm not really sure how to "solve" the problem in a reliable way that people couldn't easily sidestep.
  • lukeluke FoxyCart Team
    Would unique, required coupons help in this matter?

    We don't have coupons, but it's something we'll have eventually. Just curious. :)
  • gl330kgl330k Member
    Luke,

    Yes. that would work in our case. Assuming we could have a coupon that worked once and only once per registered account.

    Thanks
Sign In or Register to comment.