I want to add Customer field under Shipping method.
I have already tried to add in order_invoice.tpl file this
<?php echo $text_customer_group_id; ?></b> <?php echo $order['customer_group_id']; ?>
but it doesn't work.
Need some help please.
Code: Select all
/catalog/view/theme/default/template/mail/order.tpl
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I have tried this but i get error in email.
Notice: Undefined variable: text_customer_group_id in catalog/view/theme/journal2/template/mail/order.tpl on line 34 Notice: Undefined variable: order in catalog/view/theme/journal2/template/mail/order.tpl on line 34
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
in your catalog/model/checkout/order.php file,
find:
Code: Select all
$data['order_status'] = $order_status;
Code: Select all
$this->load->model('setting/setting');
$setting = $this->model_setting_setting->getSetting('config', $order_info['store_id']);
$customer_group_id = isset($setting['config_customer_group_id']) ? $setting['config_customer_group_id'] : $this->config->get('config_customer_group_id');
$data['text_customer_group_id'] = sprintf($this->language->get('text_customer_group_id'), (int)$customer_group_id);
add at the bottom:
Code: Select all
$_['text_customer_group_id'] = 'Customer Group ID: %s';
replace:
Code: Select all
<?php echo $text_customer_group_id; ?></b> <?php echo $order['customer_group_id']; ?>
Code: Select all
<?php if ($text_customer_group_id) { ?>
<?php echo $text_customer_group_id; ?></b> <?php echo $order['customer_group_id']; ?>
<?php } ?>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I have tried your suggestion but again i get an error.
text_customer_group_id Notice: Undefined variable: order in catalog/view/theme/journal2/template/mail/order.tpl on line 35
Code: Select all
<?php if ($text_customer_group_id) { ?>
<?php echo $text_customer_group_id; ?>
<?php } ?>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
No error it shows only this "text_customer_group_id" nothing more.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Have no idea where the spaces comes from (I added the word <space> in this example). It should be like this:$customer_group_id = isset($setting['config_customer_group_id']) ? $setting['config_customer_group_id'] : $this->config->get(<space><space><space><space><space>'config_customer_group_id');
Code: Select all
$customer_group_id = isset($setting['config_customer_group_id']) ? $setting['config_customer_group_id'] : $this->config->get('config_customer_group_id');
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Just tested again but still the same error.
Users browsing this forum: No registered users and 0 guests