How can I show the Tax (VAT) amount on emails?

  • Posts: 2
  • Thank you received: 0
13 years 11 months ago #2761

On my "Order creation notification", I want to change TOTAL_WITHOUT_VAT to display the Tax amount. What code do I need to accomplish this?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2762

In the email HTML version, near line 75 you should have the code

echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
that you can replace by
echo '<tr><td colspan="4" style="text-align:right">Tax amount : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax - $data->cart->full_total->prices[0]->price_value,$data->order_currency_id).'</td></tr>';

In the email text version, near line 30, you should have the code
echo JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id))."\n";
that you can replace by
echo 'Tax amount : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax - $data->cart->full_total->prices[0]->price_value,$data->order_currency_id)."\n";

Last edit: 13 years 11 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
13 years 11 months ago #2763

Thank you so much. It works!
I should have joined the forums a long time ago.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum