shopping cart

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sebamed
Forum Newbie
Posts: 4
Joined: Mon Jul 08, 2002 9:23 am

shopping cart

Post by sebamed »

:?:
Hi

Well, does anyone have clue how to construct a shopping cart with mysql in the backend, that calculates subtotals and totals and has a changeable quantity?
or maybe it's better to do these kind of a calculations with javascript?
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

PHP is definitely the way to go. Javascript is flawed because you need a browser to have it enabled in order for it to work. This is why I think it is stupid when people do their form validation using JavaScript.

As for writing the script, you would basically store all of your products (descriptions, quantities avail., cost, etc) in the mysql database and use HTML forms to display and update the values.

You really need to look at http://www.sqlcourse.com for SQL query information, and phpcomplete.com has good PHP information.
User avatar
martin
Forum Commoner
Posts: 33
Joined: Fri Jun 28, 2002 12:59 pm
Location: Cambridgeshire

Post by martin »

A good free ecommerce solution can be found at http://www.oscommerce.com/.
The support forum on the site will make it almost painless to set up :wink:
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

if you want to do it yourself, check out this book
Post Reply