fred04 Posted July 12, 2017 Share Posted July 12, 2017 (edited) Hi, I'm developing a module and I have hooked a javascript only in product pages : public function hookActionFrontControllerSetMedia($params) { // Only on product page if ('product' === $this->context->controller->php_self) { $this->context->controller->registerJavascript(...); } this javascript contain jquery and I need to get the id_product_attribute, how can I do this ? My first think was to add, with another hook (e.g displayFooterProduct) , a HTML hidden element with the id_product_attribute. It works when page load for the first time but it was not changed when user change an attribute value. Is there a way with AJAX to get this information ? Fred Edited July 12, 2017 by fred04 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 13, 2017 Share Posted July 13, 2017 Is this javascript? It looks an awfully lot like php to me. 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