seog Posted April 29, 2017 Share Posted April 29, 2017 Hello I tried many solutions that worked in previous PS versions as 1.5 etc but in last PS 1.6.13 I can not make it work without affecting others variables. I am trying shown Product reference and product quantity in Order List from Backoffice, for it the only two solutions that it worked are: AdminOrdersController.php Solution 1: $this->_select = ' (SELECT GROUP_CONCAT(so.product_quantity SEPARATOR "\ ") FROM `'._DB_PREFIX_.'order_detail` so WHERE so.id_order = a.id_order) as quant, (SELECT GROUP_CONCAT(so.product_reference SEPARATOR "\ ") FROM `'._DB_PREFIX_.'order_detail` so WHERE so.id_order = a.id_order) as products, $this->fields_list = array( 'products' => array( 'title' => $this->l('Supplier Reference'), 'align' => 'left', 'width' => 85 ), 'quant' => array( 'title' => $this->l('Quantity purchased'), 'align' => 'left', 'width' => 15 ), Solution 2: $this->_select = ' od.product_reference AS products, od.product_quantity AS quant, $this->_join = ' LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order` = a.`id_order`) $this->fields_list = array( 'products' => array( 'title' => $this->l('Supplier Reference'), 'align' => 'left', 'width' => 50 ), 'quant' => array( 'title' => $this->l('Quantity purchased'), 'align' => 'left', 'width' => 50 ), Both codes are working but... What are the issues?? 1. If I add code od.product_reference AS products then does not show the Order Reference (Is as that PS core confuse product reference with order reference showing in ord_ref "--") 2. If I add code od.product_quantity AS quant then does not show the Total Order ammount (Is as that PS core confuse product quantity with total order ammount showing I think the code a.`id_order is causing this problem Any suggestions please? Link to comment Share on other sites More sharing options...
seog Posted April 29, 2017 Author Share Posted April 29, 2017 About Order Reference I solved issue adding before than a.id_currency, the code a.`reference`, About Order total ammount yet I cant solve it, I tried the next codes: a.`total_paid_tax_incl`, a.`total_order`, a.`total_ammount`, .... 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