0

I am newbie in X Cart and working on XCart 5.2.5. I would like to know that how can I displays customer billing or shipping address in one new custom column of order list at back end. Please see the attached screen shots below Order list screenshot

Any kind of help will be appreciated.

1 Answers1

0

You would need to decorate the \XLite\View\ItemsList\Model\Order\Admin\Search class and define a new column in the defineColumns() method.

The column definition should be something like this:

        $columns['shipping_address'] = array(
          static::COLUMN_NAME     => 'Shipping address',
          static::COLUMN_TEMPLATE => 'modules/Tony/OrderSearchChange/order/shipping_address/body.tpl',
          static::COLUMN_ORDERBY  => 350,
    );

First field defines a title of the column, the second field defines a template that will be shown in the table's cell and the third one defines the position of the column (the higher the number the further to the left the column will be).

I have also created a sample module, so you could play with it: https://dl.dropboxusercontent.com/u/23858825/Tony-OrderSearchChange-v5_2_0.tar

Tony

Tony
  • 149
  • 5