getDiscountTotal($withTaxes); if($type==Cart::ONLY_DISCOUNTS) $total = $total+$totalDiscount; else $total= $total - $totalDiscount; } if(Module::isEnabled('ets_payment_with_fee')) { if($only_cart || $type!=Cart::BOTH) return $total; if($type== Cart::BOTH) { $custom_payment = Module::getInstanceByName('ets_payment_with_fee'); $fee = $custom_payment->getFeePayOrderTotal($products,$withTaxes); } else $fee = 0; if($fee_payment) return $fee; return $fee + $total; } return $total; } }