Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2015
    Location
    California
    Posts
    54
    Plugin Contributions
    0

    Default Any weight based rate not working, number of boxes always = 0

    ZC 1.5.5e, php 5.6

    I just noticed two shipping options, zones and perweightunit, both are not functioning correctly on my site. These are both relatively rarely used methods for us, used for calculating special shipping rates to Canada and Hawaii, respectively.

    It seems to me the root cause of this is an error with the number of shipping boxes being calculated, which always returns "0" as number of boxes, no matter what value is in place as the maximum package weight. So with "0" as the number of packages, any weight based shipping calculation returns $0.00+handling fee. Ex:

    Code:
    ...(Weight Based Rate to CA (0 x 3.53lb(s)))           $0.00
    Actual shipping table for zone 1 is "5:12.95,10:43.95,40:86.95,100:178.95"
    The zone table settings work fine if I change the calculation method to either "price" or "item."

    This error apparently started in the past week or two without me noticing--I have record of an order from about two weeks ago successfully using zone rates shipping. But I don't have record of changing any of php files on the site between that successful order and now.


    I have tried to trace this back to "$shipping_num_boxes" or "$zc_boxes," even tried hardcoding "$zc_boxes = 1;" and the problem persists.

    There are no error logs. FedEx, Flat Rate, and Free Shipping Options modules are all still working normally.

    I thought it might be a database error, but the problem also exists on my dev site which has its own database.

    Any help or pointing in the right direction would be greatly appreciated! What combination of settings could I have screwed up to make this happen? I can't figure out what is going on.

  2. #2
    Join Date
    Jun 2015
    Location
    California
    Posts
    54
    Plugin Contributions
    0

    Default Re: Any weight based rate not working, number of boxes always = 0

    For the record in case anyone stumbles across this in the future.

    I ended up fixing the problem by reverting to a backup state of most of the shipping module files. So as usual keeping good backups is the right answer.

    I narrowed the problem down to the fedexwebservices.php file. Even when the fedex shipping service was not available on a particular order this module was affecting the variable "$shipping_num_boxes" and making it always equal "0"

    Even after reverting the file and correcting the problem I couldn't follow the logic as to what part of this file was causing "$shipping_num_boxes" to be "0"

    It was probably caused by some version conflict between the fedex module and one of the other modules or zen cart itself.

 

 

Similar Threads

  1. Table rate based on weight
    By RiverCity in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 19 Jan 2014, 09:05 PM
  2. Replies: 6
    Last Post: 4 Jan 2013, 01:59 PM
  3. flat rate shipping based on weight?
    By cpoet in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 5 Aug 2010, 07:34 AM
  4. USPS priority rate options based on size not weight
    By ysteban in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Jun 2010, 02:44 AM
  5. Minimum shipping rate based on weight.
    By ncd in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 29 Jun 2007, 01:45 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR