jemmeli Posted August 1, 2013 Posted August 1, 2013 (edited) 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 August 2, 2013 by jemmeli (see edit history) Share this post Link to post Share on other sites More sharing options...
PascalVG Posted August 1, 2013 Posted August 1, 2013 Maybe this helps: http://www.smarty.net/forums/viewtopic.php?t=7201&highlight=create+array 1 Share this post Link to post Share on other sites More sharing options...
vekia Posted August 1, 2013 Posted August 1, 2013 i suppose that it is because block cart module is loaded after module that you created, so there is something like "overwrite" anyway, you should check Pascal suggestion 1 Share this post Link to post Share on other sites More sharing options...
jemmeli Posted August 2, 2013 Posted August 2, 2013 I just made a module "reset and the value get read" Share this post Link to post 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