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 / Backing Up a WordPress Database

Changing or moving your database is pretty easy.  I suggest using Navicat MySQL for database backing up and moving.

With Navicat it becomes extremely easy to move a database.
First thing you do, is set up your database connections in the software.
Then you open your database you want to move or backup.
Navicat Databases / Tables view

Next Select Backups from which database you’re moving or backing up.

Navicat MySQL Backups View

Click Backup

Navicat MySQL Backup Dialog

Now click Start.  You don’t have to set anything by default, it will just make a new backup.

Navicat MySQL Backup Complete

This is how you create backups.  Moving from one database to another is very easy as well. Open your backups from the tree view.  Right Click on the backup you want to copy to another database and COPY.

Navicat MySQL Copy Backup

Now find the database you want to put the backup in.  Go to it’s backups.  And Paste the backup into the other databases backups section.

Now open that database backup, and restore it.  As long as the database your moving too doesn’t already have the same tables, you shouldn’t have a problem.

Related Posts