Re: USPS January 17 2016 K8 - Support Quirks
Maker sure that works for both.
If not, use:
Code:
if ($uspsQuote['Number'] == -2147219085) {
$this->quotes = array('module' => $this->title,
'error' => 'NO OPTIONS INSTALLED: ' . $uspsQuote['error']);
} else {
// $this->quotes = array('module' => $this->title,
// 'error' => $uspsQuote['error']);
}
return $this->quotes;
Re: USPS January 17 2016 K8 - Support Quirks
What I'd done was:
Code:
if (isset($uspsQuote['error'])) {
if ($uspsQuote['Number'] == -2147219085) {
$this->quotes = array('module' => $this->title,
'error' => 'NO OPTIONS INSTALLED: ' . $uspsQuote['error']);
//-bof-20181121-lat9: Return no quotes on "incomplete" submission (i.e. no methods selected).
} elseif ($uspsQuote['Number'] == -2147221202) {
$this->quotes = array();
//-eof-20181121-lat9
} else {
$this->quotes = array('module' => $this->title,
'error' => $uspsQuote['error']);
}
Re: USPS January 17 2016 K8 - Support Quirks
Thanks for the update ...
Re: USPS January 17 2016 K8 - Support Quirks
Is there a GitHub for the USPS shipping method? I've found a bunch of PHP Notices being generated on current versions of PHP.
Re: USPS January 17 2016 K8 - Support Quirks
7.2 throwing all sorts of warnings, not errors, but think it's easily fixable. ups, usps, paypal - some in admin and others in checkout. All Use of undefined constant where apostrophes need adding. Been chasing down this for my template and for testimonials on this site. Are you seeing this on any other php version?
Re: USPS January 17 2016 K8 - Support Quirks
Quote:
Originally Posted by
delia
7.2 throwing all sorts of warnings, not errors, but think it's easily fixable. ups, usps, paypal - some in admin and others in checkout. All Use of undefined constant where apostrophes need adding. Been chasing down this for my template and for testimonials on this site. Are you seeing this on any other php version?
I'm seeing various PHP notices on 7.1.4 on zc156c with Report All Errors set to enable those notices to be logged; these are from the checkout_shipping page, for instance:
Code:
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->extra_service() called at [C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php:321]
#2 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#3 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#4 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined variable: extraserviceinternational in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 2223.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 511.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 512.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 513.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined variable: cnt_dump in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 655.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined variable: cnt_dump in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 656.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 511.
[01-Aug-2019 15:05:07 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 512.
[01-Aug-2019 15:05:08 America/New_York] Request URI: /checkout, IP address: 127.0.0.1
#1 usps->quote() called at [C:\xampp\htdocs\test_store\includes\classes\shipping.php:168]
#2 shipping->quote() called at [C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php:187]
#3 require(C:\xampp\htdocs\test_store\includes\modules\pages\checkout_shipping\header_php.php) called at [C:\xampp\htdocs\test_store\index.php:36]
--> PHP Notice: Undefined index: FirstClassMailType in C:\xampp\htdocs\test_store\includes\modules\shipping\usps.php on line 513.
Re: USPS January 17 2016 K8 - Support Quirks
okay - that's worse! but here's an example I'm looking at
PHP Code:
[02-Aug-2019 12:19:08 UTC] Request URI: /products/index.php?main_page=checkout_shipping, IP address: 172.101.3.191
#1 paypalwpp->__construct() called at [/home/xxxx/public_html/products/includes/classes/payment.php:75]
#2 payment->__construct() called at [/home/xxx/public_html/products/includes/modules/pages/checkout_shipping/header_php.php:228]
#3 require(/home/xxx/public_html/products/includes/modules/pages/checkout_shipping/header_php.php) called at [/home/xxx/public_html/products/index.php:36]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALWPP_CHECKOUTSTYLE - assumed 'MODULE_PAYMENT_PAYPALWPP_CHECKOUTSTYLE' (this will throw an Error in a future version of PHP) in /home/matri14/public_html/products/includes/modules/payment/paypalwpp.php on line 185.
I didn't install this - it was 1.5.6a - updated files to 1.5.6c. No mods added. Shouldn't report all errors not be working here? Not lost just a bit bewildered.
Re: USPS January 17 2016 K8 - Support Quirks
That's coming from the PayPal Express Checkout (/includes/modules/payment/paypalwpp.php), not the usps shipping method. Previously reported in this Zen Cart GitHub issue.
Re: USPS January 17 2016 K8 - Support Quirks
Yeah, I stopped the USPS warning with my edits. So a known issue? I have good reason for not using 1.5.6 now.
Re: USPS January 17 2016 K8 - Support Quirks
So USPS module doesn't work with 1.5.6?