jxdyzwh Posted September 10, 2013 Share Posted September 10, 2013 how to append filed to order list,i am want to append telphone to order list example Link to comment Share on other sites More sharing options...
vekia Posted September 10, 2013 Share Posted September 10, 2013 in this case you have to edit orders controller and define new field in object definition, are you familiar with these things? if not, let me know i will show you step by step how to do that Link to comment Share on other sites More sharing options...
jxdyzwh Posted September 10, 2013 Author Share Posted September 10, 2013 i am sorry,i study ps 20 days ago,please tell me how to do it,thank you very much,you skype daily is not online? Link to comment Share on other sites More sharing options...
vekia Posted September 10, 2013 Share Posted September 10, 2013 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: 1 Link to comment Share on other sites More sharing options...
giorinsrl Posted December 16, 2013 Share Posted December 16, 2013 UAO!It's perfect for me..But i want to insert the GIFT option too, if the customer has choice to receive a gift. How can i do to put in the list order? Link to comment Share on other sites More sharing options...
vekia Posted December 16, 2013 Share Posted December 16, 2013 you mean field to inform that customer selected "gift" option, or not? Link to comment Share on other sites More sharing options...
giorinsrl Posted December 16, 2013 Share Posted December 16, 2013 Oh yes, pardon..It WORK FOR ME! 'gift' => array( 'title' => $this->l('Gift'), 'havingFilter' => true, ), But if i want to put X or V instead of 1 or 0, is it possible?How?Thank you so much Vekia and sorry for my english. Link to comment Share on other sites More sharing options...
giorinsrl Posted December 16, 2013 Share Posted December 16, 2013 (edited) 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 example0 = Text11 = Text2How can i do? Edited December 16, 2013 by giorinsrl (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 16, 2013 Share Posted December 16, 2013 nice one! thank you for posting your solution Link to comment Share on other sites More sharing options...
giorinsrl Posted December 16, 2013 Share Posted December 16, 2013 But how can i write the text instead the icon? Link to comment Share on other sites More sharing options...
Recommended Posts