Jump to content

Why does {total_shipping} include taxes in order confirmation email?


Ravenous

Recommended Posts

Hi,

I was wondering why the {total_shipping} variable is set to the order's shipping tax-inclusive value in the order confirmation email.

Based on https://github.com/PrestaShop/PrestaShop/blob/develop/classes/PaymentModule.php

Line 335

$order->total_shipping = $order->total_shipping_tax_incl;

 

Line 810

{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false)

 

This has a confusing result, see attached image.

The end result is indeed correct, which is 29.74. However, if you sum those, you get 32.04, that's because the tax is there twice, once under Shipping, and then again under Total tax paid.

The expected behaviour (in my opinion) is to have shipping set to its base value, which in this case would be 10.

 

What am I missing?

7ztOlcGZR4ixnEr0VcrUkg.png

 

PS: To clarify and avoid answers such as total means tax-inclusive in any system, {total_shipping} is just the placeholder's name. An end user/admin sees a simple Shipping label. If Products does not display the price with taxes, why would Shipping?

Edited by Ravenous (see edit history)
Link to comment
Share on other sites

  • 2 years later...
On 6/18/2018 at 1:28 PM, Ravenous said:

I was wondering why the {total_shipping} variable is set to the order's shipping tax-inclusive value in the order confirmation email.

I have the same problem. Did you ever manage to fix this?

Link to comment
Share on other sites

  • 8 months later...
  • 2 weeks later...
  • 7 months later...

I have the same problem. I edited the template in International > Translations > Emails > order_conf and changed the {total_shipping} for {total_shipping_tax_excl}. And also, I updated the PaymentModule.php and I added these lines 

Can you help me? Where is the problem? Thank you so much! 

SOLVED; thank you!

Edited by hohner (see edit history)
Link to comment
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
×
×
  • Create New...