Falcaol Posted January 5, 2022 Share Posted January 5, 2022 Hello ! I'm on P.S 1.6.1.18 I have a PHP file where I assigned an URL to a variable called $newUrl Then I wanted to assign this variable to Smarty like this: $this->context->smarty->assign('newUrl', $newUrl); return $this->module->display($this->file, 'displayPayment.tpl'); In my tpl file, I added {debug} , but I can't find my variable in the debug, so I can't call it. Could someone help me please? Link to comment Share on other sites More sharing options...
NemTom66 Posted January 6, 2022 Share Posted January 6, 2022 You may try. return $smarty->display(dirname(__FILE__).'/views/Payment.tpl'); Are you sure your template is rendered? Link to comment Share on other sites More sharing options...
NemTom66 Posted January 6, 2022 Share Posted January 6, 2022 Actually this should work return $this->display(__FILE__, 'Payment.tpl'); Link to comment Share on other sites More sharing options...
Falcaol Posted January 7, 2022 Author Share Posted January 7, 2022 Thanks for the answer My problem is solved Link to comment Share on other sites More sharing options...
NemTom66 Posted January 8, 2022 Share Posted January 8, 2022 How did you solve it? 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