If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Shipping Modules / ups has a deprecated constructor

ups has a deprecated constructor

Started by cpt_tom on 31 Dec 2020, 6:33 PM · Views: 1,887

Results 1 to 4 of 4
31 Dec 2020, 6:33 PM
#1
cpt_tom avatar

cpt_tom

New Zenner

Join Date:
Aug 2012
Location:
Corning, NY
Posts:
8
Plugin Contributions:
0

Post #1 by cpt_tom

Getting this error in my logs...Things still working, but I guess that UPS module has some update needed....Is there anyway to keep this from logging until there is an update?

[31-Dec-2020 17:42:12 UTC] Request URI: /index.php?main_page=checkout_shipping, IP address:
#1 include_once() called at [/home4/X/public_html/store/includes/classes/shipping.php:67]
#2 shipping->__construct() called at [/home4/X/public_html/store/includes/modules/pages/checkout_shipping/header_php.php:101]
#3 require(/home4/bearsta1/public_html/store/includes/modules/pages/checkout_shipping/header_php.php) called at [/home4/X/public_html/store/index.php:35]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ups has a deprecated constructor in /home4/bearsta1/public_html/store/includes/modules/shipping/ups.php on line 13.

Server Information

Server Host: .justhost.com ()
Database: X_zc4
Server OS: Linux 3.10.0-693.11.6.1.ELK.el6.x86_64
Server Date: 12/31/2020 18:29:14
Server Up Time: 18:29:14 up 1072 days, 11:20, 1 user, load average: 0.00, 0.00, 0.00
HTTP Server: Apache
PHP Version: 7.4.13 (Zend: 3.4.0)
PHP File Uploads: On
Upload Max Size: 256M
PHP Memory Limit: 256M
POST Max Size: 260M
Database Engine: MySQL 5.6.41-84.1
Database Host: localhost (127.0.0.1)
Database Date: 12/31/2020 18:29:14
Database Data Size: 2,801 kB
Database Index Size: 842 kB
MySQL Slow Query Log Status: On
MySQL Slow Query Log File: /var/log/slow-queries.log
MySQL Mode: NO_ENGINE_SUBSTITUTION

31 Dec 2020, 6:51 PM
#2
cpt_tom avatar

cpt_tom

New Zenner

Join Date:
Aug 2012
Location:
Corning, NY
Posts:
8
Plugin Contributions:
0

Post #2 by cpt_tom

Actually, UPS Module is not working...from the Check out Shipping Method:

We are unable to obtain a rate quote for UPS shipping.
Please contact the store if no other alternative is shown.

31 Dec 2020, 7:41 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

The old UPS module you're referring to hasn't been "built in" to Zen Cart for a very very long time. It is probably quite outdated.

Lat9's suggestion is a solid one.

If you use the UPS XML module, then you should delete the old UPS module you currently have. It's comprised of two files: /includes/modules/shipping/ups.php and /includes/languages/english/modules/shipping/ups.php

Alternatively you could "try" editing the /includes/modules/shipping/ups.php file and find the "function ups()" line (comes not far after "class ups()"), and change "function ups(" to "function __construct(". Note the double-underscore. This might buy you time until you can install the UPS XML mod. But again, the old module might require other changes as well, so the UPS XML module is a better choice.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.