Live data from Hacker News

Ask HN: What is a shopping cart and why wouldn't I just write my own?

news.ycombinator.com

1–10 of 17 posts

Ask HN: What is a shopping cart and why wouldn't I just write my own?

#1
Hi HN-

I'm having trouble understanding a very basic concept. I build an online store, and since I'm a programmer, I let the user collect their items in a table associated with their session id. Then, I compute the order total. My server goes to the payment gateway server and charges the credit card. Then I ship stuff. What is the purpose of a shopping cart and why would I pay for a 3rd party one? They all appear to require some kind of programming, but if I already know how to program, why wouldn't I just build my own?

Note: I'm not being a smart-ass, I really don't understand what I'm missing, but I'm obviously missing something. Can someone explain what a shopping cart is to an e-commerce newbie?

Thanks for any help, Karl

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#2
You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#3
post #2

You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home brewed shopping cart in 15 minutes? Again, I'm not being a smart-ass, I really don't see what I'm missing. (thanks for your reply)

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#4
post #2

You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

Robert Morris wrote Viaweb's shopping cart. He is a smart programmer, and he found it nontrivial. Years later he was still encountering bugs from weird combinations of user actions.

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#5
post #2

You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

You are right Karl but the shopping cart which you'll end up creating will be something which just serves the bare bone needs.

Some of the other features of a shopping cart

1. Integration with a checkout system (Single page Vs Multi Page) - this is itself a demon in itself.

2. Bells and Whistles on the cart itself like tax & shipping cost estimator

I guess when you say you can create a shopping cart in 15 mins you are not keeping in mind any checkout flow integration or estimators or much control with items in the cart e.g. changing sku options like color etc.

There are some open source systems like Magento which can be looked at too.

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#6
post #2

You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

Well, to expand on that, a lot of people don't just use the shopping cart, but all of the combined stuff like payment processing, the CMS for adding in products, user accounts, built-in APIs and many other features.

I was involved with an ecommerce startup that built all of this from scratch to control everything legally and then sell it, and quite honestly, it is an absolutely incredible amount of work.

Usually, it is easier to find software that's already been written to meet your needs unless you're trying to create a unique value proposition in some way.

If you're building a standard e-commerce site, it might make sense to use some software package that's prebuilt with what you need.

Either way, if you think you can do it in 15 minutes and want to build it, have fun with it and do it yourself.

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#7
post #2

You can definitely write your own shopping cart if you want, its just that its a problem that so many businesses have solved before so you'd likely just be wasting time reinventing the wheel when you could be building up other aspects of your business, finding clients, marketing, etc.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

If it's only 15 minutes of work, why would you bother asking the question at all?

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#8
Some things your shopping cart might be missing which are non trivial.

  - Coupons or PROMOS ( X% off, $Y off, stackable)
  - Persisting a shopping cart between visits if an user doesn't checkout.
  - Saving items from a shopping cart to wishing list and vice-versa
  - Integration with multiple payment gateways but exposing a single interface

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#9
post #7

Earlier quoted context omitted.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

If it's only 15 minutes of work, why would you bother asking the question at all?

Because I'm obviously missing something. What else is a shopping cart besides a session associated table?

Re: Ask HN: What is a shopping cart and why wouldn't I just write my own?

#10
post #6

Earlier quoted context omitted.

See, this is what I don't understand. Building a shopping cart is like 15 minutes of work if I'm already building my own e-commerce site, isn't it? Are 3rd party shopping carts for non-programmers? I mean, as far as I can tell, it's literally just a session-associated table of items. What else is a shopping cart besides that? Why would I spend 2 days reading the "Zen cart" manual and API when I can finish my home bre…

Well, to expand on that, a lot of people don't just use the shopping cart, but all of the combined stuff like payment processing, the CMS for adding in products, user accounts, built-in APIs and many other features. I was involved with an ecommerce startup that built all of this from scratch to control everything legally and then sell it, and quite honestly, it is an absolutely incredible amount of work. Usually, it…

ah, ok, this make sense. So, the ecommerce programmer would write all of the catalog stuff, then hand it over to a 3rd party shopping cart for payment, coupons, taxes and shipping, etc.? is that that non-trivial part?
Post reply on HN