Re: USPS Shipping Module [Support Thread]
Something didn't go well in that upgrade. Feel like I'm doing something dumb, but can't put a finger on it. Shipping module wouldn't load and was getting:
Code:
[25-Aug-2024 14:01:21 America/Chicago] PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, int given in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php:122
Stack trace:
#0 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(122): array_merge(Array, 1)
#1 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(86): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesWithFallback('/home/pcs/publi...', '/home/pcs/publi...')
#2 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(74): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesFromArrayFile('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#3 /includes/classes/ResourceLoaders/LanguageLoader.php(84): Zencart\LanguageLoader\ArraysLanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#4 /nimda123/modules.php(169): Zencart\LanguageLoader\LanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#5 /nimda123/index.php(16): require('/home/pcs/publi...')
#6 {main}
thrown in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php on line 122
[25-Aug-2024 14:01:21 America/Chicago] Request URI: /nimda123/index.php?cmd=modules&set=shipping&module=flat, IP address: 2601:300:4b01:2ce0:e001:a885:e1ef:8ed
--> PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, int given in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php:122
Stack trace:
#0 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(122): array_merge(Array, 1)
#1 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(86): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesWithFallback('/home/pcs/publi...', '/home/pcs/publi...')
#2 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(74): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesFromArrayFile('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#3 /includes/classes/ResourceLoaders/LanguageLoader.php(84): Zencart\LanguageLoader\ArraysLanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#4 /nimda123/modules.php(169): Zencart\LanguageLoader\LanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#5 /nimda123/index.php(16): require('/home/pcs/publi...')
#6 {main}
thrown in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php on line 122.
[25-Aug-2024 14:01:21 America/Chicago] Request URI: /nimda123/index.php?cmd=modules&set=shipping&module=flat, IP address: 2601:300:4b01:2ce0:e001:a885:e1ef:8ed
--> PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, int given in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php:122
Stack trace:
#0 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(122): array_merge(Array, 1)
#1 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(86): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesWithFallback('/home/pcs/publi...', '/home/pcs/publi...')
#2 /includes/classes/ResourceLoaders/ArraysLanguageLoader.php(74): Zencart\LanguageLoader\ArraysLanguageLoader->loadDefinesFromArrayFile('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#3 /includes/classes/ResourceLoaders/LanguageLoader.php(84): Zencart\LanguageLoader\ArraysLanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#4 /nimda123/modules.php(169): Zencart\LanguageLoader\LanguageLoader->loadExtraLanguageFiles('/home/pcs/publi...', 'english', 'usps.php', '/modules/shippi...')
#5 /nimda123/index.php(16): require('/home/pcs/publi...')
#6 {main}
thrown in /includes/classes/ResourceLoaders/ArraysLanguageLoader.php on line 122.
zen 2.0.1
php 8.3.10
USPS K11K -> K11L
Re: USPS Shipping Module [Support Thread]
Nope, it was me doing something dumb (like thinking a simple change didn't need testing).
I've re-published the K11l release, including the previously missing return $define; statement in the lang.usps.php file.
Re: USPS Shipping Module [Support Thread]
:) it happens. Thanks lat9!
Re: USPS Shipping Module [Support Thread]
Reinstalled this module and upon testing I received the following failure:
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Number] => 80040B23
[Description] => API Authorization failure. User 96POPSS432O33 is not authorized to use API RateV4.
[Source] => USPSCOM::DoAuth
)
Now I'm really confused.
Help
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
popsshopga
Reinstalled this module and upon testing I received the following failure:
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Number] => 80040B23
[Description] => API Authorization failure. User 96POPSS432O33 is not authorized to use API RateV4.
[Source] => USPSCOM::DoAuth
)
Now I'm really confused.
Help
This likely means the username has been deauthorized from USPS. Contact the USPS Web Tools team to have your username re-authorized by sending an email to [email protected]
Re: USPS Shipping Module [Support Thread]
zen 2.1.0
php 8.1.00
USPS K11L
My Webhost updated to PHP 8.1, making previous cart out of order. So I install Zen 2.1.0, and the newest USPS module. But I have three problems. The shipping estimator will only show "Store Pickup". Then during checkout Step 1 which should show option for Store Pickup, and shipping cost to the Zipcode. It does show the shipping cost, but there is no checkbox on the Store pickup line, it is blank. And there is no Continue button on the page to continue to Step 2 of the checkout. I'm not seeing any helpful error for either issues on webhost or the shopcart log folder. But when I "view source" on the page, there is java errors listed. I reloaded all the zava related files up to the website. But I still have the same problems.
Re: USPS Shipping Module [Support Thread]
Would you happen to have a screenshot?
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
NDboots
zen 2.1.0
php 8.1.00
USPS K11L
My Webhost updated to PHP 8.1, making previous cart out of order. So I install Zen 2.1.0, and the newest USPS module. But I have three problems. The shipping estimator will only show "Store Pickup". Then during checkout Step 1 which should show option for Store Pickup, and shipping cost to the Zipcode. It does show the shipping cost, but there is no checkbox on the Store pickup line, it is blank. And there is no Continue button on the page to continue to Step 2 of the checkout. I'm not seeing any helpful error for either issues on webhost or the shopcart log folder. But when I "view source" on the page, there is java errors listed. I reloaded all the zava related files up to the website. But I still have the same problems.
This almost sounds like a PHP error is generated. HAve you also checked the ZenCart logs folder?
1 Attachment(s)
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
retched
This almost sounds like a PHP error is generated. HAve you also checked the ZenCart logs folder?
Yes, a error code said that Opera browser is not supported, which I usually use and it worked with old versions of ZenCart. The BAD thing is, this shopping cart does not tell the user that Opera is not supported either! But my problem is it has the same problems in MS Edge and Chrome too. I have been using Zen Cart since 2004 and this 2.1.0 version is one of the most confusing versions I have used. In the past admin area, I loved the one page listing for simple listing single items and now that seems split up to several sections now instead, making it more difficult to use. But currently this cart is USELESS when one simply cannot checkout! I am no PHP expert either. I'm using the Responsive Theme. I have reloaded all the files, hoping that would fix the problem...It didn't.
On checkout I'm stuck at "Step 1 of 3 - Delivery Information". It shows the shipping cost. The radio choice option for "Store Pickup" does not show up, but it is turned on in Admin area, so it should show up, the space for it does, but it is blank! There is no button to continue to Step 2 of checkout either.
It seems to use this file: /public_html/MYStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php One of the things I noticed on this page was this near the bottom: </form> When I searched the whole page for the lead <form> command nothing was there??? Is that suppose to be like that, with just the ending </form> and no beginning <form> on the page, or does that come from a file elsewhere? But this is what the page looks like...
Attachment 20889
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
NDboots
Yes, a error code said that Opera browser is not supported, which I usually use and it worked with old versions of ZenCart. The BAD thing is, this shopping cart does not tell the user that Opera is not supported either! But my problem is it has the same problems in MS Edge and Chrome too. I have been using Zen Cart since 2004 and this 2.1.0 version is one of the most confusing versions I have used. In the past admin area, I loved the one page listing for simple listing single items and now that seems split up to several sections now instead, making it more difficult to use. But currently this cart is USELESS when one simply cannot checkout! I am no PHP expert either. I'm using the Responsive Theme. I have reloaded all the files, hoping that would fix the problem...It didn't.
On checkout I'm stuck at "Step 1 of 3 - Delivery Information". It shows the shipping cost. The radio choice option for "Store Pickup" does not show up, but it is turned on in Admin area, so it should show up, the space for it does, but it is blank! There is no button to continue to Step 2 of checkout either.
It seems to use this file: /public_html/MYStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php One of the things I noticed on this page was this near the bottom: </form> When I searched the whole page for the lead <form> command nothing was there??? Is that suppose to be like that, with just the ending </form> and no beginning <form> on the page, or does that come from a file elsewhere? But this is what the page looks like...
Attachment 20889
modern shopping carts (even zen cart!) are quite complex. the idea that you are no php expert and that you are frustrated is not surprising.
zen-cart does NOT make use of java. it does make use of javascript. they are very different.
some javascript library saying Opera or MS Edge or any other browser is not supported, is again not surprising. i can guarantee that ZC will work with those browsers.
without looking at your specific installation, it is hard to say exactly what is wrong. you think the log files are not helpful, but did you not say you are not a php expert? log files are one of the crucial items that are helpful to a seasoned php developer.
finally, do you honestly think that the default template for checkout shipping is wrong? forgetting that you are a self proclaimed no php expert, zc 2.1.0 was released over 2 months ago, and from a logic POV, do you think you would be the first person to find a rudimentory error of this sort?
if one were to look at this single line of code, that php function will draw the opening form tag for said page.
my advice is to hire a seasoned developer or start posting log files of errors that are getting created or screenshots of errors in the developer tools console. perhaps then someone could help with your problems, and in the process you might learn a bit more about php and how ZC really works.
best.