Привет. Есть свой модуль и в нём исправлено ($schema[‘central’][‘customers’][‘items’] = [] ; ) меню. Из-за этого подсвечивается неверный пункт
когда нахожусь в Продацах admin.php?dispatch=profiles.manage&user_type=V&cc
Далее в меню.пост.пхп:
$schema[‘central’][‘customers’][‘items’][‘pokupateli’] = [
‘attrs’ => [ ‘class’ => ‘’ ],
‘href’ => ‘profiles.manage&user_type=C’,
‘position’ => 4 ];
В дебаге две переменные из design/backend/templates/menu.tpl
№1 $second_level_title
№2 $navigation.subsection
Т.е. №2 получает неверные данные и №2 должна быть равна “vendor_administrators”
Вопрос в том, как правильно написать $schema[‘central’][‘customers’][‘items’][‘pokupateli’]… чтоб когда нахожусь в Продавцах подсвечивались Продавцы?
При нахождении в других пунктах, всё ок.
Код:
/** clear menu **/
$schema[‘central’][‘customers’][‘items’] = [];
if (ACCOUNT_TYPE == 'vendor') {
$schema['central']['customers']['items']['vendor_administrators_seller'] = [
'attrs' => [ 'class' => '' ],
'href' => 'profiles.manage&user_type=V',
'position' => 2
];
$schema['top']['administration']['items'] = [];
}else{
$schema['central']['customers']['items']['administrators'] = [
'attrs' => [ 'class' => '' ],
'href' => 'profiles.manage&user_type=A',
'position' => 1
];
$schema['central']['customers']['items']['usergroups'] = [
'attrs' => [ 'class' => '' ],
'href' => 'usergroups.manage',
'position' => 2
];
$schema['central']['customers']['items']['vendor_administrators'] = [
'attrs' => [ 'class' => '' ],
'href' => 'profiles.manage&user_type=V',
'position' => 3
];
$schema['central']['customers']['items']['suppliers'] = [
'attrs' => [ 'class' => '' ],
'href' => 'suppliers.manage',
'position' => 10 ];
}
$schema['central']['customers']['items']['pokupateli'] = [
'attrs' => [ 'class' => '' ],
'href' => 'profiles.manage&user_type=C',
'position' => 4 ];
$schema['central']['customers']['items']['vendor_communication.message_center_name'] =[
'attrs' =>['class' => 'is-addon'],
'href' => 'vendor_communication.threads',
'alt' => 'vendor_communication.threads',
'position' => 424 ];
$schema['central']['customers']['items']['store_locator'] = [
'attrs' => [ 'class' => 'is-addon' ],
'href' => 'store_locator.manage',
'position' => 420 ];
$schema['central']['customers']['items']['shipping_methods'] = [
'attrs' => [ 'class' => 'is-addon' ],
'href' => 'shippings.manage',
'position' => 1200 ];
$schema['central']['customers']['items']['logs'] = [
'attrs' => [ 'class' => '' ],
'href' => 'logs.manage',
'position' => 1400 ];