How NOT to write a web-based shopping cart - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: How NOT to write a web-based shopping cart

HC wrote:
> I just got a new job.  I'm apparently the fifth person to have worked on
> this site, and the site looks suspiciously like it did when it was first
> opened.  (Read to the end, I've left the best part there.)
> From my phone conversation with the person who originally developed the
> site:
> Me: "So, what language was the shopping cart written in?"
> Developer: "Oh!  It's been so long.  CGI, I think.  Yes.  It was written in
> CGI."
> Me: "Great!  And what language was used for the CGI?  Perl, PHP, C...?"
> Developer: "It was Perl.  Perl *is* CGI."
> And from my meeting with the manager and the owner of the store:
> Me: "So how exactly is shipping calculated?"
> Owner: "We...don't really know."
> Me: "Roughly how many orders do you receive in a month?"
> Manager: "We...don't receive them.  There's a problem with [Payment Gateway]
> so that the payments aren't going through."
> Owner: "The orders are just...disappearing somewhere."
> So tonight I'm wandering around, messing about with the shopping cart.  I'm
> not particularly liking the user interface (if you want to edit an item's
> listing, you have to find it amongst 328 others in a list - the admin
> listing isn't sorted by category) but I'm thinking possibly I'm being
> over-critical because I'm a programmer.  I'm wondering if the time we'd save
> in maintenance would outweigh the time it would take to rewrite it.
> Then I find this little gem:
> The price for each item is stored in a hidden form field on each product's
> page.  So I'm sitting here looking at the code and thinking, "'s
> just in there for some cosmetic reason."  So, I saved a copy of a $1300
> product's page on my computer and edited the hidden form field to read
> $1.00.  It actually let me add the item to my cart and check out, all
> without double-checking the price!
> Yeah...I'm gonna rewrite it!

It amazes me that people get shopping carts so catastrophically wrong....

A smooth working shopping cart is a thing of beauty, and often involves
much simpler coding than the clunky, user-unfriendly versions...

for photographic restorations

Site Timeline