1

I have built a custom Module for my client's site where I have been putting my overrides and observers, built a helper class, etc. It has been working fine to now.

I am trying to add a Controller, however, and it doesn't seem to be working.

I have followed a few different Tuts that all point to a simple implementation:

in my config, I added:

<?xml version="1.0"?>
<config>
...
<frontend>
    <routers>
        <flamanhelper>
            <use>standard</use>
            <args>
                <module>Flaman_FlamanHelper</module>
                <frontName>flamanhelper</frontName>
            </args>
        </flamanhelper>
    </routers>   
</frontend>
</config>

my Index Controller /(located at: /app/code/local/Flaman/FlamanHelper/Controllers/IndexController.php

class Flaman_FlamanHelper_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction(){
        echo "flaman helper controller";
    }
    public function geolocationAction(){
        echo "you are here: ";
    }
}

so should my URLs not be

http://<domain>/flamanhelper
http://<domain>/flamanhelper/index/geolocation

because I just get 404s :(

any insight will be appreciated

Edited: to add Controller path

  • where is the Flaman_FlamanHelper_IndexController class located in your module? – Raj May 9 '16 at 15:08
  • /app/code/local/Flaman/FlamanHelper/Controllers/IndexController.php – seanyeomans May 9 '16 at 15:17
  • 1
    try using a lower case "c" on "Controllers" so it becomes "controllers" – Raj May 9 '16 at 15:18
  • GET OUT OF TOWN - that worked – seanyeomans May 9 '16 at 15:19
3

try using a lower case c on Controllers so it becomes controllers

  • ha ha, no problem. Feel free to accept the answer if all is working OK. – Raj May 9 '16 at 15:28
  • am not sure how to do that. I'm too newb to affect the upvotes apparently. ... where is the 'accept' button – seanyeomans May 9 '16 at 16:52
  • Ah you may require 10+ rep to accept an answer. This should be a tick below the voting icons. – Raj May 10 '16 at 9:44
1

The problem is that your controller folder should be named controllers instead of Controllers

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.