0

In am trying to add a custom submenu in Reports->Products->Stock Status as shown in below image--

enter image description here

Here is my adminhtml.xml file--

<?xml version="1.0"?>
<config>
    <menu>
      <report>
         <children>
            <products>
                <children>
                   <stockstatus translate="title" module="stockstatus">
                     <title>Stock Status</title>
                     <action</action>
                     <sort_order>10</sort_order>
                   </stockstatus>
                </children>
            </products>
         </children>
      </report>
    </menu>

    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
              <children>
                    <report>
                        <children>
                           <products>
                              <children>
                                <stockstatus>
                                   <title>Stock Status</title>
                                </stockstatus>
                              </children>
                           </products>
                        </children>
                    </report>
               </children>
            </admin>
        </resources>
    </acl>
</config>

What is wrong there ? I am not getting submenus there.

  • insetd of stockstats you use submenu – Magento 2 Dec 2 '15 at 13:12
  • <submenu translate="title" module="stockstatus"> <title>Stock Status</title> <action</action> <sort_order>10</sort_order> </submenu > – Magento 2 Dec 2 '15 at 13:12
1

You need edit menu tag( miss > in <action>):

<menu>
  <report>
     <children>
        <products>
            <children>
               <stockstatus>
                 <title>Stock Status</title>
                 <action></action>
                 <sort_order>10</sort_order>
               </stockstatus>
            </children>
        </products>
     </children>
  </report>
</menu>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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