Installing and Configuring Zen-Cart

Zen Cart is an Open Source e-commerce solution. It includes an admin CMS, which allows a non-tech end-user to change many options on their site. This article looks at the low-level tasks that must be completed before a site is ready to be finalised by the end-user.
compton, 10 November 06
Updated 26 November 07
Installation

Download the zip from here.

Extract all the files to a temporary location. You should then find a directory in that location with a name reflecting the version you downloaded (eg zen-cart-v1.3.6-full-fileset-10272006). Open this directory, and copy all files to the target directory on your web server.

Next, create a database on the web server for the shopping system. There's no reason not to use any existing database, as long as you're sure that the zen-cart table names will not conflict with ones you have already. Even if there is a risk of conflict, you can tell zen-cart to use a prefix (eg zen_) for its tables during installation to prevent any problems.

Once that's done, open the directory where you placed the zen-cart files in your web browser. It should automatically redirect you to the installation page - if it doesn't, go to zc_install/index.php.

Follow the steps and the database tables will be created, and the configure.php files set up for your host. After agreeing to the licence, you'll see the system inspection report. All the options should be green and ticked. Some may have an exclamation mark in a yellow circle, indicating a missing component. Don't worry about the database cache folder as it is only an issue if you enable it - for large sites it may speed things up if you do however. You can also continue the install if an exclamation mark appears by cURL support. cURL is needed for some automated online payment methods though, so you will need to get that sorted out later if you intend to use one of those.

On the next page you need to provide certain locations. Even if you are using a Windows server, use the forward slash in the paths (both work, but the backslash gets escaped about 10 times which looks a bit odd!).

The options on the remaining pages are pretty straightforward. One option allows you to set the prefix for zen-cart's database tables, as mentioned previously. After it has created the tables, which takes a few seconds, you need to enter a few essential details for your site, such as the admin username and password. These can all be changed later, so no need to worry too much about what you choose.

Once the installation is complete, your shop is live and accessible from your chosen URL. When you first visit it, you'll see a couple of security warnings; one about the presence of the zc_install folder, and the other about the read-write status of the configure.php files. Simply delete the zc_install folder from the server, and to clear up the other message, find the two configure.php files. One is in the includes folder off the directory where you installed zen-cart, and the other is in the includes folder inside the admin directory. Change them to read only (chmod 644 or chmod 444 in Linux, or right-click the files and choose properties in Windows).

Configuration

The FOOTER_TEXT_BODY PHP constant determines the copyright message that appears at the bottom of every page. It is defined in the includes/languages/english.php file.

The Welcome message which is displayed on the front page is set by the TEXT_GREETING_GUEST constant, defined in includes/languages/english/index.php.

The HEADING_TITLE constant defines the heading displayed at the top of the central display area. It is defined in includes/languages/english/index.php, depending on the $category_depth zencart variable. As a minimum, its value when $category_depth equals 'top' or 'nested' must be changed from the default 'Congratulations' message.

The STORE_STATUS constant determines whether the shop accepts online orders (value = 0) or is merely a showcase of products.

The includes/languages/ENGLISH/header.php file defines constants relating to the header which appears at the top of every page.
1 2