3

Hi i created custom module with this structure :

enter image description here

Config file code in etc/config.xml

<config>
    <modules>
        <Shareino_Sync>
            <version>0.1.0</version>
        </Shareino_Sync>
    </modules>
    <frontend>
        <routers>
            <sync>
                <use>standard</use>
                <args>
                    <module>Shareino_Sync</module>
                    <frontName>sync</frontName>
                </args>
            </sync>
        </routers>
    </frontend>

</config>

app/etc/modules/Shareino_Sync.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Shareino_Sync>
            <active>true</active>
            <codePool>local</codePool>
        </Shareino_Sync>
    </modules>
</config>

And i just created controller like this : app/code/community/Shareino/Sync/controllers/IndexController

class Shareino_Sync_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction(){
        echo "index Action";
    }
    public function testAction(){
        echo "index Action";
    }

}

Always I try to open index action i got 404 error.

4

The simple thing your issue at codePool.

You declare Shareino_Sync module's codePool is local at Shareino_Sync.xml .

But as per as, your code your module it located at community codePool (app/code/community).

So you should change

  <codePool>local</codePool>

To

  <codePool>community</codePool>
  • Better would be to move the code to the local pool probably – Robbie Averill Jun 9 '16 at 7:04
  • that is not good idea bcoz it is a 3rd party module – Amit Bera Jun 9 '16 at 7:06
  • Huh? The OP created this module... – Robbie Averill Jun 9 '16 at 7:06
  • I would also place in Community. If your code is in app/code/community then you should define <codePool>community</codePool> or if it is in app/code/local then <codePool>local</codePool>. This would make OP more clearer. – Adarsh Khatri Jun 9 '16 at 7:07
1

You entered wrong codepool : community

0

The URL you can test with this module are the following:

  • /sync which will call the indexAction() method
  • /sync/index/test which will call the testAction() method

If you want to be able to access /sync/index/action you need to create an actionAction() method

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.