If you have ever had a need for an on-line shopping cart, and have ever tried to install a shopping cart, you know that making a choice can be a challenge, and getting the shop up and running can be a challenge.
Not so much with Zen Cart. Zen Cart is an open source e-commerce solution that serves as a stand-alone shopping cart and is installed on top of a LAMP server. If you're not sure how to install a LAMP server check out my article "How to: Install a LAMP server." With that LAMP server up and running you are ready to install Zen Cart.
The installation of Zen Cart will require you to use a few Linux commands: zip, mv, and chmod. But that is it. For the purposes of this article I will assume you are using phpmyadmin for the database creation. If you need help installing phpmyadmin check out my article "Install phpmyadmin for easy MySQL administration."
With all of that in mind, let's begin the installation.
Getting Zen Cart
The first thing you need to do is download Zen Cart. But don't just open your browser to the download page. Instead ssh to the server that will house Zen Cart, cd to the server document root, and use wget to download the necessary file into the correct directory. The command to download Zen Cart is:
sudo wget "http://downloads.sourceforge.net/project/zencart/CURRENT_ Zen Cart 1.3.x Series/Zen Cart v1.3.8 - Full Release/zen-cart-v1.3.8a-full-fileset-12112007.zip"
NOTE: Since there are space in the path name you do have to make use of the "" when using wget to download the file.
With the file downloaded and in place it is time to unzip the file. To unzip the Zen Cart file issue this command:
sudo unzip zen-cart-v1.3.8a-full-fileset-12112007.zip
which will create the directory zen-cart-v1.3.8a-full-fileset-12112007. To make your life easier you will want to change the name of that directory to a much easier name. This directory is what you (and your customers) will use to access your shopping cart, so make it easy. I rename mine zencart or shopping. Rename this to suit your needs. Rename it with the command:
sudo mv zen-cart-v1.3.8a-full-fileset-12112007 zencart
Now it's time to create the configuration file and make some changes to permissions.
Configuration files and permissions
Zen Cart does not unpack with the necessary configuration files in place. What you have to do is rename to files so they will serve as your configuration files. To do this issue the following commands (from within your Zen Cart directory):
sudo mv includes/dist-configure.php includes/configure.php
sudo mv admin/includes/dist-configure.php admin/includes/configure.php
The next step is to change the permissions of the configuration files like so:
sudo chmod 777 includes/configure.php
sudo chmod 777 admin/includes/configure.php
The configuration files are set. Time to change permissions of some directories.
Below are all of the commands you need to run to set the correct permissions for your installation:
sudo chmod 777 cache
sudo chmod 777 includes/languages/english/html_includes
sudo chmod 777 media
sudo chmod 777 pub
sudo chmod 777 admin/backups
sudo chmod 777 admin/images/graphs
With this complete you are now ready to create your database and log into the web-based installer and install Zen Cart.
Installing via web
After you create your database (using phpmyadmin) log into the Zen Cart install like so:
Where IP_TO_SERVER is the actual IP address of your server and ZENCART is the name you have given your Zen Cart directory.
The web-based installation is very simple. You will only have to insert options like the MySQL user and password, name of site, administrator name/email, etc. Outside of some very easy questions, Zen Cart will most likely correctly guess all of the details of your installation.
After you have stepped through the installation wizard your Zen Cart installation is done. You will be directed to either immediately administer the site or view the site.
Zen Cart is one of the better shopping cart systems available from the open source community. It is easy to install/administer, robust, feature-rich, and reliable. If you have a need for ecommerce make sure you check out Zen Cart first.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.