Forums / All Other Contributions/Addons / Payment Module Fee - Order Total Module [Support]

Payment Module Fee - Order Total Module [Support]

Views: 3,938

Results 21 to 24 of 24
26 Jul 2026, 10:12 PM
#21
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Payment Module Fee - Order Total Module [Support]

OldNGrey:

Firstly:
What versions of; Zen cart; PHP and ot_PaymentModuleFee are you running?
What value have you configured in ot_PaymentModuleFee for the discount?

In my old zc158a on PHP8.3 with a modified clone of Bootstrap template, ot_PaymentModuleFee v2.0.4 non plugin install, the discount shows with a - sign.
The same in zc222 with PHP 8.5 with a clone of Bootstrap template, ot_PaymentModuleFee v2.0.4 plugin install.

I'm running 1.5.8a, PHP 8.0.30, module 2.0.4. The issue is not whether the - appears, it was how it was displayed--before or after the $ sign. With the discount coupon, it appears before the $. With the payment module, it appears after. So when a customer is checking out, they are presented with 2 different displays for discounts. Was trying to find a way for them to display consistent, which I managed to do with the code modification I shared above; however, I know that is not a permanent fix, especially for anyone using the module for surcharges.

28 Jul 2026, 7:19 AM
#22
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: Payment Module Fee - Order Total Module [Support]

This change is an improvement that works in all cases:
'text' => ($payment_module_fee < 0 ? '‑' : '') . $currencies->format(abs($payment_module_fee), true, $order->info['currency'], $order->info['currency_value']),

The hyphen needs to be replaced by a non-break-hyphen. The character code for the non break hyphen is '&#8209 ;' , Replace the '-' with the character code and remove the space before the semi-colon (;). The forum software does not allow posting the actual code here.

I'll include this change in the next version of ot_paymentmodulefee

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

2 Aug 2026, 2:11 PM
#23
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Payment Module Fee - Order Total Module [Support]

OldNGrey:

This change is an improvement that works in all cases:
'text' => ($payment_module_fee < 0 ? '‑' : '') . $currencies->format(abs($payment_module_fee), true, $order->info['currency'], $order->info['currency_value']),

The hyphen needs to be replaced by a non-break-hyphen. The character code for the non break hyphen is '‑ ;' , Replace the '-' with the character code and remove the space before the semi-colon (;). The forum software does not allow posting the actual code here.

I'll include this change in the next version of ot_paymentmodulefee

Thanks again for the help! Another thought, if possible--can/should sales tax be recalculated after the discount is applied? I'm sure every state's rules are different, so making an option to recalculate sales tax after discount/surcharge is applied might be helpful.

18 Aug 2026, 2:01 AM
#24
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: Payment Module Fee - Order Total Module [Support]

Thanks again for the help! Another thought, if possible--can/should sales tax be recalculated after the discount is applied? I'm sure every state's rules are different, so making an option to recalculate sales tax after discount/surcharge is applied might be helpful.

Please try version 2.0.5 from my Github [https://github.com/OldNGreyBMR/paymentmodulefee/releases/tag/v2.0.5] .
Install it in a test environment .

The module follows the original concept and discounts or adds surcharge on the total price.

If tax is selected, the tax is applied to the discount; eg if you want a discount of -3% including tax (where tax is 10%) the discount entered should be -3% /1.1 = -2.73. [ Total Price / (1 + Tax Rate) = Base Price ex Tax].
This will apply a tax of 10% to the discount making the discount shown as -3% inc.
The final tax amount on the order includes the tax on the discount or surcharge.
The final total includes the discount or surcharge.

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB