2

I have changed my etc/system.xml and my etc/config.xml with the structure which should replace the Mage_JaviNewListProductController_Helper_Data by Lecasa_JaviNewListProductController_Helper_Data.

I am getting the following error:

Fatal error: Class 'Mage_JaviNewListProductController_Helper_Data' not found in /home/javiertxu/Documentos/webs/clon_lecasa/app/Mage.php on line 547

This is the system.xml file

This is the config.xml file

And this is the data helper of my module

I do not know what more I can change for replace the Mage_ by the parent name of my module when I use:

Mage::helper('JaviNewListProductController')->renderProductInCatalog($_product);

I think that this has not relevance but I am using this function in rwd/default/template/.../list.phtml

Active module Thanks

  • check your upper-lowercase-writing, that's inconsitsent. Mage::helper('javinewlistproductcontroller') should be correct in my opinion – HelgeB Feb 22 at 10:16
  • try Mage::helper('javinewlistproductcontroller')->renderProductInCatalog($_product); – Zefiryn Feb 22 at 10:17
  • @Zefiryn I have replace it by lowercase but the error is the same. The issue here is the Mage_ prefix. I would like to read more of your suggestions. Thanks – Javi Torre Sustaeta Feb 22 at 10:23
  • @HelgeB thanks for your answer, but the Mage_ prefix continues appearing. I have change it to lowercase, but I think that the problem is with some element of the configuratios. I wait for another suggestion. Thanks.. – Javi Torre Sustaeta Feb 22 at 12:47
  • Is your module enabled (i.e. xml file in etc/modules and tag active true)? – HelgeB Feb 22 at 12:57
0

To summarize the discussion in the comments you have to change the following in order to get your code working:

File /etc/modules/Lecasa_Javinewlistproductcontroller.xml must have this content (the tag below <modules> has to be identical with that used in config.xml and should correspond with the naming of the path to your modules folder if you replace _ with /):

<?xml version="1.0"?>
<config>
    <modules>
        <Lecasa_JaviNewListProductController>
            <active>true</active>
            <codePool>local</codePool>
        </Lecasa_JaviNewListProductController>
    </modules>
</config>

With this done your module will be found by Magento and you can access the helper'S method with:

Mage::helper('javinewlistproductcontroller')->renderProductInCatalog($_product);

The identifier for your helper is the tag name below <helpers> in your config.xml.

I hope that will help you to get your module work.

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.