We sell vegetables, and sometimes nature blesses us with excess. I'm looking for a way to offer them to our customers on a first-come/first-serve basis.
If I send out an email that says "we have 10 extra shares of squash" and 20 people say that they want it, then I have to tell half of them that it's already spoken for.
I could host an e-commerce thing, but all of the ecomm projects out there are WAY too much. I don't need payment processing or anything, just an inventory/reservation system.
@natehn Interesting, didn't think of that! I wonder if there's a way to lock a certain part of the pad from editing, don't want people to overwrite each other or have full write access to everything.
@winduptoy on the server-side store a text file containing item names and quantities.
when a user reserves, update the entry in the text file with the new value, send yourself a notification.
on the client-side, read values from the text file, display a form if the given products quantity is not 0, and a "sold out" message otherwise.
the simplest method I can imagine, very interested in alternative solutions.
happy to help set this up if no better solution is proposed :)
@deianeira After sleeping on it, your direction is where I'm leaning, building it as a CGI script.
I was thinking that instead of a numeric value, build the text file as a series of STOCK/SELL append-only transactions to make the design more functional.
My only concern is concurrency. Do you think I could pull this off with basic file locking and not have any double-spend issues?
Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.