- Posts: 22
- Thank you received: 0
subtotal on email notifications without tax
4 years 6 months ago #341828
by CindyDP
subtotal on email notifications without tax was created by CindyDP
-- HikaShop version -- : 4.5.1
-- Joomla version -- : 4.1.3.
-- PHP version -- : 8.0
-- Browser(s) name and version -- : Google Chrome
I'd like to see the subtotal price on the confirmation emails without vat.
I have been searching in the templates of the emails system>emails and found in the order notification for example these lines:
'CLASS' => 'subtotal',
'NAME' => JText::_('SUBTOTAL'),
'VALUE' => $currencyHelper->format($subtotal,$data->cart->order_currency_id)
);
}
if(bccomp($data->cart->order_discount_price,0,5) != 0) {
if($config->get('price_with_tax')) {
$t = $currencyHelper->format($data->cart->order_discount_price * -1, $data->cart->order_currency_id);
}else{
$t = $currencyHelper->format(($data->cart->order_discount_price - @$data->cart->order_discount_tax) * -1, $data->cart->order_currency_id);
}
But no matter what I try, the subtotal remains with vat. Can you please help me?
-- Joomla version -- : 4.1.3.
-- PHP version -- : 8.0
-- Browser(s) name and version -- : Google Chrome
I'd like to see the subtotal price on the confirmation emails without vat.
I have been searching in the templates of the emails system>emails and found in the order notification for example these lines:
'CLASS' => 'subtotal',
'NAME' => JText::_('SUBTOTAL'),
'VALUE' => $currencyHelper->format($subtotal,$data->cart->order_currency_id)
);
}
if(bccomp($data->cart->order_discount_price,0,5) != 0) {
if($config->get('price_with_tax')) {
$t = $currencyHelper->format($data->cart->order_discount_price * -1, $data->cart->order_currency_id);
}else{
$t = $currencyHelper->format(($data->cart->order_discount_price - @$data->cart->order_discount_tax) * -1, $data->cart->order_currency_id);
}
But no matter what I try, the subtotal remains with vat. Can you please help me?
Please Log in or Create an account to join the conversation.
4 years 6 months ago #341834
by nicolas
Replied by nicolas on topic subtotal on email notifications without tax
Hi,
It's not that code you want to change.
You want to change the line:
$subtotal += $item->order_product_total_price;
to:
$subtotal += $item->order_product_total_price_no_vat;
It's not that code you want to change.
You want to change the line:
$subtotal += $item->order_product_total_price;
to:
$subtotal += $item->order_product_total_price_no_vat;
The following user(s) said Thank You: CindyDP
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds