module hook:
public function hookHeader() { if ($this->context->controller->php_self == 'product') { // identify page name $this->context->controller->addJS($this->_path.'views/css/script.js'); // your module javascript } }
Sometimes it's better to show the page so a person can check it.
It is not always possible to solve everything according to the picture.
I'll give you a picture of the car and leave the front hood closed and ask you to tell me where my engine oil is leaking 😄