A
A
Alexey Moloko2019-01-24 09:49:26
opencart
Alexey Moloko, 2019-01-24 09:49:26

How to display a group of buyers in an order letter?

DD!
Please tell me how to display the name of the buyer's group in the order letter?
________________________
UPD:
I solved this way:
In the order model after if ($order_info['customer_id']) {
Added

$customer_group_id = $this->config->get('config_customer_group_id');
          $this->load->model('account/customer_group');
          $customer_group_info = $this->model_account_customer_group->getCustomerGroup($customer_group_id);
          $data['customer_group'] = $customer_group_info['name'];

In the email template - Many thanks to zoozag for the tip! <?php echo $customer_group; ?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Moloko, 2019-01-28
@whillson

I solved it this way:
In the order model after if ($order_info['customer_id']) {
Added

$customer_group_id = $this->config->get('config_customer_group_id');
$this->load->model('account/customer_group');
$customer_group_info = $this->model_account_customer_group->getCustomerGroup($customer_group_id);
$data['customer_group'] = $customer_group_info['name'];

In the email template -<?php echo $customer_group; ?>

Z
zoozag, 2019-01-24
@zoozag

In the order model, find:
// If order status is 0 then becomes greater than 0 send main html email
Next comes the data preparation code for the order email. Below is:
if ($order_info['customer_id']) {
Around this place you can add:

$this->load->model('account/customer_group');
$data['customer_group'] = $this->model_account_customer_group->getCustomerGroup($this->customer->getGroupId());

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question