Zen Cart 1.5.5f
Database Patch Level: 1.5.5
Database: MySQL 5.6.41-84.1
PHP Version: 5.6.37 (Zend: 2.6.0)
The Shipping Estimator stopped showing actual estimates. I have UPS enabled and has been working this whole time.
Nothing on Error log.
Printable View
Zen Cart 1.5.5f
Database Patch Level: 1.5.5
Database: MySQL 5.6.41-84.1
PHP Version: 5.6.37 (Zend: 2.6.0)
The Shipping Estimator stopped showing actual estimates. I have UPS enabled and has been working this whole time.
Nothing on Error log.
"known" issue, need to modify the method of communication from the software to UPS to include possibly https:, ssl: and port 443, or other corrections. There is a thread here I believe something like UPS shipping estimates stopped January (don't recall the date but it was in the last 7 days). The change is done in the includes/modules/shipping/ups.php module. possibly look for ups.com and update as appropriate.
That would be this post: https://www.zen-cart.com/showthread....January-5-2019
Thank you for the swift reply!
I made the changes to old UPS module -> No luck
Updated the UPS module to newest -> No luck
Free Shipping or Store pick up options always seem to show up properly. Tried a trial FedEX module and it wouldn't show up either.
May be I need to update 1.5.5f to 1.5.6a?
Thanks, yes that was it.
If the module was updated, it may still need to have the change described above applied after that update. While for other reasons should update to 1.5.6a, it is not expected to be the source of this issue.
The new ups.php file in modules was significantly different from the old one. The new one did not have any references to ports. It has:
Above is the only reference to 'https' and no references to any ports.Code:if (!isset($this->_upsActionCode)) $this->_upsActionCode = '4';
$host = 'https://www.ups.com/using/services/rave/qcostcgi.cgi?';
$request = implode('&', array('accept_UPS_license_agreement=yes',
'10_action=' . $this->_upsActionCode,
'13_product=' . $this->_upsProductCode,
'14_origCountry=' . $this->_upsOriginCountryCode,
'15_origPostal=' . $this->_upsOriginPostalCode,
'19_destPostal=' . $this->_upsDestPostalCode,
'22_destCountry=' . $this->_upsDestCountryCode,
'23_weight=' . $this->_upsPackageWeight,
'47_rate_chart=' . $this->_upsRateCode,
'48_container=' . $this->_upsContainerCode,
'49_residential=' . $this->_upsResComCode));
$url = $host . $request;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Zen Cart quote inquiry');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$error = curl_error($ch);
This module update came out two days ago, Jan 8th.
Would suggest clearing your cache and cookie (or trying the process using a different browser so that a new session might be started.)
Good to know about the update including the change. I wasn't aware.
this module is now using curl. and my guess is you have a curl error.
when using curl with UPS and/or Fedex i like to log everything. that way if there is a problem you can see the last transaction in the log. i would modify your code as such:
we have now established a var called $ups_log that should have the last transaction for every curl call made in your code. it resides in your logs directory.PHP Code:
if (!isset($this->_upsActionCode)) $this->_upsActionCode = '4';
$ups_log = fopen(DIR_FS_LOGS . '/ups_error.log', 'w');
$host = 'https://www.ups.com/using/services/rave/qcostcgi.cgi?';
$request = implode('&', array('accept_UPS_license_agreement=yes',
'10_action=' . $this->_upsActionCode,
'13_product=' . $this->_upsProductCode,
'14_origCountry=' . $this->_upsOriginCountryCode,
'15_origPostal=' . $this->_upsOriginPostalCode,
'19_destPostal=' . $this->_upsDestPostalCode,
'22_destCountry=' . $this->_upsDestCountryCode,
'23_weight=' . $this->_upsPackageWeight,
'47_rate_chart=' . $this->_upsRateCode,
'48_container=' . $this->_upsContainerCode,
'49_residential=' . $this->_upsResComCode));
$url = $host . $request;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Zen Cart quote inquiry');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_STDERR, $ups_log);
$response = curl_exec($ch);
$error = curl_error($ch);
we have upped the logging to verbose, so that we can see everything. and we are sending the standard output for the curl call to the $ups_log.
i have not looked at this code before, so i'm not sure what it does with the $error; i can only assume something, that should point us to any potential errors with this call.
but in my experience debugging common carrier curl calls, this is the easiest way to figure out what is going on. and the beauty is that only the last transaction is stored..... we could change that but this is sufficient for my debugging.
you can try a transaction and post the contents of the ups_error.log. if it has any 'sensitive' information, i would modify it accordingly.
good luck.