1

Mangento Sales Menubar

I'd like to add a new submenu called as Deliveries below Transactions submenus. In what kind of way I can achieve this ?

Thank you in advance.

1 Answer 1

5

enter image description here

Add menu.xml inside Vendor/Module/etc/adminhtml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Invigorate_SalesMenu::deliveriesmenu"
             title="Deliveries"
             module="Invigorate_SalesMenu"
             sortOrder="100"
             parent="Magento_Sales::sales_operation"
             action="deliveriesmenu/index/index"
             resource="Invigorate_SalesMenu::deliveries"
        />
    </menu>
</config>

Add acl.xml inside Vendor/Module/etc

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Sales::sales">
                    <resource id="Magento_Sales::sales_operation">
                        <resource id="Invigorate_SalesMenu::deliveries" title="Deliveries" sortOrder="10"/>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>
2
  • Thanks for the solution!
    – Sam
    Aug 18, 2020 at 8:45
  • You're welcome. Do upvote and accept if it helped you. thanks :) Aug 18, 2020 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.