Hi,
I did not understand your message but the PHP code in modules is not the same than in views.
It is not possible to copy/past code in views directly in a module, the context is completely different.
After that, I don't know where you put your code so it is difficult to help you.
A module could be call in the product page but the module should read the product id directly in the url.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.