Hey guys! How's it going?
I found this thread: viewtopic.php?f=20&t=48060
that would probably help but it's an old version.
Also, I've found this: https://stackoverflow.com/questions/320 ... t-opencart
Any ideas on how to add the "shipping method" column to the order list menu? 3.0.3.6 version.
Thanks!
1) admin/model/sale/order.php -> function getOrders
add:
to the select statement
2) admin/controller/sale/order.php -> function getList
add:
after
3) admin/view/template/sale/order_list.twig
add:
before:
or where you want the column to show
add:
before:
or where you want the column to show
clear your caches
add:
Code: Select all
o.shipping_method
2) admin/controller/sale/order.php -> function getList
add:
Code: Select all
'shipping_method' => $result['shipping_method'],
Code: Select all
$data['orders'][] = array(
add:
Code: Select all
<td class="text-right">Shipping</td>
Code: Select all
<td class="text-left">{% if sort == 'o.date_added' %} <a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a> {% else %} <a href="{{ sort_date_added }}">{{ column_date_added }}</a> {% endif %}</td>
add:
Code: Select all
<td class="text-left">{{ order.shipping_method }}</td>
Code: Select all
<td class="text-left">{{ order.date_added }}</td>
clear your caches
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.
Thanks a lot man, that was extremely helpful and so easy to do.letxobnav wrote: ↑Thu Oct 15, 2020 11:38 am1) admin/model/sale/order.php -> function getOrders
add:to the select statementCode: Select all
o.shipping_method
2) admin/controller/sale/order.php -> function getList
add:afterCode: Select all
'shipping_method' => $result['shipping_method'],
3) admin/view/template/sale/order_list.twigCode: Select all
$data['orders'][] = array(
add:before:Code: Select all
<td class="text-right">Shipping</td>
or where you want the column to showCode: Select all
<td class="text-left">{% if sort == 'o.date_added' %} <a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a> {% else %} <a href="{{ sort_date_added }}">{{ column_date_added }}</a> {% endif %}</td>
add:before:Code: Select all
<td class="text-left">{{ order.shipping_method }}</td>
or where you want the column to showCode: Select all
<td class="text-left">{{ order.date_added }}</td>
clear your caches
You are helping me out over here as well (viewtopic.php?f=199&t=220358&p=801612#p801612) and if you don't mind I'd like to donate something to you for this help. Let me know how
Thanks a lot again!
Who is online
Users browsing this forum: No registered users and 35 guests