Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    47
    Plugin Contributions
    0

    Default UPSXML error: Cannot use string offset as an array

    Hi all,

    I configured and installed the UPS XML mod for a client into ZenCart 1.3.8a.

    They do have a UPS account and so I got the credentials configured into the Admin area of UPS XML.

    Now, even though I have disabled UPS and enabled UPS XML, the shipping estimator doesn't load up on the shopping cart page. My estimator is configured as a list display rather than a popup.

    I did enable the logging facility in upsxml.php and the error I get is

    Code:
    [15-Sep-2008 02:26:05] PHP Fatal error:  Cannot use string offset as an array in <webserver path>/includes/modules/shipping/upsxml.php on line 262
    The line 262 is in bold in the following code from upsxml.php
    Code:
    if (isset($this->servicesTimeintransit[$type])) {
                        $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
                        $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
                        $eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
                        $_type .= ", ETA: ".$eta_arrival_date;
                    }
    Can someone please guide me how to solve this problem because my client would like to enable shipping worldwide and hence can't use the ZC UPS.

    thanks
    callingrohit

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: UPSXML error: Cannot use string offset as an array

    Several discussions in the "Similar Threads" section at the bottom of this page may be of assistance.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: UPSXML error: Cannot use string offset as an array

    Hi Dr. Byte,

    Thanks for your reply. Yes I have seen them but my issue is not due to SSL or undefined zones.

    Hence I posted it. The ZC UPS works fine....is there any major difference between UPS and UPS XML.

    I mean if not then I might as well drop UPS XML rather than knocking my head off to solve the error.

    Thanks

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: UPSXML error: Cannot use string offset as an array

    What are the addresses you're trying to ship to and from?
    Why did you choose to use the UPSXML mod in the first place? Its benefits are explained on its wiki page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: UPSXML error: Cannot use string offset as an array

    As far as addresses are concerned - they are just dummy addresses from US to Australia/US/UK. All 3 countries are defined in a single zone and then configured under UPS XML's shipping zone option.

    why did I choose UPS XML, that was because it supported the delivery area surcharge but now I'm thinking if this even that important and its effect. Maybe I should read more about it in detail from UPS website. I'm doing this basically for a client based in US.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: UPSXML error: Cannot use string offset as an array

    I was referring to the UPSXML addon mod's wiki page (not the UPS website): http://www.zen-cart.com/wiki/index.p...ules_-_UPS_XML

    If you're using dummy addresses which aren't "real enough" to validate between zip and city and state, then you're going to get some odd results, regardless which module you're using.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Error in referrals.php - Cannot use object of type queryFactoryResult as array
    By Agouti in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 3 Jan 2009, 08:25 PM
  2. Cannot use string offset as an array - error in UPSXML module
    By tat2nu in forum Addon Shipping Modules
    Replies: 5
    Last Post: 14 Aug 2008, 08:35 PM
  3. Replies: 4
    Last Post: 21 Mar 2008, 06:41 PM
  4. Fatal error: Cannot use string offset as an array in upsxml.php
    By yaby in forum Addon Shipping Modules
    Replies: 4
    Last Post: 19 Oct 2007, 06:40 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