Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 56
  1. #41
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,712
    Plugin Contributions
    123

    Default Re: FedEx Shipping using REST API

    Version 1.1 is now available with the fixes from @njcyx for International Shipping.
    That Software Guy. My Store: Zen Cart Support
    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.

  2. #42
    Join Date
    Aug 2012
    Posts
    40
    Plugin Contributions
    0

    Default Re: FedEx Shipping using REST API

    On fedexrest.php file under modules, if I wanted to permanently reorder them a certain way like ground at the top, I would mess with lines 165 -210 of the code, correct?

  3. #43
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,712
    Plugin Contributions
    123

    Default Re: FedEx Shipping using REST API

    A better approach would be to read the documentation and see how rateSortOrder works, and submit a PR that allowed people to set it. (I assume you want to sort by price lowest to highest.)

    https://developer.fedex.com/api/en-u...ransit%20times
    That Software Guy. My Store: Zen Cart Support
    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.

  4. #44
    Join Date
    Aug 2012
    Posts
    40
    Plugin Contributions
    0

    Default Re: FedEx Shipping using REST API

    Quote Originally Posted by swguy View Post
    A better approach would be to read the documentation and see how rateSortOrder works, and submit a PR that allowed people to set it. (I assume you want to sort by price lowest to highest.)

    https://developer.fedex.com/api/en-u...ransit%20times
    Noted.

    I just don't like how it is out of order as far as the speeds go, which coincides with the cost.

    Right now the list is: next day at the top, ground in the middle, 2day, then express saver.
    Ground, express saver, 2 day, then next day makes more sense to me as a customer on the site.

    Also, I renamed the heading to remove the "REST API" to just "Fedex" so the REST API heading doesn't show to the customer. Looks cleaner to me this way.

  5. #45
    Join Date
    Apr 2019
    Posts
    245
    Plugin Contributions
    0

    Default Re: FedEx Shipping using REST API

    I did some studies regarding the element rateSortOrder. Here are the available values:

    SERVICENAMETRADITIONAL - data in order of highest to lowest service (Default)
    COMMITASCENDING - data in order of ascending delivery committment
    COMMITDESCENDING - data in order of descending delivery committment.

    The last two sorting options are both based on the shipping speed, not by the quoted price. You may need to change the code for your special needs.

    You can probably try my code as the following (Bubble Sort). So the ground will be the first, then the rest will be sorted ascending by price.

    Please put the following code on the top of the file.

    if (!function_exists('fedex_sort')) {
    function fedex_sort ($a, $b) {
    $c = (float)$a['cost'];
    $d = (float)$b['cost'];
    $e = 'Ground';
    if ($c==$d) return 0;
    if (strpos($a['title'], $e) !== false) return -1;
    if (strpos($b['title'], $e) !== false) return 1;
    return ($c>$d?1:-1);
    }
    }

    Then put the following line before "$quotes['methods'] = $methods;"

    usort($methods,'fedex_sort');
    Last edited by njcyx; 30 Nov 2023 at 09:00 PM.

  6. #46
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    help question Re: FedEx Shipping using REST API

    Hi. Running ZC 1.5.8a with the version that's listed and I'm running into the following (warning) error message while trying to run the Shopping Cart Estimator

    Code:
    [07-Dec-2023 20:56:11 America/New_York] Request URI: /justuptown/index.php?main_page=shopping_cart, IP address: 127.0.0.1, Language id 1#0 E:\xampp\htdocs\justuptown\includes\modules\shipping\fedexrest.php(309): zen_debug_error_handler()
    #1 E:\xampp\htdocs\justuptown\includes\modules\shipping\fedexrest.php(219): fedexrest->getRates()
    #2 E:\xampp\htdocs\justuptown\includes\classes\shipping.php(201): fedexrest->quote()
    #3 E:\xampp\htdocs\justuptown\includes\modules\shipping_estimator.php(151): shipping->quote()
    #4 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\templates\tpl_shopping_cart_default.php(223): require('E:\\xampp\\htdocs...')
    #5 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\common\tpl_main_page.php(216): require('E:\\xampp\\htdocs...')
    #6 E:\xampp\htdocs\justuptown\index.php(94): require('E:\\xampp\\htdocs...')
    --> PHP Warning: Undefined array key "street_address" in E:\xampp\htdocs\justuptown\includes\modules\shipping\fedexrest.php on line 309.
    I tried to define the $street_address in fedexrest but I'm still getting that error. It's not breaking anything but it's just generating log file after log file when I refresh the shopping code.

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

    Default Re: FedEx Shipping using REST API

    Fix it just like the line below it. Use ?? ''

    $street_address = $order->delivery['street_address'] ?? '';
    That Software Guy. My Store: Zen Cart Support
    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. #48
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,712
    Plugin Contributions
    123

    Default Re: FedEx Shipping using REST API

    Version 1.2 is now out with some improvements from community members @retched and @njcyx.
    That Software Guy. My Store: Zen Cart Support
    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.

  9. #49
    Join Date
    Mar 2012
    Location
    NJ
    Posts
    41
    Plugin Contributions
    0

    Default Re: FedEx Shipping using REST API

    Installed 1.2, status shows yellow without any warnings posted on the right-hand side. Should I be looking somewhere else for an issue or can the yellow status be ignored?
    I was a shy, quiet kid. I was happiest playing by myself with my toys, rather than hanging around people.
    -- Christian Slater

  10. #50
    Join Date
    Mar 2012
    Location
    NJ
    Posts
    41
    Plugin Contributions
    0

    Default Re: FedEx Shipping using REST API

    Quote Originally Posted by Bubbadood View Post
    Installed 1.2, status shows yellow without any warnings posted on the right-hand side. Should I be looking somewhere else for an issue or can the yellow status be ignored?

    Disregard, I went in and regenerated my secret key and reapplied. Working as intended, issue was clearly on my end.
    I was a shy, quiet kid. I was happiest playing by myself with my toys, rather than hanging around people.
    -- Christian Slater

 

 
Page 5 of 6 FirstFirst ... 3456 LastLast

Similar Threads

  1. v158 UPS Shipping using RESTful/OAuth API [Support Thread]
    By lat9 in forum Addon Shipping Modules
    Replies: 122
    Last Post: 26 Apr 2024, 05:15 PM
  2. PayPal Express Checkout with REST API
    By kanine in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 19 Jun 2022, 05:23 AM
  3. Rest api?
    By skywalker826 in forum General Questions
    Replies: 4
    Last Post: 31 Aug 2013, 04:30 PM
  4. Suomen verkkomaksut (SVM) REST API payment module
    By pasi in forum Addon Payment Modules
    Replies: 3
    Last Post: 9 Mar 2013, 09:57 AM
  5. Fedex Signature required option in fedex api
    By jeba in forum Addon Shipping Modules
    Replies: 0
    Last Post: 15 Oct 2009, 08:48 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