You are hereZen Cart

Zen Cart


Packt announced my book Zen Cart E-commerce Application Development


I am very much happy this morning. While opening my computer at office, I visited website of Packt Publishing (www.packtpub.com) and found that my book has been announced on their web. It's a milestone. I started writing on this in November 2007. And I also remember that the idea sharing of this book started in last July. So, it's finally going to be published after 1 year. Not a long time.

Installing Zen Cart

Before installing Zen Cart on your server, ensure that you have the required server environment. As prerequisites, you need a web server that can support PHP and run MySQL database server. The following sections describe the prerequisites for installing Zen Cart in more detail.

The minimum recommended server requirements for Zen cart installation is:

  • PHP 4.3.2 or higher (PHP 4.4.x for optimal performance),
  • Apache 1.3.x and higher; and
  • MySQL 3.2.x or higher.

Although  Register Globals may be on or off, it is recommended to keep safe_mode off. For many shipping and payment modules, CURL has to be installed/compiled with PHP.

Support for HTTPS may be required depending on the payment methods being accepted. The use of SSL during account creation and check out is also recommended.

At present, Zen Cart does not officially support PHP5. However, many shops are successfully running on servers, using PHP5. In August 2007, it was announced on Zen Cart's website that Zen Cart version 1.4 and higher will require PHP 5.2 as the minimum.

Creating a Zen Cart Template

Creating a new template for Zen Cart is fun. Prior to version 1.3.x of Zen Cart, some HTML tables were used for layout. But in version 1.3.x onwards, Zen Cart has fully abandoned the use of HTML tables for layout, using a CSS-based layout instead.

Creating A File System

Let us start building a new template for Zen Cart by creating a new folder under includes/templates/. Let us name it Packt (or whatever you like). But remember to use underscore instead of spaces in a long name. Avoid using Book Shop. Instead, use book_shop or BookShop.

Under the packt template folder, create the following folders:

  1. images: this folder will contain all the images needed for the template.
  2. css: this folder will contain all the CSS files for the template. It's better to copy all the files from the includes/templates/template_default/css directory to this css folder.
  3. common': this folder will contain the common files for the template. You may copy the files from the includes/templates/template_default/common folder, and edit those to suit your needs.
  4. sideboxes: this folder will contain module-specific sideboxes. Here, you can add new sideboxes, which you are going to use.
  5. templates: this folder contains page-specific templates. Whenever you want to change a page's layout, copy the template for that page to this directory and modify it as required.

Information regarding a template is located in the template_info.php file. You need to create a new template_info.php file for the new template. Copy the file called includes/templates/template_default/template_info.php into the new template folder, and then open the template_info.php file in your favorite text editor.

cover of Zen Cart: E-commerce Application DevelopmentZen Cart: E-commerce Application Development
author: Suhreed Sarkar
asin: 1847191177