Skip to main content

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

More
15 years 9 months ago #2761 by kvwall
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.

More
15 years 9 months ago - 15 years 9 months ago #2762 by nicolas
In the email HTML version, near line 75 you should have the code
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
Code:
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
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
Code:
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: 15 years 9 months ago by nicolas.

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

More
15 years 9 months ago #2763 by kvwall
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.146 seconds
Powered by Kunena Forum