Attachments
The name in order hiatory page - IMG_٢٠٢٠٠٨٠٦_٢٠٤٦٤٩.jpg (120.16 KiB) Viewed 3937 times
The name in shipping information - IMG_٢٠٢٠٠٨٠٦_٢٠٥١٠٠.jpg (122.54 KiB) Viewed 3936 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Probably for when the person who the shipment is send to is not the same as the customer.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
I do not recognize that screen so I suspect you already have a modification running.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
I can tell you how to do it default but I think journal does not use those functions so it would be no use to you.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Tell me how do it in default
And how the name on the shipping address to be listed as a column between the order id column and the customer name column in admin panel
1) in admin/model/sale/order.php - function getOrders
change the query:
Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, CONCAT(o.shipping_firstname, ' ', o.shipping_lastname) AS ship_to, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
2) in admin/controller/sale/order.php - function getList
change the array assignment:
Code: Select all
$data['orders'][] = array(
'order_id' => $result['order_id'],
'customer' => $result['customer'],
'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])),
'shipping_code' => $result['shipping_code'],
'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true),
'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true)
);
Code: Select all
$data['orders'][] = array(
'order_id' => $result['order_id'],
'customer' => $result['customer'],
'ship_to' => $result['ship_to'],
'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])),
'shipping_code' => $result['shipping_code'],
'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true),
'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true)
);
3) in admin/view/template/sale/order_list.twig
before:
Code: Select all
<td class="text-left">{% if sort == 'customer' %} <a href="{{ sort_customer }}" class="{{ order|lower }}">{{ column_customer }}</a> {% else %} <a href="{{ sort_customer }}">{{ column_customer }}</a> {% endif %}</td>
Code: Select all
<td class="text-left">{{ column_ship_to }}</td>
Code: Select all
<td class="text-left">{{ order.customer }}</td>
Code: Select all
<td class="text-left">{{ order.ship_to }}</td>
add:
Code: Select all
$_['column_ship_to'] = 'Ship To';
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
That's called help without any expectation of return.letxobnav wrote: ↑Sat Aug 08, 2020 8:51 pmOK,
1) in admin/model/sale/order.php - function getOrders
change the query:to:Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
that will make sure those fields are retrieved as well.Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, CONCAT(o.shipping_firstname, ' ', o.shipping_lastname) AS ship_to, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
2) in admin/controller/sale/order.php - function getList
change the array assignment:to:Code: Select all
$data['orders'][] = array( 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'shipping_code' => $result['shipping_code'], 'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true), 'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true) );
Code: Select all
$data['orders'][] = array( 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'ship_to' => $result['ship_to'], 'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'shipping_code' => $result['shipping_code'], 'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true), 'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true) );
3) in admin/view/template/sale/order_list.twig
before:add:Code: Select all
<td class="text-left">{% if sort == 'customer' %} <a href="{{ sort_customer }}" class="{{ order|lower }}">{{ column_customer }}</a> {% else %} <a href="{{ sort_customer }}">{{ column_customer }}</a> {% endif %}</td>
before:Code: Select all
<td class="text-left">{{ column_ship_to }}</td>
add:Code: Select all
<td class="text-left">{{ order.customer }}</td>
4) in your admin/language/xx-xx/sale/order.phpCode: Select all
<td class="text-left">{{ order.ship_to }}</td>
add:Code: Select all
$_['column_ship_to'] = 'Ship To';
Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature
and that is called calling out people who CHOOSE not to offer their knowledge for free, on the most part, their knowledge is their paid income and we are all entitled to make a living with our skillsThat's called help without any expectation of return.
I do not see many people offering their products for free
On that point, I would actually like to say thank you to the very kind Scot who offered me candy and you know what that is what is I call give and receive ..
You can not force people to help you. I am not here to help everyone that I can .. I choose who I want to help .. We each have our own reasons ... and this may surprise you, but we are entitled to do that
letxobnav is great - instead of your comment dragging others down ..
letxobnav
and he might not EXPECT anything in return, but he sure deserves to receive something in return ..
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
I have no intention to calling out other people to help every one here its their.by mona wrote: ↑Sat Aug 08, 2020 9:34 pmand that is called calling out people who CHOOSE not to offer their knowledge for free, on the most part, their knowledge is their paid income and we are all entitled to make a living with our skillsThat's called help without any expectation of return.
I do not see many people offering their products for free
On that point, I would actually like to say thank you to the very kind Scot who offered me candy and you know what that is what is I call give and receive ..
You can not force people to help you. I am not here to help everyone that I can .. I choose who I want to help .. We each have our own reasons ... and this may surprise you, but we are entitled to do that
letxobnav is great - instead of your comment dragging others down ..
letxobnav
and he might not EXPECT anything in return, but he sure deserves to receive something in return ..
If you want to help some one its your liking if not its also your business i don't mind.
My message was simple to appreciate and encourage those who are willing to help others.
Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature
it's workingletxobnav wrote: ↑Sat Aug 08, 2020 8:51 pmOK,
1) in admin/model/sale/order.php - function getOrders
change the query:to:Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
that will make sure those fields are retrieved as well.Code: Select all
$sql = "SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, CONCAT(o.shipping_firstname, ' ', o.shipping_lastname) AS ship_to, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS order_status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
2) in admin/controller/sale/order.php - function getList
change the array assignment:to:Code: Select all
$data['orders'][] = array( 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'shipping_code' => $result['shipping_code'], 'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true), 'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true) );
Code: Select all
$data['orders'][] = array( 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'ship_to' => $result['ship_to'], 'order_status' => $result['order_status'] ? $result['order_status'] : $this->language->get('text_missing'), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'shipping_code' => $result['shipping_code'], 'view' => $this->url->link('sale/order/info', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true), 'edit' => $this->url->link('sale/order/edit', 'user_token=' . $this->session->data['user_token'] . '&order_id=' . $result['order_id'] . $url, true) );
3) in admin/view/template/sale/order_list.twig
before:add:Code: Select all
<td class="text-left">{% if sort == 'customer' %} <a href="{{ sort_customer }}" class="{{ order|lower }}">{{ column_customer }}</a> {% else %} <a href="{{ sort_customer }}">{{ column_customer }}</a> {% endif %}</td>
before:Code: Select all
<td class="text-left">{{ column_ship_to }}</td>
add:Code: Select all
<td class="text-left">{{ order.customer }}</td>
4) in your admin/language/xx-xx/sale/order.phpCode: Select all
<td class="text-left">{{ order.ship_to }}</td>
add:Code: Select all
$_['column_ship_to'] = 'Ship To';
Thank you very much for your cooperation with me and for giving me help free of charge. This is an unforgettable support
Default OC has an order list and an order detail page (including a history part which is just a blockchain-line order status/comment record).
Your original image shows the order list named as order history (though it lists the number of products which is not default).
The changes you applied are for the order list so I assume you have another order history page which is journal specific? Better state what the route of the page is instead of the name like sale/order or sale/order/info, you find this in the address bar.
Then it is more clear what page you are talking about as people can always change the name but not the route.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
letxobnav wrote: ↑Mon Aug 10, 2020 10:44 amI do not know what your order history page is.
Default OC has an order list and an order detail page (including a history part which is just a blockchain-line order status/comment record).
Your original image shows the order list named as order history (though it lists the number of products which is not default).
The changes you applied are for the order list so I assume you have another order history page which is journal specific?
order-history.jpg
Better state what the route of the page is instead of the name like sale/order or sale/order/info, you find this in the address bar.
Then it is more clear what page you are talking about as people can always change the name but not the route.
/index.php?route=account/order
for this you need to change catalog/model/account/order.php function getOrders
change:
Code: Select all
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
Code: Select all
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, o.shipping_firstname, o.shipping_lastname, os.name as status, o.date_added, o.total, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
change the array:
Code: Select all
$data['orders'][] = array(
'order_id' => $result['order_id'],
'name' => $result['firstname'] . ' ' . $result['lastname'],
'status' => $result['status'],
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'products' => ($product_total + $voucher_total),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'view' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], true),
);
Code: Select all
$data['orders'][] = array(
'order_id' => $result['order_id'],
'name' => $result['firstname'] . ' ' . $result['lastname'],
'ship_to' => $result['shipping_firstname'] . ' ' . $result['shipping_lastname'],
'status' => $result['status'],
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'products' => ($product_total + $voucher_total),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'view' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], true),
);
in catalog/view/theme/default/template/account/order_list.twig
before:
Code: Select all
<td class="text-left">{{ column_customer }}</td>
Code: Select all
<td class="text-left">{{ column_ship_to }}</td>
Code: Select all
<td class="text-left">{{ order.name }}</td>
Code: Select all
<td class="text-left">{{ order.ship_to }}</td>
in catalog/language/xx-xx/account/order.php
add:
Code: Select all
$_['column_ship_to'] = 'Ship To';
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Users browsing this forum: No registered users and 13 guests