Jump to content

how to append filed to order list


Recommended Posts

i can provide help but only on public - other merchants will be happy here ;)

 

open file: controllers/ADminOrderController.php, in __construct use this code for _select and _join 

$this->_select = '
        CONCAT(addr.phone, addr.phone_mobile) AS `phone`,
		a.id_currency,
		a.id_order AS id_pdf,
		CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
		osl.`name` AS `osname`,
		os.`color`,
		IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new';

		$this->_join = '
		LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
        LEFT JOIN `'._DB_PREFIX_.'address` addr ON (a.`id_address_delivery` = addr.`id_address`)
		LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
		LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$this->context->language->id.')';
		$this->_orderBy = 'id_order';
		$this->_orderWay = 'DESC';

then in object definition use this field definition:

'phone' => array(
			'title' => $this->l('Phone'),
			'havingFilter' => true,
		),

effect:

M0jteh1.png

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

ok, i'm done!
 

'icon' => array(
                    0 => 'blank.gif',
                    1 => array(
                        'src' => 'note.png',
                        'alt' => $this->l('First customer order'),
                    )
                ),

i add this, now i'll edit the icon and correct alt 'First customer order'
But if i want put text instead icon?

For example
0 = Text1
1 = Text2

How can i do?

Edited by giorinsrl (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...