Page 1 of 1

Email address in account customer page - Opencart 3

Posted: Fri Aug 31, 2018 10:24 pm
by elpidios
Hi
I would like somehow to echo the email address of a logged in customer, at the customer page.
I think that i have to change account.php to the controller and also the twig file but I am not sure how to do it. Please help me
I think is something very easy for someone who knows

Re: Email address in account customer page - Opencart 3

Posted: Fri Aug 31, 2018 10:49 pm
by straightlight
From account.php file, you could simply use:

Code: Select all

$data['email'] = $this->customer->getEmail();
Then, in your account.twig file, you could output:

Code: Select all

{% if email %}
{{ email }}
{% endif %}
Then, apply this FAQ: viewtopic.php?f=176&p=733002#p718325

This should already solved the issue.

Re: Email address in account customer page - Opencart 3

Posted: Sat Sep 01, 2018 4:20 am
by elpidios
Thanks a lot. Working fine. I also created it on VQMOD :) . opencart is not so difficult as i was thinking in terms of easy plugins