如何在登录后立即在Prestashop my-account.tpl中获取用户电子邮件地址?

如何在登录后立即在Prestashop my-account.tpl中获取用户电子邮件地址?,prestashop,Prestashop,我正在修改prestashop 1.4.9中的my-account.tpl,并希望在此页面中获取用户电子邮件地址 但是,我只能访问{$custmerName}。我把{debug}放在里面了,它似乎不可访问。另外,{$smarty.post}在登录后为空 有什么建议吗?此信息可在访问者的cookie中找到,您可以轻松地将其显示在my-account.tpl中: {l s='Your e-mail address is:'} {$cookie->email|escape:'htmlall':'

我正在修改prestashop 1.4.9中的my-account.tpl,并希望在此页面中获取用户电子邮件地址

但是,我只能访问{$custmerName}。我把{debug}放在里面了,它似乎不可访问。另外,{$smarty.post}在登录后为空


有什么建议吗?

此信息可在访问者的cookie中找到,您可以轻松地将其显示在my-account.tpl中:

{l s='Your e-mail address is:'} {$cookie->email|escape:'htmlall':'UTF-8'}
有关更多详细信息,您可以在身份验证时在第178行的/controllers/AuthController.php中再次检查它的分配位置:

self::$cookie->id_customer = (int)($customer->id);
self::$cookie->customer_lastname = $customer->lastname;
self::$cookie->customer_firstname = $customer->firstname;
self::$cookie->passwd = $customer->passwd;
self::$cookie->logged = 1;
self::$cookie->email = $customer->email;

此信息在访问者的cookie中可用,您可以轻松地将其显示在my-account.tpl中:

{l s='Your e-mail address is:'} {$cookie->email|escape:'htmlall':'UTF-8'}
有关更多详细信息,您可以在身份验证时在第178行的/controllers/AuthController.php中再次检查它的分配位置:

self::$cookie->id_customer = (int)($customer->id);
self::$cookie->customer_lastname = $customer->lastname;
self::$cookie->customer_firstname = $customer->firstname;
self::$cookie->passwd = $customer->passwd;
self::$cookie->logged = 1;
self::$cookie->email = $customer->email;