Now, we will do something visible with our module. We are going to add a page to our Magento shop, which we can use for several purposes.
We have to add some configuration in the config.xml
file and we will also create a controller file.
In the following steps, we will add an extra page to the Magento installation by adding extra configurations in the Packt_Helloworld
module:
Open your IDE and navigate to the
module
folder.Add the following configuration as a child of the
config
tag in theconfig.xml
file of the module:<frontend> <routers> <helloworld> <use>standard</use> <args> <module>Packt_Helloworld</module> <frontName>helloworld</frontName> </args> </helloworld> </routers> </frontend>
To create the controller file, we will create an
IndexController.php
file infolder app/code/local/Packt/Helloworld/controllers/
.Add...