Post by martinzizka@email.cz » Mon Aug 17, 2020 1:21 am

Hello, could anyone help me with adding customer group to default invoice below shipping method in 1.5.6.4? I have found in view/template order_invoice, but don't know how to write the code.

I tried something like

Code: Select all

<?php if ($order['customer_group']) { ?>
          <tr>
            <td><?php echo $text_customer_group; ?></td>
            <td><?php echo $order['customer_group']; ?></td>
          </tr>
          <?php } ?>
but didn't work.

Thank you


Posts

Joined
Wed Dec 13, 2017 6:03 am

Post by grgr » Mon Aug 17, 2020 9:17 pm

Customer group is not part of the information that is returned to display in the invoice.

From memory.......

You will need to update the file ../admin/controller/sale/order.php and add some code to the invoice() function.

Add this bit to it:

Code: Select all

			$customer_group_details = $this->model_sale_customer_group->getCustomerGroup($order_info['customer_group_id']);
			if ($customer_group_details ) {
				$this->data['customer_group'] = $customer_group_details ['name'];
			} else {
				$this->data['customer_group'] = '';
			}
You can now use:

Code: Select all

<?php echo $customer_group; ?>

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by martinzizka@email.cz » Fri Aug 21, 2020 4:00 am

Thank you, would you be so kind and mark the changes in the files? https://we.tl/t-c7fpSMVd90


Posts

Joined
Wed Dec 13, 2017 6:03 am
Who is online

Users browsing this forum: No registered users and 194 guests