How to get an entry into Configuration Menu Group?
I have a stock update script that I have been using in several 1.3.9? installations.
I created a new 1.5.0 installation and when I ran the same sql install script, all the entries are in the database just like I expected.
The Group does not show up in the "Configuration" menu. I go into phpMyadmin and all the entries are there, I can change the values there and the add-in works as I expected.
Is there a difference between 1.3.9 and 1.5.0 for creating the configuration group? I have:
Code:
SET @configuration_group_id=0;SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'MyScript Name' LIMIT 1;
DELETE FROM configuration WHERE configuration_group_id = @configuration_group_id;DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id;
INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'MyScript Name', 'MyScript Name Values', '1', '1');SET @configuration_group_id=last_insert_id();UPDATE configuration_group SET sort_order = @configuration_group_id WHERE configuration_group_id = @configuration_group_id;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
Re: How to get an entry into Configuration Menu Group?
The group won't show up in the menu if your admin profile hasn't been granted access to it. And to do that it must first be registered as something to be available to grant access to.
Re: How to get an entry into Configuration Menu Group?
First, please note that the following construct was documented as being problematic by swguy: http://www.zen-cart.com/showthread.p...es-please-note!
Code:
SET @configuration_group_id=0;
Then, you need to add (for 1.5.0) the following statements to "register" your settings:
Code:
# Register the page for Admin Access Control
DELETE FROM admin_pages WHERE page_key='configYourScriptName';
INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order)
VALUES ('configYourScriptName','BOX_CONFIGURATION_YOUR_SCRIPT_NAME','FILENAME_CONFIGURATION',CONCAT('gID=',@configuration_group_id),'configuration','Y',@configuration_group_id);
where the value BOX_CONFIGURATION_YOUR_SCRIPT_NAME is defined in a php file present in /YOUR_ADMIN/includes/languages/english/extra_definitions.
Re: How to get an entry into Configuration Menu Group?
Thanks, I'll look into both DrByte's and lat9's suggestions
Re: How to get an entry into Configuration Menu Group?
sorry sir, can you give me a detail instruction or detail example, i do not understand quite well. thanks very much. i can find the insert value in configure group and configure, but I can not find them in admin pages.