1

C:\xampp\htdocs\m1\app\etc\modules\Prasad_ImageSorter.xml

<?xml version="1.0"?>
<!-- 
/**
 * @category   Prasad
 * @package    Prasad_ImageSorter
 * @author     MaddyBoy

 */
 -->
<config>
    <modules>
        <Prasad_ImageSorter>
            <active>true</active>
            <codePool>local</codePool>
        </Prasad_ImageSorter>
    </modules>
</config> 

C:\xampp\htdocs\m1\app\code\local\Prasad\ImageSorter\etc\config.xml

<?xml version="1.0"?>
<!-- 
/**
 * @category   Prasad
 * @package    Prasad_ImageSorter
 * @author     MaddyBoy

 */
 -->
<config>
    <modules>
        <Prasad_ImageSorter>
            <version>0.1.1</version>
        </Prasad_ImageSorter>
    </modules>
    <frontend>
        <routers>
            <imagesorter>
                <use>standard</use>
                <args>
                    <module>Prasad_ImageSorter</module>
                    <frontName>imagesorter</frontName>
                </args>
            </imagesorter>
        </routers>
        <layout>
            <updates>
                <imagesorter>
                    <file>imagesorter.xml</file>
                </imagesorter>
            </updates>
        </layout>
    </frontend>
    <admin>
        <routers>
            <imagesorter>
                <use>admin</use>
                <args>
                    <module>Prasad_ImageSorter</module>
                    <frontName>imagesorter</frontName>
                </args>
            </imagesorter>
        </routers>
    </admin>
    <adminhtml>
        <menu>
            <imagesorter module="imagesorter">
                <title>ImageSorter</title>
                <sort_order>71</sort_order>               
                <children>
                    <items module="imagesorter">
                        <title>Manage Items</title>
                        <sort_order>0</sort_order>
                        <action>imagesorter/adminhtml_imagesorter</action>
                    </items>
                </children>
            </imagesorter>
        </menu>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <Prasad_ImageSorter>
                            <title>ImageSorter Module</title>
                            <sort_order>10</sort_order>
                        </Prasad_ImageSorter>
                    </children>
                </admin>
            </resources>
        </acl>
        <layout>
            <updates>
                <imagesorter>
                    <file>imagesorter.xml</file>
                </imagesorter>
            </updates>
        </layout>
    </adminhtml>   
    <global>
        <models>
            <imagesorter>
                <class>Prasad_ImageSorter_Model</class>
                <resourceModel>imagesorter_mysql4</resourceModel>
            </imagesorter>
            <imagesorter_mysql4>
                <class>Prasad_ImageSorter_Model_Mysql4</class>
                <entities>
                    <imagesorter>
                        <table>imagesorter</table>
                    </imagesorter>
                </entities>
            </imagesorter_mysql4>
        </models>
        <resources>
            <imagesorter_setup>
                <setup>
                    <module>Prasad_ImageSorter</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </imagesorter_setup>
            <imagesorter_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </imagesorter_write>
            <imagesorter_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </imagesorter_read>
        </resources>
        <blocks>
            <imagesorter>
                <class>Prasad_ImageSorter_Block</class>
            </imagesorter>
        </blocks>
        <helpers>
            <imagesorter>
                <class>Prasad_ImageSorter_Helper</class>
            </imagesorter>
        </helpers>
    </global>
</config>

Module is enabled

enabled

admin_pannel when i click on Mange ITem it redirects to home page.

can one see what i am doing wrong.

Thank You.

1

If you use Magento 1.9.2.2 or newer (SUPEE-6788) admin routers have to be added in anther way:

Change

<admin>
    <routers>
        <imagesorter>
            <use>admin</use>
            <args>
                <module>Prasad_ImageSorter</module>
                <frontName>imagesorter</frontName>
            </args>
        </imagesorter>
    </routers>
</admin>

To:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Your_Alias before="Mage_Adminhtml">Prasad_ImageSorter_Adminhtml</Your_Alias>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

Further information:

  • Ii created this module on my localhost having version 1.9.3 (working fine there) then i uploaded to client website having Magento ver. 1.9.0.1 – inrsaurabh Jul 14 '17 at 13:28

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.