The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

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?

  • 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.

    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.

    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).

    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

    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.

  • 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

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

Sign In or Register to comment.