qrczak Posted January 21, 2017 Share Posted January 21, 2017 Can someone explain me why according to many tutorials when I want to assign variable to hook I should do like this: for example inside the public function hookHeader() $this->smarty->assign(array( 'myvariable' => 'mytext' )); but it doesn't works for me BUT works for me when I make like this: global $smarty; $smarty->assign(array( 'myvariable' => 'mytext' )); Any ideas? Link to comment Share on other sites More sharing options...
razaro Posted January 21, 2017 Share Posted January 21, 2017 You should use $this->context->smarty Check detaild documentation here http://doc.prestashop.com/display/PS15/Using+the+Context+Object Link to comment Share on other sites More sharing options...
qrczak Posted January 21, 2017 Author Share Posted January 21, 2017 Thanks a lot! 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