Zen Cart How To Add Menu Items Into The Admin – Part Two

This Zen Cart tutorial is the second in an instructional series aimed at teaching zen cart users and store owners how to add new items into their admin menus. As was noted in the last installment of this series, a certain amount of css and php knowledge is required to do this.

Now, in Zen Cart v1.5.0 and higher, you will have to include a file that looks something like this:


if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');

// If the installation supports admin-page registration (i.e. v1.5.0 and later), then
// register the New Tools tool into the admin menu structure.
// NOTES:  
// 1) Once this file has run once and you see the Tools->New Tool link in the admin
// menu structure, it is safe to delete this file (unless you have other functions that
// are initialized in the file).
// 2) If you have multiple items to add to the admin-level menus, then you should register each
// of the pages here, just make sure that the "page key" is unique or a debug-log will be
// generated!
if (function_exists('zen_register_admin_page')) {
  if (!zen_page_key_exists('toolsNewItem')) {
    zen_register_admin_page('toolsNewItem', 'BOX_TOOLS_NEW_ITEM', 'FILENAME_NEW_ITEM','' , 'tools', 'Y', 20);

The value ‘toolsNewItem’ should be unique, and is meant to identify the new tool you are inserting into the menu in your zen cart admin. The ‘BOX_TOOLS_NEW_ITEM’ and ‘FILENAME_NEW_ITEM’ values are being defined within the other files in your toolset. The empty set of (”) describes the parameters, if any, that your tool might require for operation. The fifth (‘tools’) is a variable that points to the menu items your tool will appear in(I.e., configuration, catalog, modules, etc.). The parameter marked in the example code as (‘Y’) specifies whether or not the new item will display as a page on the admin menu.

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

zen cart plus picaflor azul equals success