Imagine you want to set up a minimalist e-commerce website for a \"lemonade stal
ID: 651953 • Letter: I
Question
Imagine you want to set up a minimalist e-commerce website for a "lemonade stall". You only have two products - a large glass of lemonade OR a small glass of lemonade (always either/or; never both). You want people to select, to pay, to enjoy - that fast, that simple, and with no other distracting features/options offered. Because you're a child who can't add, and in any case you make the rules, everyone has to pay for their one glass of lemonade separately. A shopping cart makes no sense, and in fact detracts from the value of the product you are offering. On the other hand, you do want to encourage repeat customers, so a customer database of some kind might be useful (or might not). And somewhere in the future you can imagine introducing a medium glass of lemonade as a third product. But that is as complex as it can possibly get.
If that is your brief, what are the options one should consider? Writing the functionality from the ground up? Taking an off-the-shelf package and configuring/stripping it back? Using a shopping cart behind the scenes, but hiding it? I'm interested in knowing what approaches are viable, and which is likely to take the least work to get an acceptable result. Answers that lean towards implementation in PHP/MySQL, or e-commerce frameworks written in them, are preferred.
Explanation / Answer
If you don't need a shopping cart, put the item selection on the same page that you collect the payment information. Then submit it all in one post to your server for processing. You wouldn't need an off-the-shelf component for that, unless you weren't able to integrate the payment API on the server side.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.