0

I m creating module for new product..... I m creating this for my knowledge...

I wrote config.xml...... I also add mymodue_module.xml in etc of magento for my module....It is also showing in backend of magento

I wrote my controller.....

Bt when I called from by url it is showing error...

my config.xml....

<?xml version="1.0" encoding="UTF-8" ?>
<config>
    <!-- module configuration -->
    <modules>
        <Packt_New>
            <version>0.0.1</version>
        </Packt_New>
    </modules>
    <!-- module configuration end -->
    <global>

        <blocks>
            <new>
                <class>

                    Packt_New_Block
                </class>
            </new>

        </blocks>

        <helpers>
            <new>
                <class>
                    Packt_New_Helper
                </class>
            </new> 
        </helpers>

        <models>
            <new>
                <class>
                    Packt_New_Model
                </class>
            </new>
        </models>
    </global>
        <frontend>
            <routers>
                <new>
                    <use>standard</use>
                    <args>
                        <module>
                            Packt_New
                        </module>
                        <frontName>
                            new
                        </frontName>  
                    </args>
                </new>
            </routers>
        </frontend>
</config>

my Controller..


<?php 

class Packt_New_IndexController extends Mage_Core_Controller_Front_Action{

    public function indexAction(){



    }

    public function newAction(){


        echo "this is my new controller ";
    }


}
0

Don't use spaces or new lines in the tags that contain string values.
For example this:

            <class>
                Packt_New_Model
            </class>

Should be

<class>Packt_New_Model</class>

Do the same for all your config.xml file. Magento does not strip the value before using it.

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.