I put a link in a tpl to test.php installed at the cart root.
The problem I have is that I can’t figure out what to put in test.php so it will understand “$this->”.
I’ve tried a bunch of “require_once” and “define” combinations without any luck.
I’m getting “Fatal error: Using $this when not in object context” from the code -
$smarty_var = $this->get_template_vars(‘smarty_var_get’);
[quote name=‘wkress’]I put a link in a tpl to test.php installed at the cart root.
The problem I have is that I can’t figure out what to put in test.php so it will understand “$this->”.
I’ve tried a bunch of “require_once” and “define” combinations without any luck.
I’m getting “Fatal error: Using $this when not in object context” from the code -
$smarty_var = $this->get_template_vars(‘smarty_var_get’);[/QUOTE]
When using $this you must write it within a class or object definition. It looks like your writing outside of a class context.
[URL=“PHP: Classes and Objects - Manual”]http://php.net/manual/en/language.oop5.php[/URL]
Including files will not fix this. More info might help…