开发者

How to duplicate Magento report? Unable Change action function name

开发者 https://www.devze.com 2023-02-05 10:58 出处:网络
I was trying to duplicate Sales->Orders report during which I had an issue. I tried renaming sales function named \'salesAction\' to \'sales1Action\' located in Mage/reports/etc/adminhtml.xml

I was trying to duplicate Sales->Orders report during which I had an issue. I tried renaming sales function named 'salesAction' to 'sales1Action' located in Mage/reports/etc/adminhtml.xml

                    <sales translate="title" module="reports">
                        <title>Orders</title>
                        <action>adminhtml/report_sales/sales</action>
                   开发者_运维问答 </sales>

to

                    <sales translate="title" module="reports">
                        <title>Orders</title>
                        <action>adminhtml/report_sales/sales1</action>
                    </sales>

due to which I had to rename salesAction function defined in mage/adminhtml/controllers/report/SalesController.php to sales1Action.

Once I am done with the rename, the function sales1Action is called but for some reason it does not show the report interface. Seems to me like it needs another change in some function or file from sales to sales1 to make it work. Anyone has a clue how to do that?


Got the answer from another post here:

Check the file app/design/adminhtml/default/default/layout/sales.xml for the section - which matches the requested URL. It has a block of type "adminhtml/report_sales_sales" which is a grid container, grid containers automatically create their child grid block.

In case anyone is having similar issue, here is the link with details: Configuring Magento Layout for New Admin Module

0

精彩评论

暂无评论...
验证码 换一张
取 消