Jump to content

[Solved] - How to show tax in Order Confirmation Email 1.5


Recommended Posts

Hi Guys n Girls,

 

I have been beating my head into the wall trying to figure out how to show tax in the order confirm email.

 

Tax shows in cart, checkout and in the PDF invoice but not in the order confirmation email.

 

I would like it to show something like:

 

Total Ex Tax $10.00

 

Tax GST $1.00

 

Total Inc Tax $11.00

 

I have found solutions in the forum for previous versions but not for 1.5+

 

I am using 1.5 and i am sure it is a simple solution but i just cant figure it out any help would be greatly appreciated,

 

Thanks in Advance

 

----------------------------------------------------------------------------------------------------------------

Thanks guys but i solved this myself if anyone else wants a solution ask here and i will post it up

----------------------------------------------------------------------------------------------------------------

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

  • 1 month later...

Hi guys,

 

I have the same problem: I can't see the total tax in the confirmation email. I see the total tax perfectly displayed in the PDF invoice but not in the emails.

I would really like to see the total tax also in the emails.

 

I also tried to programatically solve the problem with some information I found in other topics, but it didn't work, but it is not that straightforward in Prestashop 1.5.3.1 and I am not an expert in programming.

Can you please provide me with the solution you found? Thanks in advance!

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 10 months later...
  • 2 months later...

Hello people,

 

This issue has been addressed by the Prestashop developers and from version 1.5.6.1 this is included by default.

 

For versions prior to 1.5.6 (I've tested in 1.5.4) this is how to achieve this:

 

In /classes/PaymentModule.php add the following to the $data = array(...) on row 558 inside validateOrder(..):

'{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false)

Now you can use {total_tax_paid} in order_conf.html to show tax. Like this:

<tr style="text-align: right;">
<td colspan="4">Total tax:</td>
<td>{total_tax_paid}</td>
</tr>

This information and more is available in the bugfix commit in the Prestashop repository.

 

Good luck!

Link to comment
Share on other sites

  • 1 month later...

Hello people,

 

This issue has been addressed by the Prestashop developers and from version 1.5.6.1 this is included by default.

 

For versions prior to 1.5.6 (I've tested in 1.5.4) this is how to achieve this:

 

In /classes/PaymentModule.php add the following to the $data = array(...) on row 558 inside validateOrder(..):

'{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false)

Now you can use {total_tax_paid} in order_conf.html to show tax. Like this:

<tr style="text-align: right;">
<td colspan="4">Total tax:</td>
<td>{total_tax_paid}</td>
</tr>

This information and more is available in the bugfix commit in the Prestashop repository.

 

Good luck!

Thanks for this. Unfortunately I just cannot get this to work. Using 1.5.3.1. Any pointers would be super helpful, thanks.

Link to comment
Share on other sites

  • 3 weeks later...

@patrikar - Hi and thank you for your solution. It works well in 1.5.4, however there is problem when customer have discount, because this code dosen't count right tax value after discount. Could you please help improve it?

Thanks in advance ...

Link to comment
Share on other sites

Thanks for this. Unfortunately I just cannot get this to work. Using 1.5.3.1. Any pointers would be super helpful, thanks.

 

Sorry I can't be at help. I would have to see your code and so on. I can simply suggest you take closer look at the bugfix commit i linked to.

 

@patrikar - Hi and thank you for your solution. It works well in 1.5.4, however there is problem when customer have discount, because this code dosen't count right tax value after discount. Could you please help improve it?

Thanks in advance ...

 

You are correct. I am affected by this as well, good thing we haven't launched our shop yet!

 

Based on what I can tell from looking inside the database table ps_orders, I think this is the code we really want:

'{total_tax_paid}' => Tools::displayPrice(($order->total_paid_tax_incl - $order->total_paid_tax_excl) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false)
Edited by patrikar (see edit history)
Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...
  • 1 year later...
  • 1 year later...

Hi,

 

 

@patrikar - Hi and thank you for your solution. It works well in 1.5.4, however there is problem when customer have discount, because this code dosen't count right tax value after discount. Could you please help improve it?

Thanks in advance ...

Same thing here, I am using PS1.7, i solve using this method below: 

 

paste this code in payment module:

 

'{total_tax_paid}' => Tools::displayPrice(($order->total_paid_tax_excl*0.07),$currency,false));

 

0.07 is the tax rate. 

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...