Jump to content

BO 1.7.6.5 Orders view - Add column price tax excluded without shipping price


Acxel
 Share

Recommended Posts

In the backoffice of Prestashop 1.7.6.5, I would like add a new column "Net price" to order list, for me "Net price" means: Price tax excluded without shipping cost.

I think it means to add a formula at some point, I found how to display shipping price but i don't know how to modify it to display the net price :

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); }

Source: https://stackoverflow.com/questions/59275761/how-add-column-shipping-cost-to-order-list-in-prestashop-1-7

Thanks in advance if you can help me!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More