bobolund Posted December 19, 2015 Share Posted December 19, 2015 Hello, I had made a countdown teller in a widget and hooked it to the header. But now the problem is that the JS load on all page except for the front page. I made the template on one domain and host and then i moved it to another domain and host and now it doesn't show up in the front page. So everything was working before. But after i moved it it's not working on the homepage. I tried to put the widget in another hook, and no matter witch hook i put it in it doesn't show up on the front page. But all other pages is it working fine. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted December 19, 2015 Share Posted December 19, 2015 Hi, probably if you look at where hook called in .tpl, there is a check for page=index and if so not executed. I see that 'a lot'..lol To avoid add hook to module: register name header hook function name:hookHeader here you will want to call your .js file $this->context->controller->addJS(($this->_path).'your_js_name.js'); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now