1
function get_user_id()
{
global $cookie;
$userid = NULL;
if (isset($cookie->id_customer))
{
$userid = $cookie->id_customer;
}
return $userid;
}
为什么用户标识即使登录也会返回null?获取用户ID Prestashop
你把这个代码,你创建的模块或控制器放在哪里? – romainberger