Post by AlanARG » Thu Oct 15, 2020 6:06 am

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!
Last edited by AlanARG on Thu Oct 15, 2020 12:19 pm, edited 1 time in total.

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by letxobnav » Thu Oct 15, 2020 11:38 am

1) admin/model/sale/order.php -> function getOrders
add:

Code: Select all

o.shipping_method
to the select statement

2) admin/controller/sale/order.php -> function getList
add:

Code: Select all

'shipping_method'	=> $result['shipping_method'],
after

Code: Select all

$data['orders'][] = array(
3) admin/view/template/sale/order_list.twig
add:

Code: Select all

<td class="text-right">Shipping</td>
before:

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>
or where you want the column to show

add:

Code: Select all

<td class="text-left">{{ order.shipping_method }}</td>
before:

Code: Select all

<td class="text-left">{{ order.date_added }}</td>
or where you want the column to show

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.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by AlanARG » Thu Oct 15, 2020 12:15 pm

letxobnav wrote:
Thu Oct 15, 2020 11:38 am
1) admin/model/sale/order.php -> function getOrders
add:

Code: Select all

o.shipping_method
to the select statement

2) admin/controller/sale/order.php -> function getList
add:

Code: Select all

'shipping_method'	=> $result['shipping_method'],
after

Code: Select all

$data['orders'][] = array(
3) admin/view/template/sale/order_list.twig
add:

Code: Select all

<td class="text-right">Shipping</td>
before:

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>
or where you want the column to show

add:

Code: Select all

<td class="text-left">{{ order.shipping_method }}</td>
before:

Code: Select all

<td class="text-left">{{ order.date_added }}</td>
or where you want the column to show

clear your caches
Thanks a lot man, that was extremely helpful and so easy to do.

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!

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm
Who is online

Users browsing this forum: Bing [Bot], mattltm and 330 guests