Jump to content

Helper Options and Tab Id


Mind And Go

Recommended Posts

Hy Folks,

 

I'm struggling with Helper Options.

Yet it's supposed to "help" and the documentation especially precise what's the purpose of each of them : http://doc.prestasho...ay/PS15/Helpers

 

My point is to use HelperOptions for configure a module.

I tried many and many times to make something works. I followed this post : http://www.prestasho...-helperoptions/

 

Finally I've almost done. My problem is the following message :

Notice: Undefined property: HelperOptions::$id in /srv/www/htdocs/shop/classes/helper/HelperOptions.php on line 49

I don't understand what's wrong. In the HelperOptions Line 49, I observe this :

$tab = Tab::getTab($this->context->language->id, $this->id);

I imagine that the problem is coming from the Tab. How to specify tabs in HelperOptions? Is it supposed to be the name of the fieldset or anything like that?

 

Any help would be appreciated!

 

regards

Link to comment
Share on other sites

  • 5 months later...

Hi, I'm currently have the same problem.

 

I don't know why is a requirement a Tab. In my module I'm not defining an administration tab, just the "configure" link.

 

The only thing  why it is needed is to put a default image, where? I don't know, seems as an icon beside title as seen in

admin/themes/default/template/helpers/options/options.tpl file.....

 

but wait!! in tutorials appear this

['image'] => 'url to icon',                                    // If missing, will use the default icon for the tab.
 

This is bad, because "image" is optional (between brackets), but still need a Tab value to create default image (here: https://github.com/PrestaShop/PrestaShop/blob/1.6/classes/helper/HelperOptions.php#L61 ) when in this case there is no Tab for module ($tab = false), just a simply "configure" link

 

Hope someone can help this, seems need to write right path to a non-module default icon image.

 

Thanks in advance :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...