.... and now they're not.
Anyway, I'm working on a shipping module using the new API. I'll update the support thread when there's a version ready for testing.
https://www.zen-cart.com/showthread....using-REST-API
.... and now they're not.
Anyway, I'm working on a shipping module using the new API. I'll update the support thread when there's a version ready for testing.
https://www.zen-cart.com/showthread....using-REST-API
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.
Hi @swguy, that is a great news and thanks for your contribution!
The FedEx REST API Integration is now available.
https://www.zen-cart.com/showthread....using-REST-API
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.
Update:
I figured out why v1.9.1 doesn't show up the intl priority rate.
When using RateService_v20.wsdl, the ServiceType for intl priority rate is INTERNATIONAL_PRIORITY. While in RateService_v31.wsdl, this name was changed to FEDEX_INTERNATIONAL_PRIORITY.
Also, RateService_v31.wsdl can quote the newer International Connect Plus shipping method (several lines for Connect Plus needed to be added in fedexwebservices.php though). But RateService_v20.wsdl cannot. I tried to add several new lines for Connect Plus but no help.
I just posted 1.9.1A to my Github above. Mod based on numinix 1.9.1.
Changelog:
1. Add support for FedEx International Connect Plus
2. Now using RateService_v31 file.
3. Corrected the bug in the original file, which not displaying FedEx International Priority.
4. Other bug fixes.
Soon or later, I can still receive the following warning note
PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /public_html/includes/modules/shipping/fedexwebservices.php:685
Stack trace:
#0 /public_html/includes/modules/shipping/fedexwebservices.php(514): fedexwebservices->do_request('', Array, Object(SoapClient))
#1 /public_html/includes/classes/shipping.php(174): fedexwebservices->quote('')
#2 /public_html/includes/modules/shipping_estimator.php(156): shipping->quote()
#3 /public_html/includes/templates/template_default/popup_shipping_estimator/tpl_main_page.php(16)
#4 /public_html/index.php(94)
#5 {main}
thrown in public_html/includes/modules/shipping/fedexwebservices.php on line 685
Line 685 code is the following:
if ($showAccountRates) {
$cost = $rateReply->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount;
$cost = (float)round(preg_replace('/[^0-9.]/', '', $cost), 2);
}
I tried several ways, such as
$cost = json_decode($rateReply->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount, true);
$cost = reset($rateReply->RatedShipmentDetails)->ShipmentRateDetail->TotalNetCharge->Amount;
Neither works. For the reset(), it seems better but I received the following warning today.
Request URI: /index.php?main_page=checkout_shipping
#1 reset() called at [/includes/modules/shipping/fedexwebservices.php]
#2 fedexwebservices->do_request() called at [/includes/modules/shipping/fedexwebservices.php]
#3 fedexwebservices->quote() called at [/includes/classes/shipping.php]
#4 shipping->quote() called at [/includes/modules/pages/checkout_shipping/header_php.php]
#5 require(/includes/modules/pages/checkout_shipping/header_php.php) called at [/index.php:35]
--> PHP Warning: reset() expects parameter 1 to be array, null given in /includes/modules/shipping/fedexwebservices.php
Last edited by njcyx; 9 Oct 2023 at 04:09 PM.
Github Update:
1. I figured out a potential way to resolve the issue above (hopefully).
2. I have been able to put smartpost/ground economy code into this fedex plug-in, so no need to use two separate FedEx plug-ins any more! Hub ID needs to be changed manually in the code.
Maybe it is time to say goodbye for this plug-in...
https://www.fedex.com/en-us/developer/web-services.html
Caution: FedEx Web Services Tracking, Address Validation, and Validate Postal Codes WSDLS will be retired on May 15, 2024. The SOAP based FedEx Web Services is in development containment and has been replaced with FedEx RESTful APIs. To learn more and upgrade your integration from Web Services to FedEx APIs, please visit the FedEx Developer Portal.
Is there a replacement plugin for Zen Cart?
Bookmarks