Results 1 to 10 of 23

Hybrid View

  1. #1
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: Shipping Surcharge [Support Thread]

    Another issue, but it is not critical to me.

    Under the order-total, there is an option under this surcharge plug-in: Charge a Shipping Surcharge. By default, it is set to true. I checked my checkout page, and the surcharge only applied to the sub-total number. Shipping is not included. But anyway, I don't plan to apply surcharge on the shipping.

    If I set this option to false, surcharge option is missing under the OPC checkout page. If I select different shipping options, the following warning is generated.

    PHP Code:
    [19-Apr-2025 11:30:15 America/New_YorkPHP Fatal errorUncaught TypeErrorcount(): Argument #1 ($value) must be of type Countable|array, null given in /includes/classes/order_total.php:143
    Stack trace:
    #0 /includes/classes/ajax/zcAjaxOnePageCheckout.php(428): order_total->output()
    #1 /includes/classes/ajax/zcAjaxOnePageCheckout.php(92): zcAjaxOnePageCheckout->createOrderTotalHtml()
    #2 /ajax.php(92): zcAjaxOnePageCheckout->updateShippingSelection()
    #3 {main}
    thrown in /includes/classes/order_total.php on line 143

    [19-Apr-2025 11:30:15 America/New_YorkRequest URI: /ajax.php?act=ajaxOnePageCheckout&method=updateShippingSelectionIP addressxxxx
    --> PHP Fatal errorUncaught TypeErrorcount(): Argument #1 ($value) must be of type Countable|array, null given in /includes/classes/order_total.php:143
    Stack trace:
    #0 /includes/classes/ajax/zcAjaxOnePageCheckout.php(428): order_total->output()
    #1 /includes/classes/ajax/zcAjaxOnePageCheckout.php(92): zcAjaxOnePageCheckout->createOrderTotalHtml()
    #2 /ajax.php(92): zcAjaxOnePageCheckout->updateShippingSelection()
    #3 {main}
    thrown in /includes/classes/order_total.php on line 143. 
    Line 143 in order_total.php is the following in my code:

    PHP Code:
     $size count($GLOBALS[$class]->output); 

  2. #2
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    333
    Plugin Contributions
    7

    Default Re: Shipping Surcharge [Support Thread]

    The option you set to false is the one that activates the shipping surcharge... Which is why it does not appear anymore in checkout page. I know some other modules have an option to include shipping fee in calcuation at this place, but this one does not. There are few weird things in this module, if I have time, I might rewrite it.

    Your log is an OPC problem, I have seen the same here, but there was no answer due to a lack of information from poster.

  3. #3
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    333
    Plugin Contributions
    7

    Default Re: Shipping Surcharge [Support Thread]

    I submitted an updated version in plugins section here. It should be available in few days.

    The OPC log above might be link to the fact the module was always activated even when calculation is de-activated by the option 'Charge a Shipping Surcharge'.

  4. #4
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: Shipping Surcharge [Support Thread]

    Thanks for your help and contribution! I will try the new plug-in when it is available and let you know.

    This plug-in will benefit many sellers under the current tariff condition...

  5. #5
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    333
    Plugin Contributions
    7

    Default Re: Shipping Surcharge [Support Thread]

    It is available now!

  6. #6
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    333
    Plugin Contributions
    7

    Default Re: Shipping Surcharge [Support Thread]

    Quote Originally Posted by pilou2 View Post
    It is available now!
    Forgot the link:
    https://www.zen-cart.com/downloads.php?do=file&id=2308

  7. #7
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: Shipping Surcharge [Support Thread]

    Quote Originally Posted by pilou2 View Post
    Hi @pilou2, I just tried v2.0.0 and it worked great on my end. No warnings.

    One small issue, but it doesn't bother me: "Tax Class" options still doesn't work. There is no change on the surcharge value, no matter Taxable Goods is selected or not. But anyway, I don't plan to surcharge the sales tax. I used the local sales tax module here.

  8. #8
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    279
    Plugin Contributions
    4

    Default Re: Shipping Surcharge [Support Thread]

    Quote Originally Posted by njcyx View Post
    Another issue, but it is not critical to me.

    Under the order-total, there is an option under this surcharge plug-in: Charge a Shipping Surcharge. By default, it is set to true. I checked my checkout page, and the surcharge only applied to the sub-total number. Shipping is not included. But anyway, I don't plan to apply surcharge on the shipping.
    In actual fact I want to surcharge the shipping only - this would be useful - as in the case right now - where fuel costs are going up and you either do your own local deliveries or your courier is passing on a fuel charge so you want to pass this onto your customer.

    To do this change line 114 from -

    PHP Code:
    $shipping_surcharge = ($order->info['subtotal'] * ((float)MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100)); 
    to

    PHP Code:
    $shipping_surcharge = ($order->info['shipping_cost'] * ((float)MODULE_ORDER_TOTAL_SHIPPINGSURCHARGE_AMOUNT/100)); 

 

 

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