Postępowałem zgodnie z samouczkiem http://alanstorm.com/magento_controller_hello_world ale nie wiem, dlaczego link filipeferminiano.com/lojateste/helloworld nie działa. Oto mój plik config.xml
<config>
<modules>
<ffdotcom_Helloworld>
<version>0.1.0</version>
</ffdotcom_Helloworld>
</modules> <frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>ffdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
Odpowiedzi:
2 dla odpowiedzi № 1Utwórz: app / code / local / Ffdotcom / Helloworld / etc / config.xml
<?xml version="1.0"?>
<config>
<modules>
<Ffdotcom_Helloworld>
<version>1.0.0</version>
</Ffdotcom_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Ffdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
Utwórz: app / code / local / Ffdotcom / Helloworld / controllers / IndexController.php
<?php
class Ffdotcom_Helloworld_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction(){
echo "hello world";
}
}
Utwórz: app / etc / modules / Ffdotcom_Helloworld.xml
<?xml version="1.0"?>
<config>
<modules>
<Ffdotcom_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Ffdotcom_Helloworld>
</modules>
</config>
1 dla odpowiedzi nr 2
Pierwsza litera „f” w nazwie modułu musi być wielką literą w frontend/routers/helloworld/args
xpath.