Post by natek » Wed Sep 05, 2012 11:19 pm

I need our customers to be able to see their customer ID # when logged into their account on the "my Account" page. Where is says my account right above the edit information is where I need it to show up like this My Account Number: 12345.

I added this to account.tpl
<td><b><?php echo $text_customer_id; ?></b></td>
<td><?php echo (int)$text_customer_id['customer_id']; ?></td>

and this to controller/account/account.php

$this->data['text_customer_id'] = $this->language->get('text_customer_id');

and this to english/account/account.php

$_['text_customer_id'] = 'Number:';

I just get the number Zero, but in the db it is a 5 digit number.

Any help is appreciated!



Wed Sep 05, 2012 11:09 pm

Post by JohnOC » Sat Sep 08, 2012 7:12 am

You need to pull the customer_id from the model in your controller -> account -> account.php file.

Then, you can call it in your account.tpl file.



Fri Aug 10, 2012 2:19 am

Post by gabbya » Mon Jan 28, 2013 11:21 pm

For Customer ID
In account.php page
$this->data['customer_id'] = $this->customer->getId();

in account.tpl Page
<?php echo $customer_id; ?>

For Customer FirstName
In account.php page
$this->data['customer_fname'] = $this->customer->getFirstName();

in account.tpl Page
<?php echo $customer_fname; ?>

Good luck :)

User avatar
New member


Sun May 06, 2012 11:39 pm
Who is online

Users browsing this forum: No registered users and 18 guests