if(bccomp($data->cart->order_discount_price,0,5) != 0 || bccomp($data->cart->order_shipping_price,0,5) != 0 || bccomp($data->cart->order_payment_price,0,5) != 0 || ($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax) || !empty($data->cart->additional)){
$cartFooters[] = array(
'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);
}
$cartFooters[] = array(
'NAME' => JText::_('HIKASHOP_COUPON'),
'VALUE' => $t
);
}
if(bccomp($data->cart->order_shipping_price,0,5) != 0){
if($config->get('price_with_tax')) {
$t = $currencyHelper->format($data->cart->order_shipping_price,$data->cart->order_currency_id);
}else{
$t = $currencyHelper->format($data->cart->order_shipping_price-@$data->cart->order_shipping_tax,$data->cart->order_currency_id);
}
$cartFooters[] = array(
'NAME' => JText::_('HIKASHOP_SHIPPING'),
'VALUE' => $t
);
}
if(bccomp($data->cart->order_payment_price,0,5) != 0){
if($config->get('price_with_tax')) {
$t = $currencyHelper->format($data->cart->order_payment_price, $data->cart->order_currency_id);
} else {
$t = $currencyHelper->format($data->cart->order_payment_price - @$data->cart->order_payment_tax, $data->cart->order_currency_id);
}
$cartFooters[] = array(
'NAME' => JText::_('HIKASHOP_PAYMENT'),
'VALUE' => $t
);
}
if(!empty($data->cart->additional)) {
$exclude_additionnal = explode(',', $config->get('order_additional_hide', ''));
foreach($data->cart->additional as $additional) {
if(in_array($additional->order_product_name, $exclude_additionnal))
continue;
if(!empty($additional->order_product_price))
$additional->order_product_price = (float)hikashop_toFloat($additional->order_product_price);
if(!empty($additional->order_product_price) || empty($additional->order_product_options)) {
if($config->get('price_with_tax')){
$t = $currencyHelper->format($additional->order_product_price + @$additional->order_product_tax, $data->cart->order_currency_id);
}else{
$t = $currencyHelper->format($additional->order_product_price, $data->cart->order_currency_id);
}
} else {
$t = $additional->order_product_options;
}
$cartFooters[] = array(
'NAME' => JText::_($additional->order_product_name),
'VALUE' => $t
);
}
}
if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax) {
if($config->get('detailed_tax_display') && !empty($data->cart->order_tax_info)) {
foreach($data->cart->order_tax_info as $tax) {
$cartFooters[] = array(
'NAME' => $tax->tax_namekey,
'VALUE' => $currencyHelper->format($tax->tax_amount,$data->cart->order_currency_id)
);
}
} else {
$cartFooters[] = array(
'NAME' => JText::_('ORDER_TOTAL_WITHOUT_VAT'),
'VALUE' => $currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->cart->order_currency_id)
);
}
$cartFooters[] = array(
'NAME' => JText::_('ORDER_TOTAL_WITH_VAT'),
'VALUE' => $currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->cart->order_currency_id)
);
} else {
$cartFooters[] = array(
'NAME' => JText::_('HIKASHOP_TOTAL'),
'VALUE' => $currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->cart->order_currency_id)
);
}