Question

After applying patch 6788, I know that config.xml must be edited. My extension does not have the Adminhtml folder and its xml file, so after making changes still I'm getting 404. Below is the config.xml. What would be the correct "action" statement?

<?xml version="1.0"?>

<config>
    <modules>
        <J_G>
            <version>1.0.0</version>
        </J_G>
    </modules>

    <global>
        <helpers>
            <g>
                <class>J_G_Helper</class>
            </g>
        </helpers>

        <blocks>
            <j_g>
                <class>J_G_Block</class>
            </j_g>
        </blocks>
    </global>


    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <J_G after="Mage_Adminhtml">J_G_Adminhtml</J_G>
                    <frontName>g</frontName>
                </modules> 
            </args> 
        </adminhtml> 
    </routers> 
</admin> 

    <adminhtml>
        <menu>
            <gr>
                <children>
                    <custom translate="title" module="g">
                        <title>Custom</title>
                        <sort_order>90</sort_order>
                        <children>
                            <sales translate="title" module="g">
                                <title>Sales</title>
                                <sort_order>10</sort_order>
                                <children>
                                    <top translate="title" module="g">
                                        <title>Payment Method</title>
                                        <sort_order>10</sort_order>
                                        <action>adminhtml/g_sales_paymentmethod</action>
                                    </top>
                                </children>
                            </sales>
                        </children>
                    </custom>
                </children>
            </gr>
        </menu>.... 
Was it helpful?

Solution

You action should be

  • adminhtml/sales_paymentmethod/YourActionName

from

  • adminhtml/g_sales_paymentmethod

Rules:

adminRouterName/Lowecase(ClassNameFromAdminhtmlFolderTOController)/ActionName

Update

Your controller path should be

../J/G/controllers/Adminhtml/Sales/PaymentmethodController.php 

Class should name should be

  • J_G_Adminhtml_Sales_PaymentmethodController

OTHER TIPS

<routers>
        <adminhtml>
            <args>
                <modules>
                    <G before="Mage_Adminhtml">J_G_Adminhtml</G>
                </modules> 
            </args> 
        </adminhtml> 
    </routers>` 

I think?

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top