1
function get_user_id()
{
global $cookie;
$userid = NULL;
if (isset($cookie->id_customer))
{
$userid = $cookie->id_customer;
}
return $userid;
}
爲什麼用戶標識即使登錄也會返回null?獲取用戶ID Prestashop
你把這個代碼,你創建的模塊或控制器放在哪裏? – romainberger