Re: USPS Shipping Module [Support Thread]
Based on the screenshot, my guess is this was an upgrade from an older version and storepickup options haven't been updated. Try removing storepickup module in the admin (not disable, but completely remove) and see if the error persists. Then simply install it again and configure as you need it and try again - hopefully the error will be gone.
And, what @carlwhat just said above: +1
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
Dissecting ... all of this:
This still sounds like a PHP error. Only a PHP error would crack a page like that to where the page stops interpreting itself like this mid load. This is independent of the browser. I've ran a 2.1.0 default with little to no mods in each Chrome, Firefox, Opera, and even DuckDuckGo. I cannot reproduce this. (I have both USPS modules installed and can see nothing like this.)
Additionally, are you seeing that source code in your browser's source code or Inspect/Developer Tools tab.
Please check to see if there is indeed a zcDebug Log generated and include the text of that here. If you're not getting one, which isn't uncommon, there is a way to get PHP Errors to appear in your browser (I do not recommend having this on a live shop): https://docs.zen-cart.com/user/troub...ng/blank_page/
As for your other complaints about the navigatibility of the admin area. I'll admit it's a bit daunting, AT FIRST, but most of the older admin area code was a bit dated. There are ways to get that old functionality back but at this point you would have to customize them. But to say that "this cart is USELESS" is a bit too harsh even if hyperbolic.
I'll offer myself to help in DMs but to throw your arms up and give up is not fair to everyone here who can assist.
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
carlwhat
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.
Thanks for reply Carlwhat. There are two things that repeat in the log currently.
2025-02-02 09:52:57: USPS build: 2024-08-25 K11l
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 1
Total Quote Weight: 1 Pounds: 1 Ounces: 0
Maximum: 50 Tare Rates: Small/Medium: 0:0 Large: 0:0
Handling method: Order Handling fee Domestic: $2.35 Handling fee International: $2.75
Decimals: 2
Services Included: 0, 70, 0.00, 0, 70, 0.00, Priority MailRM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, .21875, 0.00, 0, 4, 0.00, 0, 4, 0.00, Priority Mail InternationalRM, 0, 66, 0.00, 0, 4, 0.00, 0, 4, 0.00, 0, 20, 0.00, 0, 20, 0.00, 0, 66, 0.00, 0, 4, 0.00, 0, 70, 0.00, 0, 70, 0.00
Domestic Length: 8.625 Width: 5.375 Height: 1.625
International Length: 8.625 Width: 5.375 Height: 1.625
All Packages are Machinable: False
Sorts the returned quotes: Price-LowToHigh
ZipOrigination: 58467
ZipDestination: Postcode: 58467 Country: United States City: Medina State: North Dakota
Order SubTotal: $62.59
Order Total: $65.72
Uninsurable Portion: $0.00
Insurable Value: $65.72
2025-02-02 09:52:57: Sending request to USPS
2025-02-02 09:52:57: ==================================
SENT TO USPS:
<RateV4Request USERID="695SAVEM5201" PASSWORD="NS505862PH5535H"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>58467</ZipOrigination><ZipDestination>58467</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>65.72</Value><SpecialServices> <SpecialService>106</SpecialService>
<SpecialService>100</SpecialService>
<SpecialService>125</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
</RateV4Request>
RESPONSE FROM USPS:
==================================
CommErr (should be 0): 0 -
==================================
USPS Country - $order->delivery[country][iso_code_2]: United States $this->usps_countries: US
Domestic Services Selected:
USPS TrackingTM
Insurance
Priority Mail Insurance
2025-02-02 09:52:57: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Package] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 0
)
[ZipOrigination] => 58467
[ZipDestination] => 58467
[Pounds] => 1
[Ounces] => 0
[Container] => VARIABLE
[Zone] => 1
[Postage] => SimpleXMLElement Object
(
[@attributes] => Array
(
[CLASSID] => 1
)
[MailService] => Priority Mail<sup>®</sup>
[Rate] => 9.35
[CommercialRate] => 7.99
[CommitmentDate] => 2025-02-05
[CommitmentName] => 2-Day
[SpecialServices] => SimpleXMLElement Object
(
[SpecialService] => Array
(
[0] => SimpleXMLElement Object
(
[ServiceID] => 125
[ServiceName] => Insurance
[Available] => true
[AvailableOnline] => true
[Price] => 0.00
[PriceOnline] => 0.00
[DeclaredValueRequired] => true
[DueSenderRequired] => false
)
[1] => SimpleXMLElement Object
(
[ServiceID] => 181
[ServiceName] => Scan Retention
[Available] => true
[AvailableOnline] => true
[Price] => 2.50
[PriceOnline] => 2.50
)
[2] => SimpleXMLElement Object
(
[ServiceID] => 183
[ServiceName] => USPS Label Delivery Service
[Available] => true
[AvailableOnline] => true
[Price] => 1.55
[PriceOnline] => 1.55
)
[3] => SimpleXMLElement Object
(
[ServiceID] => 106
[ServiceName] => USPS Tracking<sup>®</sup>
[Available] => true
[AvailableOnline] => true
[Price] => 0.00
[PriceOnline] => 0.00
)
[4] => SimpleXMLElement Object
(
[ServiceID] => 155
[ServiceName] => USPS Tracking<sup>®</sup> Electronic
[Available] => true
[AvailableOnline] => true
[Price] => 0.00
[PriceOnline] => 0.00
)
)
)
)
)
)
2025-02-02 09:52:57: ==================================
Rate Quotes:
Priority MailRM
Original cost: 7.99 Total Cost: 10.34 - $usps_insurance_charge: 0.00
SpecialServices: Priority Mail Insurance [125] Amount: 0.00
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
retched
Dissecting ... all of this:
This still sounds like a PHP error. Only a PHP error would crack a page like that to where the page stops interpreting itself like this mid load. This is independent of the browser. I've ran a 2.1.0 default with little to no mods in each Chrome, Firefox, Opera, and even DuckDuckGo. I cannot reproduce this. (I have both USPS modules installed and can see nothing like this.)
Additionally, are you seeing that source code in your browser's source code or Inspect/Developer Tools tab.
Please check to see if there is indeed a zcDebug Log generated and include the text of that here. If you're not getting one, which isn't uncommon, there is a way to get PHP Errors to appear in your browser (I do not recommend having this on a live shop):
https://docs.zen-cart.com/user/troub...ng/blank_page/
As for your other complaints about the navigatibility of the admin area. I'll admit it's a bit daunting, AT FIRST, but most of the older admin area code was a bit dated. There are ways to get that old functionality back but at this point you would have to customize them. But to say that "this cart is USELESS" is a bit too harsh even if hyperbolic.
I'll offer myself to help in DMs but to throw your arms up and give up is not fair to everyone here who can assist.
I'm just frustrated, never had so much trouble installing ZenCart, and most webhosts changes PHP.ini very often now days too! Which means my previous shopping cart stopped working for webhost update, and the current new one is not working either. Main product is a seasonal winter item for cattlemen, and "Down for Maintenance" just chases the customers away. This is the Debug one, which does not show up when same happens in MS EDGE or Chrome...But non the less, both stop with same issue on the "Step 1 of 3 - Delivery Information" page, but for whatever reason, nothing goes into the ZenCart log when it happens on these other two browsers.
[02-Feb-2025 09:52:58 America/New_York] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/MyServer/public_html/MyStore/includes/classes/currencies.php:101
Stack trace:
#0 /home/MyServer/public_html/MyStore/includes/classes/currencies.php(68): currencies->rateAdjusted(' ND Ph 701-486-...', true, '', '')
#1 /home/MyServer/public_html/MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php(93): currencies->format(' ND Ph 701-486-...')
#2 /home/MyServer/public_html/MyStore/includes/templates/responsive_classic/common/tpl_main_page.php(181): require('/home/MyServer/p...')
#3 /home/MyServer/public_html/MyStore/index.php(94): require('/home/MyServer/p...')
#4 {main}
thrown in /home/MyServer/public_html/MyStore/includes/classes/currencies.php on line 101
[02-Feb-2025 09:52:58 America/New_York] Request URI: /MyStore/index.php?main_page=checkout_shipping, IP address: 66.163.146.154
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/MyServer/public_html/MyStore/includes/classes/currencies.php:101
Stack trace:
#0 /home/MyServer/public_html/MyStore/includes/classes/currencies.php(68): currencies->rateAdjusted(' ND Ph 701-486-...', true, '', '')
#1 /home/MyServer/public_html/MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php(93): currencies->format(' ND Ph 701-486-...')
#2 /home/MyServer/public_html/MyStore/includes/templates/responsive_classic/common/tpl_main_page.php(181): require('/home/MyServer/p...')
#3 /home/MyServer/public_html/MyStore/index.php(94): require('/home/MyServer/p...')
#4 {main}
thrown in /home/MyServer/public_html/MyStore/includes/classes/currencies.php on line 101.
[02-Feb-2025 09:52:58 America/New_York] Request URI: /MyStore/index.php?main_page=checkout_shipping, IP address: 66.163.146.154
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/MyServer/public_html/MyStore/includes/classes/currencies.php:101
Stack trace:
#0 /home/MyServer/public_html/MyStore/includes/classes/currencies.php(68): currencies->rateAdjusted(' ND Ph 701-486-...', true, '', '')
#1 /home/MyServer/public_html/MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php(93): currencies->format(' ND Ph 701-486-...')
#2 /home/MyServer/public_html/MyStore/includes/templates/responsive_classic/common/tpl_main_page.php(181): require('/home/MyServer/p...')
#3 /home/MyServer/public_html/MyStore/index.php(94): require('/home/MyServer/p...')
#4 {main}
thrown in /home/MyServer/public_html/MyStore/includes/classes/currencies.php on line 101.
Re: USPS Shipping Module [Support Thread]
very quickly, i am not sure where you have gone; but gone wrong you have indeed.
lets look at the log, but understand this log will happen no matter the browser. period.
Code:
[02-Feb-2025 09:52:58 America/New_York] Request URI: /MyStore/index.php?main_page=checkout_shipping, IP address: 66.163.146.154
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/MyServer/public_html/MyStore/includes/classes/currencies.php:101
Stack trace:
#0 /home/MyServer/public_html/MyStore/includes/classes/currencies.php(68): currencies->rateAdjusted(' ND Ph 701-486-...', true, '', '')
#1 /home/MyServer/public_html/MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php(93): currencies->format(' ND Ph 701-486-...')
#2 /home/MyServer/public_html/MyStore/includes/templates/responsive_classic/common/tpl_main_page.php(181): require('/home/MyServer/p...')
#3 /home/MyServer/public_html/MyStore/index.php(94): require('/home/MyServer/p...')
#4 {main}
thrown in /home/MyServer/public_html/MyStore/includes/classes/currencies.php on line 101.
lets start with your template file. it says there is a problem starting on line 93. line 93 in v2.1.0 has no such thing:
https://github.com/zencart/zencart/b...efault.php#L93
line line 92 (right above that), does call $currencies->format, so already we are looking at some file that is not the same as the base.
now, in looking at the number it is formatting (at least at line 92), it is something like this:
PHP Code:
zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))
but yet in your log, it looks to be formatting a phone number, ie: `ND Ph 701-486-...'
so what do you actually have on line 93?
i find it hard to imagine that the quote method cost coming back USPS is a phone number.
and again, this problem would not be browser dependent.
but please stop complaining about hosting, php.ini, etc. it does no one any good when trying to troubleshoot an issue.
best.
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
carlwhat
very quickly, i am not sure where you have gone; but gone wrong you have indeed.
lets look at the log, but understand this log will happen no matter the browser. period.
Code:
[02-Feb-2025 09:52:58 America/New_York] Request URI: /MyStore/index.php?main_page=checkout_shipping, IP address: 66.163.146.154
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/MyServer/public_html/MyStore/includes/classes/currencies.php:101
Stack trace:
#0 /home/MyServer/public_html/MyStore/includes/classes/currencies.php(68): currencies->rateAdjusted(' ND Ph 701-486-...', true, '', '')
#1 /home/MyServer/public_html/MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php(93): currencies->format(' ND Ph 701-486-...')
#2 /home/MyServer/public_html/MyStore/includes/templates/responsive_classic/common/tpl_main_page.php(181): require('/home/MyServer/p...')
#3 /home/MyServer/public_html/MyStore/index.php(94): require('/home/MyServer/p...')
#4 {main}
thrown in /home/MyServer/public_html/MyStore/includes/classes/currencies.php on line 101.
lets start with your template file. it says there is a problem starting on line 93. line 93 in v2.1.0 has no such thing:
https://github.com/zencart/zencart/b...efault.php#L93
line line 92 (right above that), does call $currencies->format, so already we are looking at some file that is not the same as the base.
now, in looking at the number it is formatting (at least at line 92), it is something like this:
PHP Code:
zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))
but yet in your log, it looks to be formatting a phone number, ie: `ND Ph 701-486-...'
so what do you actually have on line 93?
i find it hard to imagine that the quote method cost coming back USPS is a phone number.
and again, this problem would not be browser dependent.
but please stop complaining about hosting, php.ini, etc. it does no one any good when trying to troubleshoot an issue.
best.
Thanks for reply Carlwhat. That seems odd. I download 2.1.0 from the ZenCart website home page, now you make me wonder if that is the problem. I also downloaded the USPS files from the same website.
The file you seem to be of reference is: MyStore/includes/templates/template_default/templates/tpl_checkout_shipping_default.php Right?
1 Attachment(s)
Re: USPS Shipping Module [Support Thread]
This is a screen shot of that section of file from my ZenCart 2.1.0 download folder, it is the same as on my website too. The phone number was part of the test login used to try to make the purchase. The other thing I'm not sure is right in the shopping cart, is I had both side columns in the shopping cart. But once in Step 1 of checkout the right hand column does not show. I do not remember if that was normal or not for during checkout.
Attachment 20892
Re: USPS Shipping Module [Support Thread]
Wait... is this an actual address or a sample address?
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
retched
Wait... is this an actual address or a sample address?
This is address from the install folder I downloaded and have loaded on my website in same location, for the 2.1.0 ZenCart, that will not go more then Step 1 in checkout with PHP 8.1 installed. When I checked my webhost was not posting PHP errors either. Just the ZenCart logs show things. /includes/templates/template_default/templates/tpl_checkout_shipping_default.php Carlwhat said in his copy, that works, from in the line 92 area, if I understood him right, does not read the same. So I posted what my file says.
What happens, is the Step 1 does not show the radio button for store pickup, which is turned on, and the field area for it shows though. And the page does not show a continue button to go to Step 2. Also, the shipping estimator will only show Store pick-up, but will not give item shipping cost to state and zip code. Unless you are login, then the estimator works but not the rest of the checkout options.
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
NDboots
This is address from the install folder I downloaded and have loaded on my website in same location, for the 2.1.0 ZenCart, that will not go more then Step 1 in checkout with PHP 8.1 installed. When I checked my webhost was not posting PHP errors either. Just the ZenCart logs show things. /includes/templates/template_default/templates/tpl_checkout_shipping_default.php Carlwhat said in his copy, that works, from in the line 92 area, if I understood him right, does not read the same. So I posted what my file says.
What happens, is the Step 1 does not show the radio button for store pickup, which is turned on, and the field area for it shows though. And the page does not show a continue button to go to Step 2. Also, the shipping estimator will only show Store pick-up, but will not give item shipping cost to state and zip code. Unless you are login, then the estimator works but not the rest of the checkout options.
I was asking about the address used as part of the quote.
The Shipping Estimator won't work off non-logged in accounts unless a zip code and destination country is presented as that is part of the quote. (How would you get a USPS Shipping quote if there is no Zip Code to check against? You have to provide that as part of the quote. So there are fields to enter.)
Some part of the address is broken because `ND Ph 701-486-` is not a state, and looks like part of a phone number.
What info is being presented?