VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Shipping VM 1.1 => UPS VM 1 => Topic started by: MadDawg on November 28, 2008, 01:05:53 AM

Title: Help with error: Undefined variable: shipment on line 280
Post by: MadDawg on November 28, 2008, 01:05:53 AM

Hi Guys I would appreciate some advice on how to get the Ups module
working I keep getting this error message my key and account info is correct
Any help would be appreciated
Thanx

Notice: Undefined variable: shipment in /var/www/vhosts/ubnt.ca/httpdocs/administrator/components/com_virtuemart/classes/shipping/ups.php on line 280
Title: Re: Help with error: Undefined variable: shipment on line 280
Post by: lowmips on December 08, 2008, 16:58:00 PM
Does this stop the checkout process altogether? Or is it just a warning?
It looks like you may have debug messages set to a higher level than normal (a PHP global setting).

Basically what is happening is that no rates have been returned, therefore not setting the variable $shipments, which in your case causes a notice to be displayed due to your PHP settings.

If you wanted, you could try changing the error reporting level via a error_reporting call.  You could put it somewhere at the top of the ups.php file
http://us.php.net/error_reporting


for example, around line 26:


...

* UPS OnLine(R) is a registered trademark of United Parcel Service of America.
*
*/

// Turn off all error reporting
error_reporting(0);
class ups {

...


This would turn off ALL error reporting.

Hope this helps,
Reggie
Title: Re: Help with error: Undefined variable: shipment on line 280
Post by: lowmips on December 08, 2008, 17:08:51 PM
Also, check your php.ini file. This is where the global PHP error reporting setting resides.  Mine is currently:

error_reporting = E_ERROR