Vendor Panel:Adding new menu

Dear all
I am working on a addon that supposed to show a new menu on admin panel as well as on vendor panel.so I created app/addon/show_menu/schemas/menu/menu_multivendor.post.php file. and write
if (ACCOUNT_TYPE == ‘admin’) {
$schema[‘central’][‘suppliers’] = [
‘title’ => __(‘Suppliers’),
‘attrs’ => array(
‘class’ => ‘is-addon’
),
‘items’ => [
‘promotions’ => [
‘href’ => ‘#’,
‘position’ => 100,
],
],
‘position’ => 700,
‘href’ => ‘#’,
];
}else if (ACCOUNT_TYPE == ‘vendor’) {
$schema[‘central’][‘inventory’] = [
‘title’ => __(‘Inventory’),
‘attrs’ => array(
‘class’ => ‘is-addon’
),
‘items’ => [
‘promotions’ => [
‘href’ => ‘#’,
‘position’ => 100,
],
],
‘position’ => 700,
‘href’ => ‘#’,
];
}
for admin it is working but on vendor panel required menu is not showing

In the latest version please extend the following schema as well

app/addons/vendor_panel_configurator/schemas/menu/menu_vendor.php

1 Like

Great … it’s working but shows a submenu instead of the parent menu on the vendor side. I want to add only a new menu without any submenu.
here on admin menu is showing with its submenu

and here on the vendor side, only the submenu is showing

and when I empty the “Items” array from the schema then they disappear on both sides
and if I remove it, there is an error “Unidentified items key”.

Hello!

I would like to remind you that adding new menu items to the Central menu via third party add-ons is disabled by default and may be completely disabled in future versions of CS-Cart. So I’d advise you to avoid adding new menu items there.
https://docs.cs-cart.com/4.12.x/developer_guide/addons/compatibility/adapting_4115_to_4121.html#changes-in-admin-panel-menu