I followed this tutorial: blog.baobaz.com/en/blog/magento-module-create-your-own-controller but it doesn't work for me. My files:
/app/etc/modules/Baobaz_Arithmetic.xml
<?xml version="1.0" ?>
<config>
<modules>
<Baobaz_Arithmetic>
<active>true</active>
<codePool>local</codePool>
</Baobaz_Arithmetic>
</modules>
</config>
/app/code/local/Baobaz/Arithmetic/etc/config.xml file:
<?xml version="1.0" ?>
<config>
<modules>
<Baobaz_Arithmetic>
<version>0.1.0</version>
</Baobaz_Arithmetic>
</modules>
<frontend>
<routers>
<arithmetic>
<use>standard</use>
<args>
<module>Baobaz_Arithmetic</module>
<frontName>arithmetic</frontName>
</args>
</arithmetic>
</routers>
</frontend>
</config>
/app/code/local/Baobaz/Arithmetic/controllers/IntegerController.php
<?php
class Baobaz_Arithmetic_IntegerController extends Mage_Core_Controller_Front_Action {
public function multiplyAction(){
echo "Respect my authoritah";
}
}
?>
I cleared the cache. When calling (...).com/arithmetic/integer/multiply I get 404 page. I run Magento 1.8.1.
How to fix this?
1 Answer 1
So my website is in German and controller worked when I added (...).com/de/ arithmetic/integer/multiply (without spaces :).
-
-
can you try this url
www.domain.com/index.php/arithmetic/integer/multiply?Rajeev K Tomy– Rajeev K Tomy2014年09月04日 11:47:20 +00:00Commented Sep 4, 2014 at 11:47 -
I'm curious why the downvotes also. The answer comes from the OP and states that it fixed the problem. You can vote to close as off topic but why downvote. Seams like a legit answer to me. Here is a +1 to compensate.Marius– Marius2014年09月04日 11:48:43 +00:00Commented Sep 4, 2014 at 11:48
-
@Marius : i cant believe this url worked ! So downvoted ! when I realized it really worked, I became obliged and hence I removed downvoting and put an upvote. He teached me new thing. Thank you Alan for this question. But still I am confused. How did that url worked ?????Rajeev K Tomy– Rajeev K Tomy2014年09月04日 11:52:19 +00:00Commented Sep 4, 2014 at 11:52
-
Thanks Marius :). @programmer_rkt: I tried this. My reply is in comments below the question.Alan– Alan2014年09月04日 11:53:35 +00:00Commented Sep 4, 2014 at 11:53
<?phptag in your controller class as programmer_rkt said above.www.domain.com/index.php/arithmetic/integer/multiplymodule/controller/action. Also it worked for me without thedepart because I don't have the store codes in url setting enabled. Maybe it didn't work for you and you need to addindex.phpbecause you don't have themod_rewritemodule enabled on your server.