mcqueeneycoins:
Hi, looking for guidance on what code might need to be modified to change how the payment module fee/discount displays on the order total summary. I know the default ZC format is $-X.XX for negative numbers, but when used with discount coupons (which display as -$X.XX) it is inconsistent. I would like for discounts/subtractions to display as -$X.XX. Can this be modified within this module, or would this be more of a site-wide file change? Thanks in advance.
Sub-Total: $50.00
Payment Method Discount: $-1.40
Gift Certificates, Coupons & Promo Codes (TEST): -$2.43
USPS Ground Advantage® (3-8 days): $5.95
CA State Sales Tax (7.25%): $3.45
Total: $55.57
I managed to figure out how to fix this display by adding the following code around line 151. This may not work for everyone as I am only using the module for cash/check discounts, not surcharges, so my output will always be negative:
$this->output[] = array(
'title' => $this->title . ':',
'text' => '-' . $currencies->format(abs($payment_module_fee), true, $order->info['currency'], $order->info['currency_value']),
'value' => $payment_module_fee
);
However, now I've noticed a new issue (not caused by this change as it was present before any changes)--the sales tax is not being recalculated after the discount is applied. In the example above, the sales tax was calculated based on the sub-total less coupon code discount, but did not factor in the payment method discount. I have tried changing the sort order but does not seem to make a difference. Is it supposed to recalculate sales tax, or is there a setting I'm missing? Thanks.