AbanteCart Development > Development Help Needed
Create new admin parent menu and submenu
(1/1)
yonghan:
Hi admins, I'm trying to create admin parent menu and submenu in abantecart v1.2.
Here are the codes that I use on install.php
--- Code: ---$menu = new AMenu ( "admin" );
$menu->insertMenuItem ( array (
"item_id" => "test",
"parent_id"=> "",
"item_text" => "Test Menu",
"item_url" => "",
"item_type"=> "core",
"item_icon_rl_id" => $resource_id,
"sort_order"=>"8")
);
$this->registry->get('cache')->delete('admin_menu');
$content =$menu->insertMenuItem ( array (
"item_id" => "test_submenu",
"parent_id"=> "test",
"item_text" => "Submenu",
"item_url" => "",
"item_type"=> "core",
"item_icon_rl_id" => $resource_id_sales,
"sort_order"=>"")
);
$file = fopen('hasil.txt', 'w');
fwrite($file, $content);
fclose($file);
--- End code ---
I got
--- Code: ---Error: Cannot to add menu item because parent "test" is not exists
--- End code ---
Is it possible for me to create new parent menu and submenu? Thanks
Basara:
Hello.
Try this topic http://forum.abantecart.com/index.php/topic,1102.msg4270.html#msg4270
yonghan:
Thanks Basara, I'm using the second method and it works.
Navigation
[0] Message Index
Go to full version