Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce Websites with Zen Cart!

Changing the Title of your Zen Cart Admin Page

Donate: This is free software. Show your appreciation by supporting my efforts. Donate

Relevance: Zen Cart™ 1.3.0-1.3.9, 1.5.0-1.5.5. Fixed in 1.5.6 and v2!
The change is very simple, but in 1.3.0 - 1.3.8, there is an extra code change you must make to compensate for a bug. This bug is fixed in 1.3.9a (and above).


Note: As indicated above, this technique does not apply to the 1.5.6 and v2 (develop) branches of Zen Cart. In 1.5.6, simply edit includes/languages/english.php and set the defined variable TEXT_ADMIN_TAB_PREFIX
 
define('TEXT_ADMIN_TAB_PREFIX', 'Admin ' . STORE_NAME);
In v2, this is already done.

Fix for relevant versions:

Create your custom template if you haven't already done so.

Create a customized copy of
includes/languages/english/YOUR_TEMPLATE/meta_tags.php
(from includes/languages/english/meta_tags.php)

You've probably already done this to change your title from
define('TITLE', 'Zen Cart!');
to
define('TITLE', 'My Storename');


So now change this to
if (IS_ADMIN_FLAG) {
   define('TITLE', 'My Storename Admin');
} else {
   define('TITLE', 'My Storename');
}



Unfortunately, we're not done yet. In 1.3.0 - 1.3.8 (not 1.3.9a or above), there is a bug which causes your meta_tags customizations not to be used in the admin area. To fix this bug, you will need to edit the file admin/includes/languages/english.php (edit this file directly; don't customize it) to change
// removed for meta tags
// page title
//define('TITLE', 'Zen Cart');

// include template specific meta tags defines

to
// removed for meta tags
// page title
//define('TITLE', 'Zen Cart');

// include template specific meta tags defines
$template_query = $db->Execute("select template_dir
from " . TABLE_TEMPLATE_SELECT .
" where template_language = '0'");
$template_dir = $template_query->fields['template_dir'];

This bug is documented in the following Zen Cart bug report.

This tip was developed in July, 2006, and was first submitted to the Zen Cart Support Forum in this thread on July 29, 2006.