BluTiGeS Posted November 12, 2016 Share Posted November 12, 2016 (edited) Hi all, I started to rewrite some of my modules to the 1.7 Prestashop, a lot of smarty globals were removed, okay (not nice but workaroud is possible), But since I use smarty content in my JS i put the jquery based scripts into the tpl files, but now i get a undefined reference error, since Jquery is appened at the end of the DOM. Is it really required to put all my js now in a seperate js file and only put some dynamic values into the tpl files? So that the js file can access it? Is there a smarter solution for that? EDIT: this is also not including the needed formatCurrencyCldr function. *grml* public function hookdisplayHeader($params) { $this->context->controller->addJS(_PS_JS_DIR_.'tools.js'); } EDIT2: how can I get the current selected id_product_attribute in JS? In the past there was a input field, but now it seems first to send a cart refresh before adding the product to the cart. So multi level ajax calls needed ;( Regards Edited November 12, 2016 by BluTiGeS (see edit history) 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