Seriously shopping carts are about as easy as it gets, or at least that's how it is for me.
All sites i create use the shopping cart i created and it works just fine.
I have created a shopping cart. It did take me quite a bit of time because I was a total php/mysql n00b when I started. I've learnt loads since then and have a cart which functions well. There are still improvements which I can and will make, but I hope to soon have a solution which I will use across all my sites.
It's been a satisfying and educational experience, and I bet if I had used someone else's script I would have spent just as long fiddling with it as if I had written my own anyway.
Created my own cart in Access/Cold Fusion, it works pretty damn well. I add stuff to it a lot and now I am working on Authorize.net integration.
Moving to our own shopping cart was one of the best choices we made.
It gave us so much flexibility (We sell cusom items and generate custom images based on what the user specifies. These images are then shown on our won shopping card).
It depends on your coding knowledge, I tried to make a shopping cart before I knew anything about php and mysql, although not overly hard, it took me a very long time, then there was the tweaking and tinkering before I got it just the way I wanted. At least now I can say making a shopping cart is easy.
Do it yourself ONLY if you know what you're doing. It is fairly easy to overlook security issues that would allow someone to modify an order that has already been completed and charged.
With that being said, the control and flexibility that comes with creating your own cart makes it totally worthwhile.
Thanks very much for the feedback guys.
I am developing the site for my MSc project using ASP.NET and SQL Server 2000.
I don't have a great deal of experience with the technologies, but I have built an application which involved having users with different status who could, for example, send messages to other users, compose/reply to/delete messages, view info relevant to them, upload documents, manage documents, edit their profile etc etc etc. There was also a admin panel for controlling everything.
I'll be starting development in a week or two. So the more reasurrance that I can do it, the better ;)
Just freshen up on your Struct and Arrays, look for some already coded carts and read them to see if you understand. Research some security issues and you should be just fine. Make sure you do extensive testing by multiple poeple before it is live.
Do yourself a favor and spend a week or more figuring out what functionality you want from a user and administrator perspective. Then spend another week or more designing it based on your function needs... including the datamodel; that means on paper or in visio or whatever you use to design your stuff. This is where you really want to try and blast holes in your cart design. Bugs caught at this level are much cheaper to fix then bugs found once you've written the code and launched it.
My advice would be to plan on spending the bulk of your budgeted time in the design area. If you nail your design you'll only invest about 20% of the project writing code. Once you have a model that your comfortable with then you can begin writing code and it putting it all together for testing.
Before you launch it, test it vigorsly for items such as math, state management, proper item aggregation, totaling, sub-totaling, updating, deleting, valid pricing etc... And here's a tip on item injection. When adding an item to a basket avoid passing the item price from a product page via a hidden form field to the basket injection mechanism and perform that price check and insert while inside of a stored procedure. Hidden form fields will leave you open to someone using code to post directly to your basket injection code with a price of their choosing.
On that note, do as many things as possible server side.
Yeah, I've done this. If you're a fairly confident programmer, then I don't see any major problems.
In terms of what a customer sees, it can be very simple. What have you got... a category page and a product page! Oh, and a few registration/payment pages.
I think my advice is: keep it simple :)
What you don't realise is how many admin pages you'll need, but I added these on as I found a need for them.
Yes, you're gonna have some bugs in there. I had a few. But these soon come out in the wash.
You'll certainly learn a lot and you'll also have good fun in doing it!
IMO the main advantage of coding something from scratch is that you have exactly what you want. But it can take some time, and if you don't have experience you'll definitely overlook something at design stage, that possibly will be hard to add later.
If you don't have previous experience in carts-coding, I'd suggested to find a free cart implementation and start modifying it; after some time you'll have something that may be will not exactly what you want, but at least it will work :) Especially recommended for MSc seekers :)
Thanks very much for the replies, they have been very useful :)
I do actually have 2 weeks allocated to the design stage, and I have just got myself a copy of Visio for the creating storyboards etc.
I am very comfortable with developing everything from product pages to an admin panel, but the shopping cart does have me a little worried when I consider the lack of time I have. I can imagine I'll spend a lot of time finding answers and trying to make things secure.
For all those people that have your own shopping cart systems online, would you be so kind to give your URL in a post so that I can take a look?
Many thanks :)
It's against the rules here to give out URLs, but I've sent you a sticky :)
There's a book called "ASP.NET E-Commerce Programming" that used to be published by Wrox Press - you can build an entire store based on the ideas in that book.
The beauty of building your own solution is that you built it and it does exactly what told it to.
The down side is that you built it and it does exactly what you told it to, which may not always be right...
I really need to get my hands on that book. Thanks very much for pointing it out to me :)
I've spent all day reading about bits and pieces to do with shopping carts etc, but I can't find much which tells you about the nity grity. I would like more information about how the ordering and payment process works and how this works with the database. Unfortunately, the info I've read on the web is a bit vague so far :( I'll keep looking though :)
I built a cart some time ago. I made a data model first, then put a lot of thought into security, and the admin functions. Coding was pretty simple once I had the model to follow.
I used a SQL server back-end. The SQL syntax was my biggest problem. Personal names and city names might contain puntuation, especially apostrophes. Make sure your SQL statements can handle them. No telling what kind of format you might see for international addresses. Military addresses are also non-standard.
Lots of testing is imperative. Try everything you can think of to break the cart.
BTW, BigHit. I connected my cart to a payment gateway. They had a very simple, well documented API. That was the easiest part of the project. Just formatted an https request to their server, received a reply, parsed it out to build a response page for my customer. It worked like a charm.
I stored order details in my SQL server, but I did not keep credit card info. I was worried about security. There are other thread here that discuss the pro's and con's of keeping cc data on your server.
I have not done it from scratch, but I have modified older versions of ablecommerce, and then totally recoded that from scratch.
The hard part is identifying the checkout process, what kind of pricing/promotion/discounts you have.
Then what information you need for tracking purposes, to make sure that you have a record of what they purchased.
In addition, we encrypt all credit card numbers.
Testing is extremely vital.
Also if you have a development environment, make sure it does not go to a https:// for dev, as it will for production. It speeds up testing processes.
also there is the matter of how you will download, or process those orders.
How will you track shipping, and what shipping information you give to the customers.
But if i were you I'd get an opensource shopping cart in a language you are familiar with, and learn that, and tweak/customize as you go along.
To both have a good starting point, but to help you gradually learn over time...
Thanks very much for your tips, raywood and crosenplum :)
I have 2 weeks allocated for testing, but thats just to make sure things work rather than testing security etc. It is for my MSc project so I don;t have to actually complete the website, but just need something that imitates the buying and payment process.
Also, this means that I really need to code this myself rather than tinker with an open source shopping cart. However, I have downloaded the IBuySpy .NET exampleas a reference :)
I'm going to enjoy builiding most of this, but I'm not looking forward to coding the checkout process at all :(
Thanks again :)