News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Adding New Menu Item in the admin

Started by bioenergy, September 12, 2013, 03:33:20 AM

Previous topic - Next topic

bioenergy

add in own support system link at " admin panel Help"

Where is the code should i edit??

abantecart

#1
Menu items are store in the data set tables. These are flexible framework to store data.
http://www.abantecart.com/document_wiki/index.php/Developing_Extensions_and_Extension_API#Database_extension

The best way to do this with creation of extension and use of Developer Tools https://github.com/abantecart/developer_tools_extension

There are 2 ways to add admin menu item:

1. PHP API functions (easier)
Make sure you put this code in controller of admin section for one time run.


$menu = new AMenu ( "admin" );
$menu->insertMenuItem ( array (  "item_id" => "unique_name",
"parent_id"=>"sale",
"item_text" => "text_unique_name",
"item_url" => "extension/unique_name",
"item_type"=>"core",
"sort_order"=>"6")
);

$data = array('language_id' => 0,
'section' => 1,
'block' => 'common/header',
'language_key' => 'text_unique_name',
'language_value' => 'Menu Name');

$this->loader->model('localisation/language_definitions');
$model = $this->registry->get('model_localisation_language_definitions');
$model->addLanguageDefinition();



NOTE:
item_text - This is text entry that need to be present in language. Can be added to XML, but will not be automatically loaded is site is already live

item_url - This can be rt (route) or full URL for external links. 

2. Direct database insert ( more advanced )
Here you need to add new unique dataset_column_id and row_id


--
--SUBMENU CATEGORY
--ITEM_ID
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_varchar`,`row_id`)
VALUES  (7,'unique_name',11),

--ITEM_TEXT
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_varchar`,`row_id`)
VALUES  (8,'text_unique_name',11),

--ITEM_URL
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_varchar`,`row_id`)
VALUES  (9,'[rt or URL]',11),

--PARENT_ID
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_varchar`,`row_id`)
VALUES  (10,'unique_name',11),

--SORT_ORDER
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_integer`,`row_id`)
VALUES  (11,1,11),

--ITEM_TYPE
INSERT INTO `ac_dataset_values` (`dataset_column_id`, `value_varchar`,`row_id`)
VALUES  (12,'core',11),



Main/parent tabs text IDs:
catalog
sale
design
extension
system
reports
help



Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

bioenergy

Can I Change the Support forum to My Support Site is easy..
at Phpmyadmin i din find any ac-datasets.. all is ab-datasets

Forum Rules Code of conduct
AbanteCart.com 2010 -