Post by nightwing » Thu Oct 08, 2020 8:44 am

Hi Team,
I would like some assistance in displaying the date the customer joined the website on the account page. For example, Member since May 1, 2020.
OC 3.0.3.2, Default Theme
Thanks
Last edited by nightwing on Mon Oct 12, 2020 3:18 am, edited 1 time in total.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by letxobnav » Thu Oct 08, 2020 9:42 am

in catalog/controller/account/account.php
before:

Code: Select all

		$data['column_left'] = $this->load->controller('common/column_left');
add:

Code: Select all

		$customer_info = $this->model_account_customer->getCustomer($this->customer->getId());
		$data['member'] = $customer_info['firstname'].' '.$customer_info['lastname'];
		$data['member_since'] = substr($customer_info['date_added'],0,10);
in catalog/view/theme/default/template/account/account.twig
before:

Code: Select all

      <h2>{{ text_my_account }}</h2>
add:

Code: Select all

		<h3>{{ member }}</h3>
		<p>{{ member_since }}</p>
clear your caches.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by IP_CAM » Thu Oct 08, 2020 10:41 am

Thank you for the Info, did not exist anywhere I looked as Mod ... ;)
For v.1.5.6.x Versions, it requires only one Line in the 'controller' account.php File, just to mention it.
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by nightwing » Thu Oct 08, 2020 7:53 pm

Thanks letxobnav, it worked well! @ip_cam, I searched around I didn't find a mod either :D
letxobnav wrote:
Thu Oct 08, 2020 9:42 am
in catalog/controller/account/account.php
before:

Code: Select all

		$data['column_left'] = $this->load->controller('common/column_left');
add:

Code: Select all

		$customer_info = $this->model_account_customer->getCustomer($this->customer->getId());
		$data['member'] = $customer_info['firstname'].' '.$customer_info['lastname'];
		$data['member_since'] = substr($customer_info['date_added'],0,10);
in catalog/view/theme/default/template/account/account.twig
before:

Code: Select all

      <h2>{{ text_my_account }}</h2>
add:

Code: Select all

		<h3>{{ member }}</h3>
		<p>{{ member_since }}</p>
clear your caches.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by paulfeakins » Fri Oct 09, 2020 6:20 pm

nightwing wrote:
Thu Oct 08, 2020 7:53 pm
Thanks letxobnav, it worked well!
So if it's fixed please write [SOLVED] at the start of the post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: NicNie, shanghua and 457 guests