Forums / Built-in Shipping and Payment Modules / USPS 1st class not turning off...

USPS 1st class not turning off...

Views: 778

Results 1 to 5 of 5
21 Sep 2012, 3:34 PM
#1
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

USPS 1st class not turning off...

For some reason items with a weight over 0.5lbs are going through with first class as the shipping option.
We have to eat the shipping cost to upgrade to priority since USPS only allows first class packages to be 8oz or less.

I should be able to turn off first class using a simple check like:

if($shipping_weight > 0.5) { turn off first class };

just not sure what code to use to turn off the first class option or where I should place it...

21 Sep 2012, 5:06 PM
#2
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

Re: USPS 1st class not turning off...

Ok I think I figured it out but would love some confirmation....

at line 553 of USPS.php

// BOF: UPS USPS
      // bof add in first class check
          if ($shipping_weight > 0.5) {$domestic_types= (EXPRESS, PRIORITY);}
		else {$domestic_types=MODULE_SHIPPING_USPS_TYPES;}
	  $allowed_types = explode(", ", $domestic_types);
          //$allowed_types = explode(", ", MODULE_SHIPPING_USPS_TYPES);
21 Sep 2012, 5:32 PM
#3
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

Re: USPS 1st class not turning off...

well that check did not work... but it all becomes a mute point! Our shipping program just updated and it is allowing first class parcel up to 0.8lb, as it should have before.

23 Sep 2012, 2:54 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS 1st class not turning off...

The $shipping_weight is not available to you, where you are checking it so it evaluates as 0 ...

Above the IF in your code, add:

global $shipping_weight;

See if that doesn't work for you, to get this working the way you need it to ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2012, 2:55 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS 1st class not turning off...

NOTE: I am not seeing the 8oz limit you refer to on the USPS site:
https://www.usps.com/send/first-class.htm

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!