Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

вывод группы покупателя


 Share

Recommended Posts

Доброго времени суток. Подскажите как в sale/order (admin) вывести имя группы. id группы вывел, а вот с именем этот группы всё печально.

Опенкарт 3

Link to comment
Share on other sites


пример прямо в самом файле admin\controller\sale\order.php

$this->load->model('customer/customer_group');

$customer_group_info = $this->model_customer_customer_group->getCustomerGroup($order_info['customer_group_id']);

	if ($customer_group_info) {
		$data['customer_group'] = $customer_group_info['name'];
	} else {
		$data['customer_group'] = '';
	}

 

Link to comment
Share on other sites

Только что, AlexDW сказал:

пример прямо в самом файле admin\controller\sale\order.php

$this->load->model('customer/customer_group');

$customer_group_info = $this->model_customer_customer_group->getCustomerGroup($order_info['customer_group_id']);

	if ($customer_group_info) {
		$data['customer_group'] = $customer_group_info['name'];
	} else {
		$data['customer_group'] = '';
	}

 

Как это использовать?)

Сначала в модификатор public function getOrders($data = array()) { добавил  o.customer_group_id AS customer_group_id

Дное в контролер в массив $data['orders'][] = array( добавил 'customer_group_id'      => $result['customer_group_id'],

какие должны быть дальнейшие гдействия?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.