0

magento controller indexaction method is working only other action method not working. when i change any method name to indexaction its other action is working. it irritate me.

http://localhost/magento/test/index {.....this url is working} http://localhost/magento/test/mamethode{.....this url is not working}

when i replace both method name with each other. In that case also indexaction is only working.

<?php
class Pfay_Test_IndexController extends Mage_Core_Controller_Front_Action
{
   public function indexAction()
   {
     echo 'test index';
   }
   public function mamethodeAction()
   {
     echo 'test mymethod';
    }
} 
?>
3

Magento use this pattern: moduleFrontName/controller/action In your case: test/index/index & test/index/mamethode

Your URL must be: http://localhost/magento/test/index/index http://localhost/magento/test/index/mamethode

| improve this answer | |
  • thank you brice its working for me. i am too new. and read tutorial i can understand that i am reading tutorial which created for low version of magento. – rahul chaurasia Dec 1 '15 at 2:46
0

It should be moduleFrontName/controller/action in your case

http://localhost/magento/test/index will find IndexController and automatically call index action

and for another method it should be

http://localhost/magento/test/index/mamethode

| improve this answer | |

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.