How to make a display, appear, customer group on customer's logged in their home page?
Version 3.0.2.0
I want to make that when my customer logs in just display their group on next to their name.
Thus my customer can check and see their group(level) any time on website.
Please help.
In catalog/controller/common/header.php file,
find:
add above:
Then, replace:
with:
Then. in your catalog/language/en-gb/common/header.php file, since the definition cannot be found anywhere in the platform nor on the Github master files, as this issue may be a bug, add the following at the bottom of the file:
This should resolved the problem.
find:
Code: Select all
$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));
Code: Select all
$this->load->model('account/customer_group');
$customer_group = $this->model_account_customer_group->getCustomerGroup($this->config->get('config_customer_group_id'));
Code: Select all
$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));
Code: Select all
$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), html_entity_decode($customer_group['name'], ENT_QUOTES, 'UTF-8'), $this->url->link('account/logout', '', true));
Code: Select all
$_['text_logged'] = '<a href="%s">Welcome %s</a> (Group: %s) <a href="%s">Logout</a>';
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: JessiesBoutique and 515 guests