View Single Post
  #3  
Old 09-14-2015, 09:17 AM
 
sayanhealth sayanhealth is offline
 

Newbie
  
Join Date: Mar 2013
Posts: 2
 

Default Re: override order list defineColumns method in my module

PHP Code:
<?php
namespace XLite\Module\Romas\NewOrder\View;

/**
 * Search order
 */
class Search extends \XLite\View\ItemsList\Model\Order\Admin\Search
{
    
/**
     * Define columns structure
     *
     * @return array
     */
    
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,
            ),
            
'deliveryType' => array(
                static::
COLUMN_NAME     => 'Delivery type',
                static::
COLUMN_TEMPLATE => '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,
            ),
        );
    }
}
__________________
X-Cart Gold Plus 4.5.4
Reply With Quote