Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    350
    Plugin Contributions
    0

    Default only one per customer...

    I posted this before, but maybe there are some new members who possibly made this happen, you never know.....

    I have a cart owner who wants to limit the sale of one particular item to "One per customer" (not just one per order, that's easy). I know, he can go in if they order a second time and just delete the order, but this is something he wants to work on it's own. I currently have that one item outside of the cart system, using a cookie to track the buyer (I would try to do it within the cart system, but I have had no success integrating non-cart cookies into the cart system), but if the buyer is savvy, they can delete the cookie to circumvent the lockout. I need something that can be added to the database that says "already bought" so the user cannot possibly bypass the system to buy a second one.
    I have tried a few things, but nothing has worked so far. I usually figure these things out eventually, but I'm tired of hitting my head against the wall on this one.
    Ripper
    Oz Website Services
    www.oz-web.net

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: only one per customer...

    You could build a test in that checks when the product is added to the cart is it set to 1 per customer ... then not allow it to be added and post a message ...

    This would require some custom coding but it can be done ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2005
    Posts
    350
    Plugin Contributions
    0

    Default Re: only one per customer...

    That's what I am attempting to do, but my experience is limited..... I was hoping for a few places to start looking for where I can hijack the cart process for this one item.
    Ripper
    Oz Website Services
    www.oz-web.net

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: only one per customer...

    /includes/main_cart_actions.php manages all the cart actions ...

    You need to catch the products_id on the way in ...

    Then do a check on the orders the customer has made to see if they purchased this product before ... as in do any of the orders have orders_products that match the products_id for this product ...

    If so, stop the add to cart before it happens and toss out a message that says: no way jelly bean ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jul 2005
    Posts
    350
    Plugin Contributions
    0

    Default Re: only one per customer...

    Thanks, I'm sure I'll be back on this one.....
    It's the most involved edit I've done yet.
    Ripper
    Oz Website Services
    www.oz-web.net

 

 

Similar Threads

  1. How can I limit one items quanity as one per customer?
    By attroll in forum Managing Customers and Orders
    Replies: 18
    Last Post: 18 Apr 2011, 01:27 AM
  2. Displays only one attributedimage per row
    By Del in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Aug 2008, 07:24 AM
  3. Limit one per customer
    By Ripper in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Oct 2006, 02:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg