If this is your first visit, check our documentation. To post, register or login.
Forums / Addon Shipping Modules / FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

Started by njcyx on 4 Oct 2023, 2:42 PM · Views: 6,069

Results 1 to 6 of 6
4 Oct 2023, 2:42 PM
#1
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
382
Plugin Contributions:
0

FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

Recently, we got a good deal from FedEx Ground Economy/Smartpost. I'm not sure why but the previous fedexwebservices plug-in doesn't quote Smartpost (I cannot find smartpost from the response log file). Then I noticed that Numinix offered a separate smartpost plug-in back in 2018. After trial and error period, finally I made it work. If you want to try my code, please find the link below.

https://github.com/njcyx/fedexsmartpost.git

The code was tested under zc 1.57d with php7.4. Not sure if anyone still use this service...

Numinix plug-in link:

https://www.numinix.com/zen-cart-plugins-modules-shipping-c-179_250_373_163/fedex-smartpost-shipping-module

Changelog:

Updated code for PHP7.4
Corrected debug function. There are some lines of code for debugging but not working.
Updated the language to display Ground Economy instead of Smartpost
Used the newer pricing file (RateService_v31) instead of v10. Also changed the folder location for the pricing file so it can use the same file from fedexwebservices folder instead.

Next Step:

Probably try to combine two plug-ins together (fedexwebservices and smartpost). I compared the request log files and they looks slightly different.

4 Oct 2023, 6:35 PM
#2
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
382
Plugin Contributions:
0

Re: FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

Wait, this plug-in will still trigger some future PHP error warnings when the plug-in is not installed. After the plug-in is installed, no more warning.

PHP Warning: Use of undefined constant MODULE_SHIPPING_FEDEX_SMARTPOST_SORT_ORDER - assumed 'MODULE_SHIPPING_FEDEX_SMARTPOST_SORT_ORDER' (this will throw an Error in a future version of PHP) in /public_html/includes/modules/shipping/fedexsmartpost.php on line 14.

7 parameters are affected:
MODULE_SHIPPING_FEDEX_SMARTPOST_SORT_ORDER
MODULE_SHIPPING_FEDEX_SMARTPOST_TAX_CLASS
MODULE_SHIPPING_FEDEX_SMARTPOST_STATUS
MODULE_SHIPPING_FEDEX_SMARTPOST_KEY
MODULE_SHIPPING_FEDEX_SMARTPOST_PWD
MODULE_SHIPPING_FEDEX_SMARTPOST_ACT_NUM
MODULE_SHIPPING_FEDEX_SMARTPOST_METER_NUM

Tried some methods but no help. Not sure how to fix. Use "error_reporting(0);"

4 Oct 2023, 7:08 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

I just opened an issue (https://github.com/njcyx/fedexsmartpost/issues/1) on your github repo with a suggested solution.

5 Oct 2023, 3:04 PM
#4
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
382
Plugin Contributions:
0

Re: FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

lat9:

I just opened an issue (https://github.com/njcyx/fedexsmartpost/issues/1) on your github repo with a suggested solution.

Hi @lat9, you saved my day! I tried your suggested code and it worked! No more warning at all.

I saw you also opened another two issues. I will take a look and do some tests...

Appreciate your help and guidance.

5 Oct 2023, 4:02 PM
#5
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
382
Plugin Contributions:
0

Re: FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

lat9:

I just opened an issue (https://github.com/njcyx/fedexsmartpost/issues/1) on your github repo with a suggested solution.

For the other two issues you posted, I have updated the code according to your suggestion. Thanks again!

25 Oct 2023, 9:14 PM
#6
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
382
Plugin Contributions:
0

Re: FedEx Ground Economy / SmartPost Shipping Module [Unofficial Discussion Thread]

Github code updated, to correct issue that quote is still displayed for weight over 70lb.

Ground Economy can only ship from 1lb to 70lb.

https://www.fedex.com/en-us/shipping/ground/economy.html

I have been able to add the ground economy code into the main fedexwebservices plug-in. So no need to use a separate plug-in any more.

https://www.zen-cart.com/showthread.php?228975-FedEx-Web-Services-Shipping-Unofficial-Discussion-Thread