CubeCart for E-commerce
By Michael Ross
This article was published by ComputorEdge, issue #2723, 2009-06-05, as the cover article, in both their PDF edition (on pages 7-20) and their website.
There are numerous reasons why people choose to open a virtual store on the Internet, offering products and services to a worldwide audience, 24 hours a day. Some of these first-time entrepreneurs already have day jobs, but would like to make some supplemental income. Other people may have far more urgent reasons, such as having lost their full-time job. In addition, a growing number of stay-at-home moms and dads, as well as retired folks, would like to take advantage of their time at home, and make some money while caring for children or grandchildren.
The software to run an online store can be coded from scratch, but most new business owners do not have the time or programming knowledge to create an e-commerce website from scratch, or even augment an existing site with shopping cart functionality. Fortunately, it is not necessary to create a cyber-store from scratch, because there are countless shopping cart software packages available.
Some of them are quite expensive, others far more reasonable, and some are completely free. Another consideration is the difficulty in configuring and customizing a shopping cart site. Again, there is great variation: Some packages are legendarily obtuse, while others are a snap to set up. Thirdly, most of the heavyweight packages can be quite difficult to install and configure, while others are more lightweight, yet still encompass all the basic functionality that a budding online entrepreneur would need.
In this article, we will look at how to get started with one of the best-regarded of the lighter and more affordable packages available, CubeCart. It is created and distributed by Devellion Limited, and is one of the easiest low-cost e-commerce solutions available. At this time, version 4 has a license fee of just under $130, while version 3 is free. An additional $89.95 for either version will remove the link to Devellion found in the footer of each store page.
Figure 1. CubeCart product homepage
CubeCart leverages the latest technology for creating dynamic Web pages — XHTML, CSS, PHP, and MySQL. Unlike other, better-known products, CubeCart uses divs for page layout, and not HTML tables. The pages are created on-the-fly using templates, making it easier for developers and third-party vendors to create custom themes for the pages (known as "skins"). Version 3.x offers product listings, options, categories, images, image gallery, order history, e-mail and print invoicing, multiple currencies, popular shipping and payment options, e-mail marketing, support for digital products, tell-a-friend links, product search, prebuilt skins, site documents, and a straightforward administrative panel.
Even though version 4 of CubeCart adds many new features, this article will focus on version 3, because that is the one most commonly used at this time, and thus most thoroughly tested by the vendor and by users worldwide. In addition, there are far more modules written and tested for version 3.
To run CubeCart, you will need some basic technologies: an Apache Web server, a MySQL database, the PHP scripting language, and either Zend Optimizer or ionCube PHP Encoder, for decoding protected files. cURL with SSL support is required for some shipping and payment modules. The GD image library is recommended, for product image manipulation.
All decent Web hosting services provide these needed components. (My own site has step-by-step instructions to get Web hosting, if you are unfamiliar with the process.)
Your first step in installing CubeCart is to go to the version 3 download page.
Figure 2. CubeCart v3 download page
Click the link for the latest version, which as of this writing is 3.0.18 — which is nearly identical to 3.0.17, seen in our screenshots. The 3.0.x page has more detailed information about this particular maintenance release.
Click the Download button, and save the archive file somewhere on your computer. If you have a broadband connection to the Internet, then the download process should take just a few seconds, because the installation file is only 2.5 megabytes in size. (The version detail pages indicate that 3.0.18 has been downloaded more than 26,000 times; 3.0.17 is well over 200,000; and 3.0.15 stands at greater than 7 million downloads! This gives you an idea as to CubeCart's popularity.)
Open up the archive file, and save the contents of the "upload" directory into a new CubeCart directory within your Web server's root. The entire CubeCart installation on disk comprises 1125 files in 236 directories.
Next create a database on your MySQL server for CubeCart. The following commands will do this:
CREATE DATABASE cubecart_test; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON cubecart_test.* TO cubecart_user@localhost IDENTIFIED BY 'password;
Here we are showing test values only, and you should use a far more secure password for any production installation.
Point your Web browser to the CubeCart index.php, which will begin CubeCart's installation process. For instance, if you had named the CubeCart root directory "CubeCart" and had placed it in the root directory of your local Web server, then the URL to use would be "http://localhost/CubeCart/index.php". You can even leave off the "index.php" if your Web server has been configured to look for that file name as a default.
Figure 3. CubeCart installation 1 - license agreement
At the license agreement page, click the agreement checkbox and then the Continue button.
Figure 4. CubeCart installation 2 - file permissions check
At the second screen, verify that all of the file permissions are set correctly. This applies only to Linux and Unix servers, and not a Windows server, which is used for these screenshots.
Figure 5. CubeCart installation 3 - configuration settings
The third screen, shown above, is a critical one, because this is where you will enter the information needed by CubeCart to connect to the database you had created earlier. You should also set your country location and your administrative login information. CubeCart version 3.x comes preloaded with three skins: Classic, Legend, and Killer. In this tutorial, we will use the first option, which is the default. You can click on any of the three thumbnails to see a larger image of each skin. Most likely, none of the advanced settings need to be changed.
Figure 6. CubeCart installation 4 - file permissions set
You are now past the stage of the installation process that gives beginners the most difficulties. If you are installing on a Linux or Unix server, you are now prompted to change the permissions of the configuration file includes/global.inc.php, making it not writable by others, for security reasons. Again, for Windows users, this is not applicable.
Figure 7. CubeCart installation 5 - installation complete
You have now finished CubeCart's installation process.
Verifying Your Installation
If you now try to run CubeCart by going to the root directory of your store, you will receive the error message "WARNING - Your store will not function until the install directory and/or upgrade.php is deleted from the server." Delete or rename the directory "install", and then reload the page.
Figure 8. CubeCart store homepage
You should now see the initial CubeCart store homepage, shown in the screenshot above. By default, the left-hand column contains boxes for categories, featured products, product information, currencies, and languages. The right-hand column shows the customer's current shopping basket, the most popular products, products on sale, and a newsletter subscription form. The central area has a welcome message and a product list, which initially only includes a test product.
Clicking on the "Test Category" link takes you to a page showing all of the products in that category — again, just a single one at this point.
Figure 9. CubeCart store test category
To access the admin panel, simply append the word "admin" after the CubeCart root directory path. Continuing our example mentioned earlier, the URL would be http://localhost/CubeCart/admin/index.php
Figure 10. CubeCart admin login
Login using the CubeCart administrator username and password that you specified in the third stage of the installation process.
Figure 11. CubeCart admin panel
The main section used for changing your store settings, is appropriately named "General Settings", and is found in the "Store Config" menu area in the left-hand column.
Figure 12. CubeCart admin panel - General Settings
Do not be intimidated by the fairly large number of options on this page, because most of them will never need to be changed. However, you should customize all of the information in the "Meta Data" section at the top.
Confirm that the values in the "Locale Settings" section, near the bottom of the page, are correct. The other three menu items in the "Store Config" menu area can be used for: working with countries and the zones and states within them; tax rates that you wish applied to customers residing in those areas; and currencies that customers can view your products priced in, and at what foreign exchange rates.
Lastly, go to the "Site Documents" link in the "Documents" menu area in the left-hand column.
Figure 13. CubeCart admin panel - Site Documents
If and when you wish to deploy your CubeCart store on the Web, upload all of the contents of the CubeCart directory into the root directory of your remote server. Then export the CubeCart database on your local computer into an SQL file, and import that into your remote MySQL server. Next, modify the site settings within "includes/global.inc.php" if needed. Finally, test the CubeCart store as well as the admin panel, to verify that everything is working.
You now have a fully functioning online store, ready for products to be added. If you need additional assistance, either request the help of a professional programmer or check out the CubeCart online support forums.
Best wishes to anyone who starts their business online, and happy selling!
Copyright © 2009 Michael J. Ross. All rights reserved.