Hi there the common practice to do is to add the smarty variables in the controller of the page not in the class file
so you can keep the function to the Product.php but the smarty assign code should be moved to the ProductController.php inside the initContent function and changed to something like
$this->context->smarty->assign('query_results', $this->product->sendIdLangBySmarty());