Zen Cart Logo
Forums / Addon Shipping Modules / Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

Views: 2,357

Results 1 to 10 of 10
7 Sep 2012, 7:14 PM
#1
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

Greetings,

I am trying to offer my international customers Priority Mail Int Lrg Video shipping option, but want to limit it to under 2 lbs. for the weight since the box isn't very large. I have tried this code, but when I tested an address from India it just showed me my other 3 options express, priority, exp guaranteed.

Does anyone know what is wrong / if this can or can't be done? Thanks in advanced!
https://www.heteromorphic.com/zencart

      // BOF: UPS USPS
      $title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
      if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type];

/*
$methods[] = array('id' => $type,
'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
*/
if ($type == 'Priority Mail Int Lrg Video' && $shipping_weight >= 2) {
// skip Priority Mail Int Lrg Video on >= 2
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}

Thanks!

7 Sep 2012, 8:39 PM
#2
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

oh also, my shipping estimator under the cart is duplicating all options showing them all twice in a row?

7 Sep 2012, 9:10 PM
#3
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

I also tried the code with the full name of 'Priority Mail International Large Video Flat Rate Box**' too with no luck :(

7 Sep 2012, 9:26 PM
#4
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

OK... I took out the restriction just to see if it would even quote that option, and it doesn't show up at all?
Anyone aware of this issue?
I have it checked under my shipping choices and have all my tares set to 0:0

Any help greatly appreciated!

7 Sep 2012, 10:35 PM
#5
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

Can't help with your code but, In case you didn't know it, the Large Video 1096L box ships using International Small Flat Rate labels and the Small Flat International postage rate. The doesn't apply to domestic, just International.

**This USPS module **will allow you to sort by weight or by volume. I use the volumes for all the flatrate boxes and modify the plain Priority Mail choice for the volume of the Large Video 1096L box for domestic and international.

Since the module has not been updated, there is a glitch with USPS FirstClass International. The USPS changed the word package to parcel or parcel to package (cant remember which way) and that change caused first class international to break. Regional C FR boxes are not included either.

7 Sep 2012, 11:06 PM
#6
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

Thanks! I have enabled the small flat rate to check and it appears to work w/the module I have. I have USPS RateV3 (January 22, 2012) - does the link above have a newer version than that / should I still update? Thanks!

7 Sep 2012, 11:12 PM
#7
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

The link is a totally different version for USPS calculations and is not supported like the RateV3 version.

It has made our shipping life much easier by filtering (removing) options presented to the customer when the specific items in their cart will not physically fit within the box or class.

7 Sep 2012, 11:16 PM
#8
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

OK... the code worked for the small flat rate box except it's still showing duplicates of both options so only ONE line disappears when I go over 2 lbs. Does anyone know why the options are duplicating and only one appears to be working properly?

If you go here and add to cart: http://heteromorphic.com/zencart/index.php?main_page=product_info&products_id=762
that will be under 2 lbs. and you will see option for International Flat rate (pick any country on dropdown but US)

Then add another product over 2 lbs to cart: http://heteromorphic.com/zencart/index.php?main_page=product_info&products_id=769

and only one of the flat rate box disappears?

Any help greatly appreciated! :smile:

7 Sep 2012, 11:45 PM
#9
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

WOW, you're fast. I've never seen anyone go through the setup on that USPS module in that short a time span.

Did you set it up to filter by weight, volume or neither? I've never used the "filter by weight" so probably won't be much help if thats what you're using.

Did you install the sql patch?

Did you remove the original USPS shipping files?

I am not a coder so can only offer minimal advice.

When I add the first item to my cart, select Australia, no shipping quotes appear.

8 Sep 2012, 12:05 AM
#10
heteromorphic avatar

heteromorphic

New Zenner

Join Date:
Jul 2012
Posts:
60
Plugin Contributions:
0

Re: Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option

yeah, I couldn't get it to work so I reinstalled the other one for now since I have limited time right now to play w/it... but thanks b/c now I know that I can at least use the small flat rate option for the same price to my customers :)