Selling stuff

Hi Im new to Kirupa.com. Heard you guys are great with tutorials. I have a question:

How would I go about making a page where I can sell products. I’ve seen sites with order forms that you can enter info in text field boxes and that info gets sent to the seller. I was wondering if there is a code to make such a page or if thats done through templates. Hope that description is clear enough if not let me know. Any help or ideas would be greatly appreciated.

-J:vamp:

Even templates are made. You can do it, but it will take a little skill. Are you looking for a Flash based store or just HTML?

If you’re looking for a shopping cart program: http://www.opensourcecms.com/ This would be a decent solution if you need to track inventory, like if you have a limited number of items to sell of each kind.

If what you are selling will never run out - like say some digital media you created where you can copy the file(s) over and over again - well then you don’t really need to track inventory and could get away with something easier than a shopping cart system that track inventory.

If you’re just looking to have people fill out a form of items they want to buy and have a list emailed to you… that’s not hard at all. You could go the really simple route and keep track of what the user wants to buy by storing the information into a cookie or with sessions. But you need to consider the “cookieless” people out there or people who may end a session w/o actually buying something.

In that case you may want to store the items they add to their cart into a database. You could keep it simple and have a log-in system that doesn’t require a lot of information. Maybe just an email address and a password.

All you’d be doing is checking the forms they submit for items they wanted to add to the cart. When you find what they want, add it to the cookie/session/database/etc. When they go to check out, have the system email the information.

I’m not sure how you’d want to have them pay though. That’s a whole different ball game. :slight_smile:

BTW - these are just very general ideas on what choices are available to you. There are more choices, and the ones in here aren’t fully explained. I just wanted to give you a few ideas of options you could explore further.

Thank you for the responses. Sorry it took me so long to write back I was away for the holiday but yes what you said about…

“If you’re just looking to have people fill out a form of items they want to buy and have a list emailed to you… that’s not hard at all. You could go the really simple route and keep track of what the user wants to buy by storing the information into a cookie or with sessions. But you need to consider the “cookieless” people out there or people who may end a session w/o actually buying something.”

"All you’d be doing is checking the forms they submit for items they wanted to add to the cart. When you find what they want, add it to the cookie/session/database/etc. When they go to check out, have the system email the information. "

That is exactly what I want to do. So next question how do I start? :hr:

First decide on the language you want to use for the project: PHP, ASP, etc.

Then look into working with sessions in that language. The session will allow you to save the information for what the people wish to buy. You should also consider if you want this information to be saved or not. A session lasts the life of the browser (once the window is close, the session is typically ended). So if you want the info saved, you may need to store the data into a cookie or database. If you don’t care to save the info then when people come back to your site they’d have to reselect what they want to buy (if they didn’t actually make the purchase the first time there).

It’s up to you how you want to handle the products you’ll be selling. You may want to go the easy route and just hard code the products into a web page. Or you may want to use a database - in which case you could either build a backend or not. The backend would allow you to add/edit/remove products easier, but it may not be necessary.

The key thing on the above two paragraphs is that a database might be needed. If it is, start looking into the different database options available to you and decide which one to go with. Then start looking into how to work with the database for whichever language you’re working with.

If you’re adding things to a “shopping cart” (either storing items in the session, database, cookie, etc) you’ll want to give the visitor the option to edit/remove items from it. That shouldn’t be too difficult. Same with allowing them to view the cart. Not a big deal.

Next comes checking out and payments. You may wish to search the forums because I’m sure there have been some discussions about which payment methods are available. And how you work with the different options available will come into play for how you code this part of the system.

Once payment has been made you’ll come back to a page at your site which should somehow have a list of the materials that you’ll need to email to the person. So keep in mind that you may have to get the persons email address before check out. It also depends on how the payment is processed. It may allow you to return the users email address associated with the service (like PayPal can do for example).

Once you have the materials you can send them as attachments via email or send them a link to download the materials. Again this will depend on a few factors - personal preference, file size, etc. You could even zip all the files they ordered together and just send the one zip file (or the link to download the zip file – but you’d need to use the language you picked to zip everything together (if that’s an option)).

It would probably be a good idea to track the sales as well. When you email the order to the person, send yourself an email with a list of everything they bought, their email, name, etc. So you know what they ordered incase something goes wrong.

I may have left a few things out there… but that’s a basic outline. Really your next step should be to sit down and walk yourself through all the steps you can think of that happen when you order something online. Make sure you plan everything out the way you want it to work and cover all your bases. Even if you’re not sure you need a specific step, but it’s typical to an online order, put it in your notes. Just because it’s there doesn’t mean you HAVE to use it. It’s better to have too much info than to find out later that you missed a step and need to recode a section.

Once you have the steps outlined and you know which language you want to use to make it… start checking out that language to see what options you have available to do each step. If you get stuck… post a question here and I’m sure someone will help.