How to Code Exclusivity Into Website?

12 replies
Hey Coder Warriors,

Here's a tough one:

The project: limit purchases of a product to one person per city per type of service. For example, only one house cleaning service in Boulder, CO can buy the product.

The idea is to keep an area exclusive to the first service provider to buy the product in an area. Almost all services, so no way to count how many. All cities in the USA, with major cities broken down into smaller areas. So at least 200.

Is there a way to code this into a website or payment processor (not PayPal or BrainTree) so that buyer can choose his service and area? And then after his purchase has processed, this service and area are removed, so no longer an available choice?
#code #exclusivity #multiple choice #website
  • Profile picture of the author RobinInTexas
    You could modify a shopping cart that draws from inventory.
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[9115727].message }}
  • Profile picture of the author Valdor Kiebach
    Have all the areas in a database then have the buyer select their desired area from a list generated from the entries in the database.

    When the purchase has been confirmed remove that area from the database so it does not get shown as a purchase option.

    Should be easy with php so yes it can coded into a website.
    {{ DiscussionBoard.errors[9116055].message }}
    • Profile picture of the author NeverTooLate
      Originally Posted by Valdor Kiebach View Post

      Have all the areas in a database then have the buyer select their desired area from a list generated from the entries in the database.

      When the purchase has been confirmed remove that area from the database so it does not get shown as a purchase option.

      Should be easy with php so yes it can coded into a website.
      Can the removal from the database be automated?
      {{ DiscussionBoard.errors[9116069].message }}
      • Profile picture of the author David Beroff
        Originally Posted by NeverTooLate View Post

        Can the removal from the database be automated?
        Sure. But that's exactly Robin's solution; shopping carts can limit the available inventory, including an inventory of "one".
        Signature
        Put MY voice on YOUR video: AwesomeAmericanAudio.com
        {{ DiscussionBoard.errors[9116914].message }}
  • Profile picture of the author jeffatrackaid
    Yes, this is certainly doable. I don't know of any off-the-shelf programs that can do this but in general, I would set it up this way:

    1) have a check availability tool on your site that uses city/zipcode to search depending on how you define territories.

    2) that polls your database to see if there is availability.

    3)
    a. if it is available, then proceed to checkout
    b. if not, ask if the person wants to be notified if it comes available

    4) when someone purchases update the availability in your database

    I have a friend who has a franchise business that operates this way. Their volume is low so they just update the database manually once orders are approved - but it certainly could be automated.
    {{ DiscussionBoard.errors[9117296].message }}
  • Profile picture of the author MightyWarrior
    Originally Posted by NeverTooLate View Post

    Hey Coder Warriors,

    Here's a tough one...

    Is there a way to code this into a website or payment processor:

    1. so that buyer can choose his service and area?
    2. after his purchase this service and area are removed?

    Everyone is saying database, and that's fine, but you could also
    simply generate all 200 pages so that they are static.

    I guess the key that nobody is talking about is using a tracking
    pixel once the purchase has been made to update a counter.

    Most processors allow you to include a redirect upon successful
    purchase. This whole exclusivity/purchase "tough one" can be
    easily coded in php with or without a database, or any other
    language for that matter.
    {{ DiscussionBoard.errors[9152020].message }}
    • Profile picture of the author David Beroff
      Originally Posted by MightyWarrior View Post

      I guess the key that nobody is talking about is using a tracking
      pixel once the purchase has been made to update a counter.
      The problem with pixels is that the graphic may not be loaded; it's not the appropriate vehicle for this, and could result in double-delivery, the precise problem that the OP is trying to avoid.

      Even if it's very simple, a database is the correct answer. The shopping cart approach uses a database under the covers. (Unless I'm missing something, even pixel-tracking systems use databases, as well.)
      Signature
      Put MY voice on YOUR video: AwesomeAmericanAudio.com
      {{ DiscussionBoard.errors[9152120].message }}
      • Profile picture of the author MightyWarrior
        Originally Posted by David Beroff View Post

        The problem with pixels is that the graphic may not be loaded; it's not the appropriate vehicle for this, and could result in double-delivery, the precise problem that the OP is trying to avoid.

        Even if it's very simple, a database is the correct answer. The shopping cart approach uses a database under the covers. (Unless I'm missing something, even pixel-tracking systems use databases, as well.)

        To each his own.... yeah, I realize those
        1x1 tracking pixels take a long time to load

        And double-delivery.... oh my, the after-sales url
        just might make the sold page be removed twice


        Static pages don't require a database... pixels
        can be used to trigger any action you want.

        Databases require indexing, overhead, all of what
        IS NOT REQUIRED...


        So i've made $3000 per wk as a senior systems
        software engineer as a consultant for years...

        do what you want... it's never wrong to suggest
        other alternatives and NO databases are NOT
        required for something as simple as this...


        the op is talking 200 pages... come on!

        Not all coding requires a database.
        {{ DiscussionBoard.errors[9152603].message }}
  • Profile picture of the author NeverTooLate
    Thank you MW and DB. Of course that is as clear as mud to non-developers. What kind of coder would I hire to do that?
    {{ DiscussionBoard.errors[9155937].message }}

Trending Topics