JirkaDeLucina Posted December 10, 2019 Share Posted December 10, 2019 (edited) I would like add new column "Shipping cost" to order list in backoffice of Prestashop 1.7. I read a lot of tutorials about adding new column, but nowhere is advice about shipping cost. Another solution should be, if the shipping cost will be shown directly in field with order total price? Eg.: 150 USD (2 USD) - where 2 USD are shipping cost. Any help would be appreciated. I use PS version 1.7.4. Edited December 11, 2019 by JirkaDeLucina (see edit history) Link to comment Share on other sites More sharing options...
Acxel Posted June 19, 2020 Share Posted June 19, 2020 (edited) Hello, I found the solution in https://stackoverflow.com/questions/59275761/how-add-column-shipping-cost-to-order-list-in-prestashop-1-7 : in file: controllers/admin/AdminOrdersControler.php add under (line about 110): $this->fields_list = array_merge($this->fields_list, array( add this code: 'total_shipping' => array( 'title' => $this->l('Shipping'), 'filter_key' => 'a!total_shipping', 'type' => 'price', 'currency' => true, 'callback' => 'setOrderCurrency' ), and add above line 200: public static function setOrderCurrency($echo, $tr) add this code: public function displayTotal_shipping($value) { return Tools::ps_round($value, 0); } Be cereful folks, this will work on 1.7 (and maybe 1.6) up to 1.7.6.5 but 1.7.7 may be different because i think they put the order management in symfony. But for real i want to display the price tax excluded minus shipping price and i'm stuck... Edited June 19, 2020 by aduploye (see edit history) 1 Link to comment Share on other sites More sharing options...
Jose Lorenzini Posted August 4, 2020 Share Posted August 4, 2020 Hello Acxel can u help me? i wanna do the same but with STATES or id_state , could u give me some advice? thanks 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