Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Upgrading to 1.5.x / automatically adding mods to admin drop down menus

automatically adding mods to admin drop down menus

Started by delia on 17 May 2012, 10:14 PM · Views: 859

Results 1 to 2 of 2
17 May 2012, 10:14 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

automatically adding mods to admin drop down menus

The mod I am trying to upgrade for 1.5 has an install button on the page. So I want to add a file and I thought extra configures would be the correct place but the exception says: Cannot execute because table " does not exist. CHECK PREFIXES! The file that runs the query to add to the configuration menu used the same table naming and it works. So what have I missed?

<?  
	
 if(!defined('CROSS_SELL_ENABLED') ) {
	 global $db;
	$db->Execute("INSERT INTO " . TABLE_ADMIN_PAGES ." (`page_key`, `language_key`, `main_page`, `page_params`, `menu_key`, `display_on_menu`, `sort_order`) VALUES ('catalogUltimateCrossSell', 'BOX_CATALOG_MULTI_CROSS_SELL_PRODUCTS', 'FILENAME_CROSS_SELL_PRODUCTS', '', 'catalog', 'Y', '100')");
}
else {
}
	 
 ?>

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

18 May 2012, 12:04 AM
#2
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: automatically adding mods to admin drop down menus

TABLE_ADMIN_PAGES probably hasn't been defined at this point of the process.
Try putting your code here instead: ...
YOUR_RENAMED_ADMIN\includes\functions\extra_functions