zeshan Posted November 4, 2013 Share Posted November 4, 2013 How to show product code on Order Management Page admin in Prestashop I am lost in files. Please help me Thanks in Advance Link to comment Share on other sites More sharing options...
NemoPS Posted November 4, 2013 Share Posted November 4, 2013 WHat do you mean by product code? Product reference? It might be tricky as many products can be in a single order! Link to comment Share on other sites More sharing options...
zeshan Posted November 4, 2013 Author Share Posted November 4, 2013 I want to add one more column here where I want to show Order Product Number will Link to comment Share on other sites More sharing options...
NemoPS Posted November 4, 2013 Share Posted November 4, 2013 ....You mean the number of ordered products ? Link to comment Share on other sites More sharing options...
zeshan Posted November 4, 2013 Author Share Posted November 4, 2013 Prodcut name shown in this column Link to comment Share on other sites More sharing options...
zeshan Posted November 4, 2013 Author Share Posted November 4, 2013 Thanks for the Help This problem is now solved. Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 can you say something more about your solution please? Link to comment Share on other sites More sharing options...
zeshan Posted November 4, 2013 Author Share Posted November 4, 2013 I chage the query on AdminOrdersController.phpFull Link is >>> myshop/controllers/admin/AdminOrdersController.php$this->_select = ' od.product_name AS products_zee, /* This is the main thing which I changed */ 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_.'order_detail` od ON (od.`id_order` = a.`id_order`) 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'; After that I add array after this code 'reference' => array( 'title' => $this->l('Reference'), 'align' => 'center', 'width' => 65 ), /* This is my Product Name */ 'products_zee' => array( 'title' => $this->l('Products'), 'align' => 'center', 'width' => 85 ), Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 thank you so much for your solution i marked this thread as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
ukwyspa Posted November 10, 2014 Share Posted November 10, 2014 (edited) Hi, I made change like @zeshan But i have error: Bad SQL queryUnknown column 'country.id_country' in 'field list' Solution? (prestashop 1.6.0.9) Edited November 10, 2014 by ukwyspa (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now