Results 1 to 10 of 23

Threaded View

  1. #10
    Join Date
    Apr 2019
    Posts
    350
    Plugin Contributions
    0

    Default Re: Shipping Surcharge [Support Thread]

    I'm looking for a module for "tariff surcharge" and this module looks good.

    I tested it under zc158 and it shows some warning.

    1.
    PHP Code:
    [16-Apr-2025 12:05:52 America/New_YorkRequest URI: /index.php?main_page=checkout_oneIP addressxxxxLanguage 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 WarningA non-numeric value encountered in /includes/modules/order_total/ot_shippingsurcharge.php on line 78. 
    Line 78 is the following.

    PHP Code:
    $shipping_surcharge = ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100)); 
    My fix. Change this line to

    PHP Code:
    $shipping_surcharge = ($order->info['subtotal'] * ((float)MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100)); 
    2.
    PHP Code:
    [16-Apr-2025 12:16:48 America/New_YorkRequest URI: /index.php?main_page=checkout_oneIP addressxxxLanguage 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 WarningUndefined array key "Sales Tax" in /includes/modules/order_total/ot_shippingsurcharge.php on line 89. 
    Line 89 is the following.
    PHP Code:
    $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.
    Last edited by njcyx; 16 Apr 2025 at 05:35 PM.

 

 

Similar Threads

  1. v157 USPS Shipping Module [Support Thread]
    By lat9 in forum Addon Shipping Modules
    Replies: 446
    Last Post: 27 Mar 2026, 01:52 PM
  2. Shipping Rates in Cart [support thread]
    By Steven300 in forum Addon Shipping Modules
    Replies: 95
    Last Post: 12 May 2023, 02:39 AM
  3. Add Shipping Telephone Support Thread
    By JTheed in forum Addon Admin Tools
    Replies: 31
    Last Post: 4 Sep 2018, 11:14 AM
  4. Free Shipping Rules addon [Support Thread]
    By numinix in forum Addon Shipping Modules
    Replies: 36
    Last Post: 2 Dec 2016, 01:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg