i'm assuming the IF/ELSE condition is failing, which is why the "ELSE" portion of your code is executing despite what your shipping weight is.
Looking at the defined types of shipping for the USPS version of the module you're using, looks like the exact string passed to the $type variable when selecting small flat rate int box should be... 'Priority Mail International Small Flat Rate Box**'
If that doesn't work, it might also be... 'Priority Mail Int Flat Rate Small Box'
The reason is because here is the array of shipment types as defined in the code of the USPS version that you're using...
Code:
$this->intl_types = array(
'Global Express' => 'Global Express Guaranteed (GXG)**', // ID="4"
'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular', // ID="6"
'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular', // ID="7"
'USPS GXG Envelopes' => 'USPS GXG Envelopes**', // ID="12"
'Express Mail Int' => 'Express Mail International', // ID="1"
'Express Mail Int Flat Rate Box' => 'Express Mail International Flat Rate Boxes', // ID="26"
'Express Mail Int Flat Rate Env' => 'Express Mail International Flat Rate Envelope', // ID="10"
'Express Mail Int Legal' => 'Express Mail International Legal Flat Rate Envelope', // ID="17"
'Priority Mail International' => 'Priority Mail International', // ID="2"
'Priority Mail Int Flat Rate Lrg Box' => 'Priority Mail International Large Flat Rate Box', // ID="11"
'Priority Mail Int Flat Rate Med Box' => 'Priority Mail International Medium Flat Rate Box', // ID="9"
'Priority Mail Int Flat Rate Small Box' => 'Priority Mail International Small Flat Rate Box**', // ID="16"
'Priority Mail Int DVD' => 'Priority Mail International DVD Flat Rate Box**', // ID="24"
'Priority Mail Int Lrg Video' => 'Priority Mail International Large Video Flat Rate Box**', // ID="25"
'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope**', // ID="8"
'Priority Mail Int Legal Flat Rate Env' => 'Priority Mail International Legal Flat Rate Envelope**', // ID="22"
'Priority Mail Int Padded Flat Rate Env' => 'Priority Mail International Padded Flat Rate Envelope**', // ID="23"
'Priority Mail Int Gift Card Flat Rate Env' => 'Priority Mail International Gift Card Flat Rate Envelope**', // ID=18
'Priority Mail Int Small Flat Rate Env' => 'Priority Mail International Small Flat Rate Envelope**', // ID="20"
'Priority Mail Int Window Flat Rate Env' => 'Priority Mail International Window Flat Rate Envelope**', // ID=19
'First Class Mail Int Parcel' => 'First-Class Mail International Parcel**', // ID="15" Changed Package to Parcel
'First Class Mail Int Lrg Env' => 'First-Class Mail International Large Envelope**', // ID="14"
'First Class Mail Int Letter' => 'First-Class Mail International Letter**' // ID="13"
);
I think the string you're trying to match in the IF statement ('Priority Mail International Small Flat Rate Box') is from older code and that string value has been changed by USPS since then.
Bookmarks