Shopping Cart Tutorial Introduction
The online shop we're makin here is a basic one without any sophisticated features and stuff. The shop has admin pages ( where the shop admin can create categories, add products, etc ) and the shopper pages ( a.k.a the shop itself ) where all the shopping process takes place. You will learn more about them in subsequent pages. By the way, i did call this tutorial as a shopping cart tutorial but actually we're building an online shop ( a really simple one ). The shopping cart is just part of the shop. But because the term 'shopping cart' is already common to define an online shop solution i just use it instead of naming this site a 'PHP MySQL Online Shop Tutorial'. I have to assume that you already know about PHP and MySQL so i won't explain every code in detail. The codes are not too complicated though, i'm sure you can understand it. I suggest you download the code first so you can run it on your computer. That way it's easier for you to understand this tutorial If you don't want to download the code that's fine but make sure you take a look at the demo site, this is what our shopping cart willl look like. After you browse around you will see that the basic flow of our shop is :
Nothing complex here. The customer doesn't need to register for an account. She just buy then leave. FeaturesOkay, here are the shop features ( or maybe i should call this restrictions )
|
File OrganizationThe files in our shop will be organized like this :
The plaincart/library directory contain :
The plaincart/include contain :
The plaincart/include/paypal directory contain :
The plaincart/admin folder will contain all the admin files.You can see that admin folder also contain include and library folder. These will contain specific library files for the admin pages All images required in our shop will be put in plaincart/images directory. The category and product images are put in the category and product sub-folder respectively.
The RequirementsFor this tutorial i'm using these :
If you don't have these ready check out this tutorial to install them : Installing Apache PHP & MySQL
|
What Configurations You Will NeedDatabase ConfigurationWhen you install the shopping cart script you will need to modify library/config.php. You need to change the database connection info ( database host, username, password and name ) according to your own configurations. Enabling GD SupportThe next thing you may need to do is to enable the GD support. This is usually enabled by default by web hosting company but in case you test it on your own computer you may need to enable it manually. First, open the php.ini file using a text editor ( notepad is okay ) and search for this line of code : extension=php_gd2.dll If you see that code preceded by a semicolon ( ; ) that means GD library is not enabled yet. Remove the semicolon to enable GD and then restart the web server ( apache ) for the changes to take effect. I really hope this shopping cart tutorial is useful for you. Now to take the first step, let's start with the database design |
| Looking for Authentic designer kate spade purse | I have found a new internet shop which sells Notebook batteries. Buy here | |
|
|
HOME | PHP MySQL Shopping Cart Tutorial : Introduction | Database Design |
|
At long last i'm finally able to update this site. Now the shopping cart can handle payment through paypal. As always you have any critiques, questions, comments or problems about this tutorial please tell me. Click here to send your feedback. And if you like this tutorial please link to this site. It will really help a lot :-) |
PHP MySQL Shopping Cart Tutorial
Copyright © 2005 - 2010 www.phpwebcommerce.com