Zen Cart Language Files and How They Are Used – Part Two

Why use define statments?

The advantage of using define statements is that you can include your text information in your template files using a constant, like this:

<?php echo HEADING_TITLE; ?>

This method is a good alternative to “hard coding” your text, as seen here:

<?php echo 'My Page Heading'; ?>)

Examples of Use

Global Definitions

The definitions in your english.php file affect the footer text, the sidebox headings, the text used by the forms in Zen Cart®, as well as various error messages. Here is an example of the code that can be found in the english.php file:

define('FOOTER_TEXT_BODY', 'Copyright © 2003-2006 Zen Cart. Powered by Zen Cart');define('BOX_HEADING_CATEGORIES', 'Categories');
define('ENTRY_FIRST_NAME', 'First Name:');
define('ENTRY_STREET_ADDRESS_ERROR', 'Your Street Address must contain a minimum of ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.');

Page Specific Definitions

Their name perfectly describes their function, as these are the definitions for text information on specific display pages in your zen cart. The information that can be changed or replaced in these files includes the text for the page heading and the text for the navbar. Depending on the page you are editing, you may also find information for e-mail messages and for other miscellanious tasks performed by a display page. The file these are found in is the conditions.php in your zen cart, and this is a sample of the code you will find there:

define('NAVBAR_TITLE', 'Conditions of Use');
define('HEADING_TITLE', 'Conditions of Use');
From header.php
define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_SALES_TEXT', 'TagLine Here');
define('HEADER_LOGO_WIDTH', '192px');
define('HEADER_LOGO_HEIGHT', '64px');
define('HEADER_LOGO_IMAGE', 'logo.gif');
From contact_us.php
define('ENTRY_NAME', 'Full Name:');
define('ENTRY_EMAIL', 'Email Address:');
define('ENTRY_ENQUIRY', 'Message:');

If you need help with your zen cart web site please contact us for a quote.

At Picaflor Azul, we specialize in custom designed responsive zen carts to fit any business, and accommodate any budget. Contact us today about converting your current zen cart to a responsive design today, or to have a fantastic new custom design custom tailored to fit your needs and preferences.

zen cart plus picaflor azul equals success

Zen Cart Error “Warning: I am able to write into the configuration file…”

zen cart easy help tutorial

The error message “Warning: I am able to write into the configuration file…” appears when the permissions on your includes/your_template/configure.php zen cart file are set to 777 (Read, write, and execute). If you are using Windows, it means that there are no attributes selected in the file properties. This is a security risk, but can be fixed easily.

If you are using Linux or Unix, go to your includes/your_template directory, and run the command “chmod 444 configure.php”. You can do this via command line, an FTP program, or in your Cpanel using the file manager tool.

If you are using Windows, open the includes/your_template directory, right click on the configure.php file, and select “Read Only”.

What Do Zen Cart File Permissions Mean?

File permissions or access rights apply to specific users and groups of users. These systems control the ability of the users to view or make changes to the contents of the filesystem.

The read permission grants the ability to read a file. When set for a directory, this permission grants the ability to read the names of files in the directory (but not to find out any further information about them such as contents, file type, size, ownership, permissions, etc.)

The write permission grants the ability to modify a file. When set for a directory, this permission grants the ability to modify entries in the directory. This includes creating files, deleting files, and renaming files.

The execute permission grants the ability to execute a file. This permission must be set for executable binaries (for example, a compiled C++ program) or shell scripts (for example, a Perl program) in order to allow the operating system to run them. When set for a directory, this permission grants the ability to access file contents and metainfo if its name is known, but not list files inside the directory (unless read is set).

When a permission is not set, the rights it would grant are denied. Permissions on a Unix system (recommended for running a zen cart) are not inherited. Files created within a directory will not necessarily have the same permissions as that directory.

Read more about file permissions in the Wikipedia article.

Need help with your zen cart project? Contact the experts at Picaflor Azul with your project details for a quote.

Common Zen Cart Error Message 0 ERROR_DB_NOT_CONNECTED

Getting an error message on your site can be frustrating and scary. In this series of tutorials, I will explain the most common error messages and their causes.

zen cart easy help tutorial

Zen Cart Error Message: 0 ERROR_DB_NOT_CONNECTED

This common error message is most likely caused by:

  1. includes/configure.php database settings don’t match properly to your website database credentials
  2. if you have phpBB installed and the link “active” in Zen Cart, then your phpBB database is down, or the config.php in the phpBB folder may have invalid info or permissions are not set to readable

Zen Cart uses a MySQL databases. MySQL is the world’s most widely used open-source relational database management system that runs as a server providing multi-user access to a number of databases. It is named after co-founder Michael Widenius’s daughter, My. The SQL phrase stands for Structured Query Language.

Some MySQL Features:

  • A broad subset of ANSI SQL 99, as well as extensions
  • Cross-platform support
  • Stored procedures, using a procedural language that closely adheres to SQL/PSM
  • Triggers
  • Cursors
  • Updatable Views
  • Information schema
  • Strict mode (ensures MySQL does not truncate or otherwise modify data to conform to an underlying data type, when an incompatible value is inserted into that type)
  • Independent storage engines (MyISAM for read speed, InnoDB for transactions and referential integrity, MySQL Archive for storing historical data in little space)
  • Transactions with the InnoDB and NDB Cluster storage engines; savepoints with InnoDB
  • SSL support
  • Query caching
  • Sub-SELECTs (i.e. nested SELECTs)
  • Replication support (i.e. Master-Master Replication & Master-Slave Replication) with one master per slave, many slaves per master. Multi-master replication is provided in MySQL Cluster, and multi-master support can be added to unclustered configurations using Galera Cluster.
  • Full-text indexing and searching using MyISAM engine
  • Embedded database library
  • Unicode support (however prior to 5.5.3 UTF-8 and UCS-2 encoded strings are limited to the BMP, in 5.5.3 and later use utf8mb4 for full unicode support)
  • ACID compliance when using transaction capable storage engines (InnoDB and Cluster)
  • Partitioned tables with pruning of partitions in optimizer
  • Shared-nothing clustering through MySQL Cluster
  • Hot backup (via mysqlhotcopy) under certain conditions
  • Multiple storage engines, allowing one to choose the one that is most effective for each table in the application (in MySQL 5.0, storage engines must be compiled in; in MySQL 5.1, storage engines can be dynamically loaded at run time):
  • Custom storage engines

If you need help customizing your zen cart web site, or would like a great custom design, please contact us for a quote.

Error: Catalog Images Directory is Not Writeable

This error will appear at the top of your admin after you try to add a product, banner, manufacturer image, etc., if your images directory does not have the proper permissions set. The /images directory needs to be set with a chmod 777 for write access. All of the sub directories within the images directory should also be set with a chmod 777.

So, for example:





If you need help customizing your zen cart web site, or would like a great custom design, please contact us for a quote.


Error: Catalog Images Directory is Not Writeable

Question: When I try to list a new product I get this error: Catalog images directory is not writeable. How can I fix this?

Answer: The permissions on your /images directory and all of the subdirectories inside the /images directory need to be set to 777 for write access.

You can easily set the permissions for directories by using the file manager in your host cpanel.

Log into your host cpanel and select File Manager.

Navigate to your store’s root directory. Click on the images directory. In the right hand frame, click on “Change Permissions”

Set permissions to 777 and click on the “change” button.

If you need help customizing your zen cart web site, or would like a great custom design, please contact us for a quote.