Hi, I still can't seem to figure this out. I've included <?php echo $text_customer_group; ?><?php echo $customer_group; ?> in order.tpl but I can't seem to get it to display on the confirmation email. Can anyone please help this newbie? Thanks.
catalog/language/your_language/mail/order.php
search for
add after
catalog/model/checkout/order.php
search for
add before
search for
add after
catalog/view/theme/your_theme_name/template/mail/order.tpl
search for
add after
ONLY APPLIED TO OC1520 - OC1521
Create new file and name it customer_group.php this file content should be:
and this file should be placed into public_html/catalog/model/account/ folder
ONLY APPLIED TO OC1530 - OC1531
catalog/model/account/customer_group.php
search for
replace with
search for
Code: Select all
$_['text_new_email'] = 'Email:';
Code: Select all
$_['text_customer_group'] = 'Customer Group:';
search for
Code: Select all
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
Code: Select all
$this->load->model('account/customer_group');
$customer_info = $this->model_account_customer->getCustomer($order_info['customer_id']);
$customer_group = $this->model_account_customer_group->getCustomerGroup($customer_info['customer_group_id']);
Code: Select all
$template->data['text_email'] = $language->get('text_new_email');
Code: Select all
$template->data['text_customer_group'] = $language->get('text_customer_group');
$template->data['customer_group'] = $customer_group['name'];
search for
Code: Select all
<b><?php echo $text_email; ?></b> <?php echo $email; ?><br />
Code: Select all
<b><?php echo $text_customer_group; ?></b> <?php echo $customer_group; ?><br />
Create new file and name it customer_group.php this file content should be:
Code: Select all
<?php
class ModelAccountCustomerGroup extends Model {
public function getCustomerGroup($customer_group_id) {
$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "customer_group cg LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (cg.customer_group_id = cgd.customer_group_id) WHERE cg.customer_group_id = '" . (int)$customer_group_id . "' AND cgd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
return $query->row;
}
public function getCustomerGroups() {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer_group cg LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (cg.customer_group_id = cgd.customer_group_id) WHERE cgd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY cg.sort_order ASC, cgd.name ASC");
return $query->rows;
}
}
?>
ONLY APPLIED TO OC1530 - OC1531
catalog/model/account/customer_group.php
search for
Code: Select all
$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "customer_group WHERE customer_group_id = '" . (int)$customer_group_id . "'");
Code: Select all
$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "customer_group cg LEFT JOIN " . DB_PREFIX . "customer_group_description cgd ON (cg.customer_group_id = cgd.customer_group_id) WHERE cg.customer_group_id = '" . (int)$customer_group_id . "' AND cgd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
Last edited by ocart777 on Sun Feb 07, 2016 7:15 pm, edited 2 times in total.
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
Thank you for the time to help this.
I am using OC 1.5.3.1 with four customer groups: ASIA, AUSTRALIA, AMERICA and EUROPE.
I have followed your instructions, but still no luck (the customer group remains empty).
Would you please check if there any additional scripts/codes to be added?
Again, I really appreciate for your help!
Thanks,
Robert
I am using OC 1.5.3.1 with four customer groups: ASIA, AUSTRALIA, AMERICA and EUROPE.
I have followed your instructions, but still no luck (the customer group remains empty).
Would you please check if there any additional scripts/codes to be added?
Again, I really appreciate for your help!
Thanks,
Robert
Attachments
customer_group.jpg (42.57 KiB) Viewed 2055 times
hi, i've edited my post, you can refer there.. but still you need to start over because the previous code will not working as its use the customer_id instead of customer_group_id to search for customer_group in model filerobertoliver wrote:Thank you for the time to help this.
I am using OC 1.5.3.1 with four customer groups: ASIA, AUSTRALIA, AMERICA and EUROPE.
I have followed your instructions, but still no luck (the customer group remains empty).
Would you please check if there any additional scripts/codes to be added?
Again, I really appreciate for your help!
Thanks,
Robert
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
I have done all these in opencart 1.5.6.4 but in mail order customer group is empty.. is there any difference for 1.5.6.4?
Who is online
Users browsing this forum: Bing [Bot] and 15 guests