Tag Archives: Zen Cart

Zen-Cart html_output.php overrides

Zen cart’s forums and wiki are great, just somewhat of a pain in the ass, so here’s what i found that is useful, and i may use in the future too.

Posts: 2,925
Re: Overriding functions/html_output.php
There is no in-built override system for files in the includes/functions folder, but I recentyly figured out a method to do it by utilizing the override capabilities within the autoload/init_includes system.

First, make a copy of includes/init_includes/init_general_functions.php and save it in the includes/init_includes/overrides/ folder. Then edit that file to modify the loading of the html_output.php file so that it calls the file from an overrides folder like:
require(DIR_WS_FUNCTIONS . ‘overrides/html_output.php’);
Then you can create your new folder includes/functions/overrides/, and put an edited copy of html_output in there. This way you can edit or add functions within html_output.php and not have to worry about duplicate functions warnings, or about your changes getting overwritten during an upgrade.

You can use a similar method for overriding anything in the functions or classes folders, which don’t have an inherent override capability.
An assumption is what you arrive at when you get tired of thinking…

Related Posts

Moving a Zen Cart Installation

Here’s how I moved my Zen Cart installation to a sub directory.

1.) Create a sub directory on your site via: FTP or however you know to.

2.) Move all files of your Zen-Cart installation into your sub directory.

3.) Edit 2 configuration files of your zen-cart.

  • /includes/configure.php
  • /admin/includes/configure.php

In /includes/configure.php you want to edit:


In /admin/includes/configure.php you want to edit:


In both of these files you simply want to add your <subdirectory> followed by a forward slash /

NOTE: All directories should not have a leading slash / and SHOULD ALL have a trailing /

define(‘HTTP_SERVER’, ‘’);

define(‘HTTP_SERVER’, ‘http://www.example.com/’);

define(‘DIR_WS_ADMIN’, ‘shopping-cart/admin/’);

4.) Now you need to access your database via: phpMyAdmin or NaviCat

In your Zen Cart database you want to edit the configuration table in the following fields:

  • Log Destination – STORE_PAGE_PARSE_TIME_LOG
  • Session Directory – SESSION_WRITE_DIRECTORY

Use the following utility if you don’t know how to do step4:


This worked great for me.
Please comment here if you try this or have any questions.
Thank you.

Related Posts