I'm looking for a module for "tariff surcharge" and this module looks good.
I tested it under zc158 and it shows some warning.
[16-Apr-2025 12:05:52 America/New_York] Request URI: /index.php?main_page=checkout_one, IP address: xxxx, Language id 1
#0 /includes/modules/order_total/ot_shippingsurcharge.php(78): zen_debug_error_handler()
#1 /includes/classes/order_total.php(99): ot_shippingsurcharge->process()
#2 /includes/modules/pages/checkout_one/header_php.php(347): order_total->process()
#3 /index.php(35): require('/home4/...')
--> PHP Warning: A non-numeric value encountered in /includes/modules/order_total/ot_shippingsurcharge.php on line 78.
Line 78 is the following.
$shipping_surcharge = ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100));
My fix. Change this line to
$shipping_surcharge = ($order->info['subtotal'] * ((float)MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100));
[16-Apr-2025 12:16:48 America/New_York] Request URI: /index.php?main_page=checkout_one, IP address: xxx, Language id 1
#0 /includes/modules/order_total/ot_shippingsurcharge.php(89): zen_debug_error_handler()
#1 /includes/classes/order_total.php(99): ot_shippingsurcharge->process()
#2 /includes/modules/pages/checkout_one/header_php.php(347): order_total->process()
#3 /index.php(35): require('/home4/...')
--> PHP Warning: Undefined array key "Sales Tax" in /includes/modules/order_total/ot_shippingsurcharge.php on line 89.
Line 89 is the following.
$order->info['tax_groups']["$tax_description"] += zen_calculate_tax($shipping_surcharge, $tax);
Not sure how to fix it. My fix is to comment the this line out. It seems no affect on my checkout page.
Also this surcharge doesn't apply on my sales tax (local sales tax), which seems normal anyway, since it is a surcharge.