Perfectly as always - much appreciated - and I will find you
You will have to check me but I think this works as expected
Code: Select all
class ModelExtensionTotalTotal extends Model {
public function getTotal($total) {
$this->load->language('extension/total/total');
if (($this->config->get('total_sub_total_status')) == '0') {
$sub_total = $this->cart->getSubTotal();
if (!empty($this->session->data['vouchers'])) {
foreach ($this->session->data['vouchers'] as $voucher) {
$sub_total += $voucher['amount'];
}
}
$total['total'] += $sub_total;
}
$total['totals'][] = array(
'code' => 'total',
'title' => $this->language->get('text_total'),
'value' => max(0, $total['total']),
'sort_order' => $this->config->get('total_total_sort_order')
);
}
}