I have module in Prestashop, where I need the current customer id. Here is my code in module php file:
$userid =(int)$this->context->customer->id;
$this->context->smarty->assign('userid',$userid);
I use this variable like parameter for custom link. This work fine, but every time get same ID. I mean...for different users. What could be the reason for this?