09-10-2015, 03:57 AM
|
|
|
|
Member
|
|
Join Date: Feb 2015
Posts: 16
|
|
|
Re: Add columns to order list
Now I see that I must change defineColumns() method in XLite\View\ItemsList\Model\Order\Admin\Search class. Here is its code
PHP Code:
protected function defineColumns() { return array( 'orderNumber' => array( static::COLUMN_NAME => static::t('Order #'), static::COLUMN_LINK => 'order', static::COLUMN_SORT => static::SORT_BY_MODE_ID, static::COLUMN_ORDERBY => 100, ), 'date' => array( static::COLUMN_NAME => static::t('Date'), static::COLUMN_TEMPLATE => $this->getDir() . '/' . $this->getPageBodyDir() . '/order/cell.date.tpl', static::COLUMN_SORT => static::SORT_BY_MODE_DATE, static::COLUMN_ORDERBY => 200, ), 'profile' => array( static::COLUMN_NAME => static::t('Customer'), static::COLUMN_TEMPLATE => $this->getDir() . '/' . $this->getPageBodyDir() . '/order/cell.profile.tpl', static::COLUMN_NO_WRAP => true, static::COLUMN_MAIN => true, static::COLUMN_SORT => static::SORT_BY_MODE_CUSTOMER, static::COLUMN_ORDERBY => 300, ), 'paymentStatus' => array( static::COLUMN_NAME => static::t('Payment status'), static::COLUMN_CLASS => 'XLite\View\FormField\Inline\Select\OrderStatus\Payment', static::COLUMN_SORT => static::SORT_BY_MODE_PAYMENT_STATUS, static::COLUMN_ORDERBY => 400, ), 'shippingStatus' => array( static::COLUMN_NAME => static::t('Shipping status'), static::COLUMN_CLASS => 'XLite\View\FormField\Inline\Select\OrderStatus\Shipping', static::COLUMN_SORT => static::SORT_BY_MODE_SHIPPING_STATUS, static::COLUMN_ORDERBY => 500, ), 'Delivery type' => array( static::COLUMN_NAME => 'Delivery type', static::COLUMN_TEMPLATE => 'admin/en/modules/Romas/NewOrder/delivery_type.tpl', static::COLUMN_ORDERBY => 550, ), 'total' => array( static::COLUMN_NAME => static::t('Amount'), static::COLUMN_TEMPLATE => $this->getDir() . '/' . $this->getPageBodyDir() . '/order/cell.total.tpl', static::COLUMN_SORT => static::SORT_BY_MODE_TOTAL, static::COLUMN_ORDERBY => 600, ), ); }
As u see I added delivery_type column, it adds a column to order list. But why it does not add a content to column which is located in admin/en/modules/Romas/NewOrder/delivery_type.tpl?
__________________
Version 4.4.4
|
|