This article was written by Richard Robbins
Zen Cart is one of the most popular open source (free) shopping cart systems available. Zen Cart allows users to easily set up an online storefront where they can list products for sale. It also provides a checkout system that can be configured to accept PayPal, credit cards, and other payment methods. The administrative section of Zen Cart gives store owners the ability to keep track of orders, update their catalog, and perform numerous other functions that help them make money online. I’m going to show you how to set up Zen Cart on a web server running on a Unix/Linux based system. The server administration used in this example is cPanel. This configuration is a popular one for web hosting accounts.
Downloading Zen Cart
Before you can install Zen Cart on your web host, you’ll first need to download it from www.zen-cart.com. Download the latest release. Right now it’s version 1.3.8.
After saving the Zen Cart .zip file to your computer, you then upload it to your web server. I use a program called WinSCP to transfer files from my computer to my web server. You can use an FTP program or whatever works for you. Upload the Zen Cart zip file to your public_html directory.
Once you have uploaded the Zen Cart zip file to your web server, you need to unzip it. If you can get around Linux pretty well and know what you’re doing on the command line, you can execute the command unzip zen-cart-v1.3.8a-full-fileset-12112007.zip. If you are using cPanel, you can go to the File Manager. Browse to the location of the Zen Cart .zip file, and click on it. You’ll then be given the option to Extract File Contents. Click that link, and the file will be unzipped.
Once you’ve unzipped the file, you need to do some quick cleanup. The folder containing all the Zen Cart contents comes out of the .zip file looking something like this: zen-cart-v1.3.8a-full-fileset-12112007. If you are planning to have your store exist in a subdirectory of your domain (e.g. www.domain.com/store/), go ahead and rename the long-winded Zen Cart folder to whatever name you’d like to have as part of the URL used to access. Many people choose terms like “store” or “catalog”. If your Zen Cart store is going to be the prominent feature of your entire website, I recommend moving all the contents of the Zen Cart folder into the public_html folder so that when your site visitors go the root of your domain (e.g. www.myonlinestore.com), your Zen Cart store is the default page that loads.
Now that you have your file structure in place, it’s a good time to prepare our web server so that Zen Cart can install itself. You need to create a database for your Zen Cart store using your cPanel. Creating a database is fairly simple. You follow the link in cPanel to MySQL Databases.
On the MySQL Account Maintenance page, you need to create a database by entering a name and clicking the Create Database button. Then create a user (including a username and a password) that can access the database. After you’ve created a user account, you need to assign that user to your store’s database. The interface for these three functions is shown below.
You will use this database information when you go through the Zen Cart installation wizard, which is up next. Make sure you have on hand the name you gave to your new database along with the databases user’s username and password that you assigned to the database.
The last step for you to take to prepare your Zen Cart environment for installation is to set up two configuration files, one for the admin section of the site, and one for the storefront section of the site. The two files come packaged in Zen Cart as /admin/includes/dist-configure.php and /includes/dist-configure.php. Change the names of each of those two files to configure.php. You may need to change the permissions on both of the files. Don’t worry about permissions at this point. If the installation tells you it can’t access them when the time comes, it will let you know.
To begin the installation, point your browser to your where you extracted the Zen Cart files on your server and add /zc_install/ at the end. If you put the Zen Cart files in the root of your web server, you’ll go to domain.com/zc_install. If your store is going to be located in a subdirectory on your site, you’ll go to a URL analogous to this: domain.com/store/zc_install. In these examples, you substitute your website domain for domain.com. In the second scenario, substitute the name you gave to your Zen Cart folder for store. If you’ve accessed the correct URL, you will see the Zen Cart installation screen, which looks like this:
From this screen, click Continue. Then you move to the installation agreement. Select the box that says you agree to the Zen Cart licensing terms, and click Continue. The next installation page (System Inspection) shows the results of an inspection that the Zen Cart installation does to determine whether your web server meets the performance and software support requirements for running Zen Cart. Most web hosting accounts don’t have problems running Zen Cart. If you have an X on any of the items on the checklist, you need to fix the problem before Zen Cart can be installed.
Now it’s on to the meat of the installation. The next page is where you need to enter the information you kept from the database you set up previously. You will provide Zen Cart with your database’s name along with the database username and password that you just set up. This provides the Zen Cart installation with access to your database. The Zen Cart installer will then set up the structure of the database (tables) and insert the default information it needs for your fresh store. When you’re finished entering your database login information, click Save Database Settings. You’ll see a progress bar indicating that the database is being setup.
The next page allows you to change the “System Setup”, including your web server’s physical path to your Zen Cart installation, the URL of your Zen Cart store, and your domain’s SSL settings. The Zen Cart installer detects that information automatically, so you probably won’t need to change anything. If you don’t have a secure certificate installed for your domain yet, you can just leave the Enable SSL fields set to “NO”. You can go back later and configure your Zen Cart store to use SSL by editing the configure.php files for both your store (/includes/configure.php) and your admin (/admin/includes/configure.php).
Click Save System Settings to move onto the next page of the installation. Zen Cart allows you to integrate a phpBB Forum if you already have one. I’ve never used phpBB, so I always leave this page alone and click Save phpBB Settings to move to the next page of the installation.
The final two pages allow you to enter general information for your store. The values you enter here will be used in various parts of your store later on. For instance, the store address you enter will be listed on the default Contact Us page. You can change these values later through the Zen Cart admin. At the bottom of the Store Settings page you’re also given the option to install demonstration categories and products. Zen Cart is simple enough to figure out that you don’t need to install the sample data unless you’re interested in simply getting some experience with Zen Cart without having to set up a store on your own. Click Save Store Settings to move to the admin setup page.
On the Administrator Account Setup page you’ll setup the username and password of the backend administrator. You’re also given the option to detect when upgrades are available. Keeping your Zen Cart store updated is a very good idea. However, if you choose to leave the upgrade detection field selected, you may notice there are times the admin section of your site runs very slowly. That happens when it’s trying to check for updates, and the Zen Cart update server isn’t responding. If you find that to be the case, you can disable the automatic upgrade detection from your store admin.
After you’ve finished setting up your admin account, you should see the page below, indicating that you’re finished with the installation. However, there are two quick finishing touches you need to make. First, you need to remove the zc_install directory so that someone doesn’t come along later on and try to run your setup wizard again. Second, you need to change the permissions on your /includes/configure.php file (use chmod 444 from the command line or make it User:read, Group:read,World:read using your cPanel File Manager) so that it’s secure.
Now that you’ve finished installing your Zen Cart store, you can move on to adding categories and products, configure your shipping and payment options, and customize the look of your store. You’ve now taken a significant step forward with your online retailing goals.