Jump to content

[SOLVED] how change a variable inside tpl file


jemmeli

Recommended Posts

hello

 

I have a function inside a module that use a action-hook to modify a variable inside "shopping-cart.tpl"

 

public function hookActionCartSave($params) {

global $smarty;
$this->context->smarty->assign(array(
'total_price' => 700
));
$this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl');

 }

 

 

I dint know what wrong with my code but when i put the following code in my tpl file "shopping-cart.tpl" :

 

 

{$total_price'}

 

i did not got the needed value "700"

Edited by jemmeli (see edit history)
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...