Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default upgrade to 1.5.8 fedex webservice depreciated

    I am upgrading from 1.57 to 1.58 and using fedex web services module
    https://www.numinix.com/zen-cart-plu...vices-shipping


    This is the error I am getting if someone can assist me with


    error:
    [14-Nov-2022 22:41:55 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=shopping_cart, IP address: 127.0.0.1
    #0 C:\xampp\htdocs\xxx.com\includes\classes\shipping.php(90): zen_debug_error_handler()
    #1 C:\xampp\htdocs\xxx.com\includes\classes\shipping.php(90): include_once()
    #2 C:\xampp\htdocs\xxx.com\includes\modules\shipping_estimator.php(148): shipping->__construct()
    #3 C:\xampp\htdocs\xxx.com\includes\templates\theme871\templates\tpl_shopping_cart_ default.php(312): require('C:\\xampp\\htdocs...')
    #4 C:\xampp\htdocs\xxx.com\includes\templates\theme871\common\tpl_main_page.php(407 ): require('C:\\xampp\\htdocs...')
    #5 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\\xampp\\htdocs...')
    --> PHP Deprecated: Optional parameter $method declared before required parameter $client is implicitly treated as a required parameter in C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php on line 623.


    Code on line 623
    Code:
    function do_request($method = '', $request, $client) {
      global $db, $shipping_weight, $shipping_num_boxes, $cart, $order, $all_products_ship_free;
        try {
          $response = $client->getRates($request);

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    the easiest solution is as follows:

    PHP Code:
    //from
    function do_request($method ''$request$client) {

    //to
    function do_request($method ''$request ''$client '') { 
    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #3
    Join Date
    Apr 2019
    Posts
    244
    Plugin Contributions
    0

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    Hi @chadlly2003, if you are using php 8.0, you can probably try my code below:

    https://www.zen-cart.com/showthread....33#post1390933

    @numinix shown up in a different thread recently and they will updated this FedEx module for zc1.58 soon (but not yet).

    https://www.zen-cart.com/showthread....36#post1391136

    Update: I just checked my code near line 623 and it is the following:

    function do_request($method, $request, $client) {

    If my code doesn't help your error, maybe you can try @carlwhat way to fix...
    Last edited by njcyx; 15 Nov 2022 at 09:23 PM.

  4. #4
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    njcyx,

    I grabbed those files. I am getting two warnigns



    [17-Nov-2022 17:01:08 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=shopping_cart, IP address: 127.0.0.1
    #0 [internal function]: zen_debug_error_handler()
    #1 C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php(278): utf8_encode()
    #2 C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php(537): fedexwebservices->build_request()
    #3 C:\xampp\htdocs\xxx.com\includes\classes\shipping.php(201): fedexwebservices->quote()
    #4 C:\xampp\htdocs\xxx.com\includes\modules\shipping_estimator.php(151): shipping->quote()
    #5 C:\xampp\htdocs\xxx.com\includes\templates\theme871\templates\tpl_shopping_cart_ default.php(312): require('C:\\xampp\\htdocs...')
    #6 C:\xampp\htdocs\xxx.com\includes\templates\theme871\common\tpl_main_page.php(407 ): require('C:\\xampp\\htdocs...')
    #7 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\\xampp\\htdocs...')
    --> PHP Deprecated: utf8_encode(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php on line 278.

    Code:
    'StreetLines' => array(utf8_encode($street_address), utf8_encode($street_address2))

    [17-Nov-2022 17:01:08 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=shopping_cart, IP address: 127.0.0.1
    #0 [internal function]: zen_debug_error_handler()
    #1 C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php(279): utf8_encode()
    #2 C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php(537): fedexwebservices->build_request()
    #3 C:\xampp\htdocs\xxx.com\includes\classes\shipping.php(201): fedexwebservices->quote()
    #4 C:\xampp\htdocs\xxx.com\includes\modules\shipping_estimator.php(151): shipping->quote()
    #5 C:\xampp\htdocs\xxx.com\includes\templates\theme871\templates\tpl_shopping_cart_ default.php(312): require('C:\\xampp\\htdocs...')
    #6 C:\xampp\htdocs\xxx.com\includes\templates\theme871\common\tpl_main_page.php(407 ): require('C:\\xampp\\htdocs...')
    #7 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\\xampp\\htdocs...')
    --> PHP Deprecated: utf8_encode(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\xxx.com\includes\modules\shipping\fedexwebservices.php on line 279.

    Code:
    'City' => utf8_encode($city), //customer city

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    You might want to drop back to PHP 8.0 until some of the mod authors catch up.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    I was able to fix my errors

    find this
    Code:
    'StreetLines' => array(utf8_encode($street_address), utf8_encode($street_address2))
    replace with
    Code:
    'StreetLines' => array(utf8_encode($street_address ?? ''), utf8_encode($street_address2 ?? '')),
    find
    Code:
     'City' => utf8_encode($city)
    replace
    Code:
    'City' => utf8_encode($city ?? '')

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    That's good, but why is the City null?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    Quote Originally Posted by swguy View Post
    That's good, but why is the City null?
    Hmm not sure why it is null?

  9. #9
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    Quote Originally Posted by swguy View Post
    That's good, but why is the City null?
    good point.

    of course, this will be a temporary fix as well. the OP must only be using php 8.1; as in php 8.2 that function call will be deprecated and removed in php 9.0.

    see:

    https://tinyurl.com/2mp9swzw
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #10
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: upgrade to 1.5.8 fedex webservice depreciated

    i got one last error in the admin

    [17-Nov-2022 18:54:31 Europe/Berlin] Request URI: /invertersupply.com/power/index.php?cmd=modules&set=shipping, IP address: 127.0.0.1
    #0 C:\xampp\htdocs\invertersupply.com\includes\modules\shipping\fedexwebservices.ph p(71): zen_debug_error_handler()
    #1 C:\xampp\htdocs\invertersupply.com\power\modules.php(187): fedexwebservices->__construct()
    #2 C:\xampp\htdocs\invertersupply.com\power\index.php(11): require('C:\\xampp\\htdocs...')
    --> PHP Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\invertersupply.com\includes\modules\shipping\fedexwebservices.ph p on line 71.

    Code:
    $countryId = $db->Execute("SELECT countries_id FROM ".TABLE_COUNTRIES." WHERE countries_name = '".$order->delivery['country']."'");

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 FedEx Webservice 1.4.9 returning List price
    By split63 in forum Addon Shipping Modules
    Replies: 1
    Last Post: 27 Sep 2015, 12:58 AM
  2. v152 Update store data via php webservice call
    By rcbitz in forum General Questions
    Replies: 0
    Last Post: 4 Feb 2014, 11:55 PM
  3. Depreciated errors in various scripts
    By agile4 in forum General Questions
    Replies: 9
    Last Post: 20 Feb 2013, 12:42 AM
  4. Depreciated Errors
    By pfb732 in forum Installing on a Windows Server
    Replies: 3
    Last Post: 28 Sep 2011, 03:59 AM
  5. Changing the Structure for my Webservice
    By g2ktcf in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 24 May 2011, 10:51 PM

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