function createProductMenu() {
prod_menu = menuMgr.createMenu(rs('new_prod_menu'));
prod_menu.applyBorder(false, false, false, false);
prod_menu.dropShadow("none");
prod_menu.showIcon = true;
prod_menu.addItem(rs('product.type.'),'','javascript:new_product();');
}
a_toolbar.AddButton(
new ToolBarButton(
'in-commerce:new_product',
'::',
function() {
renderMenus();
nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_product'));
},
true
)
);
function new_product($type) {
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
set_hidden_field('_new_type', $type);
std_precreate_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
$kf.action = '';
set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
std_precreate_item(
$Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'),
function() {
$kf.action = $prev_action;
}
);
}
createProductMenu();
" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_product" class="catalog-tab">
$Catalog.setItemCount('', '');
$Catalog.setItemCount('', '');
$Catalog.setCurrentCategory('', );
$Catalog.saveSearch('', '', '');
/
Grids[''].AddAlternativeGrid('', true);
Grids[''].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
$Catalog.setViewMenu('');
Grids[''].DblClick = function() {return false};
#separator#
_new_type" id="_new_type" value="">