Adding New Tab to MyAccount Menu

The MyAccountMenu component lets you add menu groups and menu items to the main menu on the My Account page of a SuiteCommerce webstore.

You can specify the order in which items appear in the menu by specifying a number in the “index” property. Menu groups or menu items with lower index numbers appear higher in the menu.

“name” specify the name of item appear in menu

“url” specify the path to render while clicking the tab

To view the menu item, the user must have either of the two permissions specified in the “permission” property.

If two or more items have the same index number, the position of the items will be indeterminate.

var myaccountmenu = container.getComponent("MyAccountMenu");
			var preordersmenugroup = {
			     id: "Downloads",
			     name: "Downloads",
			     index: 6,
				 url: "Download",
			     permissionoperator: "OR",
			     permission: [
			         {
			             group: "transactions",
			             id: "tranSalesOrd",
			             level: "1"
			         },
			         {
			             group: "transactions",
			             id: "tranEstimate",
			             level: "1"
			         }
			     ]
			}

			myaccountmenu.addGroup(preordersmenugroup);

Leave a comment

Your email address will not be published. Required fields are marked *