Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Fedex Web Services Language Files Updating

Fedex Web Services Language Files Updating

Views: 5,269

Results 1 to 19 of 19
24 Oct 2022, 9:31 PM
#1
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Fedex Web Services Language Files Updating

ZC158
Linux Ubuntu 20.04
Mariadb 10.3
PHP 8.0
Apache 2.4
No plugins

I am trying to put my first plugin, fedex_web_services.5, into my fresh install of zc158.

These are the help files I am using to try and modify the plugin:

https://docs.zen-cart.com/dev/languages/158_language_files/
https://docs.zen-cart.com/dev/plugins/upgrading_to_158/#array-based-language-files

I located and commented out all of the "define" elements in each of the fedex files then moved and modified them into lang.fedexwebservices.php like this:

$define = [
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_TEXT_TITLE' => 'FedEx',
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_TEXT_DESCRIPTION' => '<h2>FedEx Web Services</h2><p>You will need to have registered an account with FedEx and proper approval from FedEx identity to use this module. Please see the README.TXT file for other requirements.</p>',
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_TEXT_DESCRIPTION_SOAP' => '<h2>FedEx Web Services</h2><p><span style="color:#dd0000;">Warning: SOAP Extension is not enabled. FedEx Web Services Shipping Module will not work until SOAP is enabled. Ensure that PHP is compiled with SOAP. Speak to your hosting company if unsure.</span></p> <p>You will need to have registered an account with FedEx and proper approval from FedEx identity to use this module. Please see the README.TXT file for other requirements.</p>',
    
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_KEY' => '6W02EnQC0n9nO5NH',
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_PWD' => 'tmZlwVIuLUHGNtasKOHQYkKKd',
    'MODULE_SHIPPING_FEDEX_WEB_SERVICES_INSURE' => 0,
    
    'TRANSACTIONS_LOG_FILE' => '../fedextransactions.log',
    'Newline' => "<br />",
]; 

return $define;

Prior to this action, I tried changing the defines in all the fedex files but did I not seem to be having any luck with that. After reading the help files several times, it seemed that all defines should be in the language file (bad assumption?).

At this point, I could, at least, get the admin>modules>shipping page to load semi-completely...only problem was the FedEx module does not display the module name and short name in the column next to it.

I attempted to go ahead and install the plug in but nothing happened.

So I searched each of the fedex files for $_SESSION['language'] to see if I needed to do the "Upgrading plugins to work with 1.5.8/PHP 8.0+" help file. The only place I found it was in shipping.php and it has already been modified according to the help files. It is also a core file so I left it alone.

What am I missing?:bangin:

Thanks.

24 Oct 2022, 9:41 PM
#2
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

Attachment 20128

What admin>modules>shipping looks like...

24 Oct 2022, 11:45 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Fedex Web Services Language Files Updating

You don't have to update the language files to the new format; the old format will still work.

However, this plugin hasn't been updated in five years. You'll have to work with your developer to modernize it.

You might also want to grab the latest one from Numinx - they don't always update their stuff in the plugins library when they re-release them.

26 Oct 2022, 2:38 PM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Fedex Web Services Language Files Updating

You don't have to update the language files to the new format; the old format will still work.
In fact personally I prefer to keep all mods language files in the old format so in folder listings they are clearly separated from core files...makes comparisons easier.

26 Oct 2022, 2:53 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Fedex Web Services Language Files Updating

On my todo list is adding guidance about this in the docs. In general, if a file doesn't override a core file, and it's in the old format, unless you're the plugin's owner you're better off leaving it as is (for comparisons if nothing else).

26 Oct 2022, 2:54 PM
#6
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

Appreciate the insight.

I have destroyed my dev server install because I can not get any zc version to work with php 8.0.

I will try again when and if I get over my disgust with the upgrade. Maybe more plugins will be brought up to date next time I try.

26 Oct 2022, 4:23 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Fedex Web Services Language Files Updating

Upgrading is a complex process that requires skills that you might not have.
Zen Cart has a Commercial Help Wanted forum where you can hire a contractor to do your upgrade for you. See

https://www.zen-cart.com/forumdisplay.php?138-Commercial-Help-Wanted

26 Oct 2022, 4:58 PM
#8
njcyx avatar

njcyx

Zen Follower

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

Re: Fedex Web Services Language Files Updating

Hi @mikeel100, you can probably try my code. I modified several files for php8.0 and zc1.58. I tested it and it worked fine with no log generated. It is based on Numinix v1.8.1 (release date 1/22/2021).

https://github.com/njcyx/fedexwebservices

26 Oct 2022, 4:59 PM
#9
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

njcyx:

Hi @mikeel100, you can probably try my code. I modified several files for php8.0 and zc1.58. I tested it and it worked fine with no log generated. It is based on Numinix v1.8.1

https://github.com/njcyx/fedexwebservice

Now, that is what I call real help.

Thanks.

26 Oct 2022, 5:07 PM
#10
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

swguy:

Upgrading is a complex process that requires skills that you might not have.
Zen Cart has a Commercial Help Wanted forum where you can hire a contractor to do your upgrade for you. See

https://www.zen-cart.com/forumdisplay.php?138-Commercial-Help-Wanted

Nice try...I have been messing with this Cart since 1.3.8 and have never been as frustrated with an upgrade as with this one.

I have skills enough to run and maintain a 100000 product store for 6 years.

Yes, I need help once in a while...who doesn't?

I don't need a contractor for a dev machine.

26 Oct 2022, 5:07 PM
#11
njcyx avatar

njcyx

Zen Follower

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

Re: Fedex Web Services Language Files Updating

You can try and see how it works anyway. If you concern about the safety, you can use some tools to compare my files vs the original files.

I'm not from Numinix. Hopefully Numinix will update this plug-in soon in a professional way...

26 Oct 2022, 5:19 PM
#12
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

mikeel100:

Now, that is what I call real help.

Thanks.

404 error on link...

26 Oct 2022, 5:37 PM
#14
njcyx avatar

njcyx

Zen Follower

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

Re: Fedex Web Services Language Files Updating

Thanks. Actually I don't know why sometimes I can open that github link but sometimes it cannot be opened...

26 Oct 2022, 5:45 PM
#15
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

njcyx:

Thanks. Actually I don't know why sometimes I can open that github link but sometimes it cannot be opened...
Welcome.

Thank you!

30 Oct 2022, 1:51 AM
#16
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

My issues were caused by a failing hard drive on my developer machine.

It is dead now and on the way to the recycle bin.

Please ignore anything I reported here.

30 Oct 2022, 2:30 AM
#17
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Fedex Web Services Language Files Updating

mikeel100:

Appreciate the insight.

I have destroyed my dev server install because I can not get any zc version to work with php 8.0.

I will try again when and if I get over my disgust with the upgrade. Maybe more plugins will be brought up to date next time I try.

Reason for frustration was not Zencarts problem...my hard drive failed on my dev machine.

1 Nov 2022, 8:24 PM
#18
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

Re: Fedex Web Services Language Files Updating

We will be performing ZC Upgrades to 1.5.8 for our clients shortly and at that time we'll also release updated versions of our plugins (which you can access through the link in my signature).

2 Nov 2022, 3:39 PM
#19
njcyx avatar

njcyx

Zen Follower

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

Re: Fedex Web Services Language Files Updating

numinix:

We will be performing ZC Upgrades to 1.5.8 for our clients shortly and at that time we'll also release updated versions of our plugins (which you can access through the link in my signature).

That's a great news! Thanks!