2

I am trying to replace the helper that provides the compare box with the list of products added to it. My helper is going to get the product ids from a cookie instead of from Magentos session.

As I understand things I need to create a file in app/code/local/Mynamespace/Mymodule/Helper/Data.php and put my own class in this file. Is this correct or should I put the file somewhere else or perhaps give it a different name?

1

you have to add the helper class detail in confif.xml file

...

<global>
    <helpers>
      <[modelname]>
        <class>[NameSpace]_[Modelname]_Helper</class>
      </[modelname]>
    </helpers>
<global>

....

Crete the data.php file in [NameSpace][Modelname]\Helper\Data.php

<?php
class [NameSpace]_[Modelname]_Helper_Data extends Mage_Core_Helper_Abstract
{
}
| improve this answer | |
  • Where should I put the config.xml file? Am I correct in understanding that it should be placed in app/code/local/Mynamespace/Mymodule/etc/? – fuumind Feb 6 '14 at 9:53
  • yes that file already there just you have to add <helper> tag in <global> tag – Keyul Shah Feb 6 '14 at 9:54
  • you welcome :) :) – Keyul Shah Feb 6 '14 at 13:46

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.