1. ## Re: USPS Web Tools Price Change Updates 2012

Originally Posted by lat9
Happy to help, DivaVocals. I'm assuming that you figured out that you set X to your lower value and Y to your higher value (in ounces).
Yep.. Got it all worked out.. My client is pretty stoked!! Thank you again sooooo much!!! The only downside I can see in using this simple method to determine the box size is on the occasion that the product is light in weight but bulky in terms of size.. So the wrong box may occasionally be selected.. But my client seems to think that this is a rare event and so she is okay with the occasional wrong box being selected.. Too bad USPS shipping doesn't support dimensional shipping calcs..

2. ## Re: USPS Web Tools Price Change Updates 2012

Originally Posted by lat9
Code:
```          //PRIORITY MAIL OPTIONS
if (\$key == 'PRIORITY'){
\$weight = \$this->pounds*16 + \$this->ounces;
if (\$weight <= X) {
\$this->container = 'Sm Flat Rate Box';
} elseif (\$weight > Y) {
\$this->container = 'Lg Flat Rate Box';
} else {
\$this->container = 'Md Flat Rate Box';
}
}```
Haven't tested it, but it "should" work ...
Sorry to be a PITA.. Can you guide me as to how I would incorporate the flat rate envelopes into this. This will allow my client to offer all flat rate options, and the lightest packages will get the flat rate envelope rates.

3. ## Re: USPS Web Tools Price Change Updates 2012

No pain ... assuming that your client wants to use the following "rules":

1) Z < X < Y and are all specified in ounces
2) If weight <= Z, use flat rate envelope
3) If weight > Z and <= X use sm flat rate box
4) If weight > X and <= Y use md flat rate box
5) Otherwise (weight > Y) use lg flat rate box

Code:
```//PRIORITY MAIL OPTIONS
if (\$key == 'PRIORITY'){
\$weight = \$this->pounds*16 + \$this->ounces;
if (\$weight <= Z) {
\$this->container = "Flat Rate Envelope";
} elseif (\$weight <= X) {
\$this->container = 'Sm Flat Rate Box';
} elseif (\$weight > Y) {
\$this->container = 'Lg Flat Rate Box';
} else {
\$this->container = 'Md Flat Rate Box';
}
}```

4. ## Re: USPS Web Tools Price Change Updates 2012

You are awesome!! I tired to figure this out on my own before posting my inquiry.. Now I see I needed another elseif statement.. Ahhhhhhhhhhh GOT IT!!! This should do the trick.. Thanks again!!!
Originally Posted by lat9
No pain ... assuming that your client wants to use the following "rules":

1) Z < X < Y and are all specified in ounces
2) If weight <= Z, use flat rate envelope
3) If weight > Z and <= X use sm flat rate box
4) If weight > X and <= Y use md flat rate box
5) Otherwise (weight > Y) use lg flat rate box

Code:
```//PRIORITY MAIL OPTIONS
if (\$key == 'PRIORITY'){
\$weight = \$this->pounds*16 + \$this->ounces;
if (\$weight <= Z) {
\$this->container = "Flat Rate Envelope";
} elseif (\$weight <= X) {
\$this->container = 'Sm Flat Rate Box';
} elseif (\$weight > Y) {
\$this->container = 'Lg Flat Rate Box';
} else {
\$this->container = 'Md Flat Rate Box';
}
}```

5. ## Re: USPS Web Tools Price Change Updates 2012

Just when I thought I got away clean.. I noticed that amongst the domestic Priority flat rate options for USPS that the Padded Envelopes and Legal Envelopes do not appear to be available.
 Padded Envelopes 12 1/2" x 9 1/2" Clothing Books Boxed Jewelry \$5.30 paid online or at the Post Office Legal Envelopes 9 1/2" x 15" Legal Documents \$5.30 paid online or at the Post Office

If I can indeed offer these options (Padded Envelopes or Legal Envelopes) what is the correct service name that I should use where the code says:
Code:
`\$this->container = "Flat Rate Envelope"; `
and YES I know we could use Flat Rate Small Box, but my client is ubber concerned about the \$0.05 "overcharge" to her customers. (Some customers do in fact "double check" the shipping costs again the USPS website.. They have/will make a HUGE stink if they think things don't "add up")

Finally one more thing.. Would anyone be willing the share the code I would need so that I need to support this:

My client has activated BOTH Priority Mail International, Priority Mail Int Padded Flat Rate Env for international. (I know... don't ask.. I already HAD this discussion about activating BOTH of these).

Here's the question: is there a way to limit the weight for the
Priority Mail Int Padded Flat Rate Env option so that if the order exceeds a particular weight, then this option is not offered?

Example: A customer selects Priority Mail Int Padded Flat Rate Env but purchased an item (or number of items) that can't fit into the package. How can the weight for JUST Priority Mail Int Padded Flat Rate Env be limited??
Last edited by DivaVocals; 7 May 2012 at 08:45 PM.

6. ## Re: USPS Web Tools Price Change Updates 2012

This one will do what you are asking if you can sort by product volume instead of weight. That's how we determine which USPS flatrate boxes an order will fit within. Once a box volume is exceeded, it is removed automatically from the choices shown to the customer.

USPS Shipping Module Update - RateV4 - IntlRateV2

There is one issue related to international firstclass that is easily fixed by changing the word package to parcel or viceversa (I don't remember which way I did it back in January)

We use 13 cubic inches as the max we will allow in a FR envelope

It also includes the Regional A & B flat rate boxes for options.

If this won't work, I'd bet that the code fragments that you need can be found in it.
Last edited by RixStix; 7 May 2012 at 10:51 PM.

7. ## Re: USPS Web Tools Price Change Updates 2012

Originally Posted by RixStix
This one will do what you are asking if you can sort by product volume instead of weight. That's how we determine which USPS flatrate boxes an order will fit within. Once a box volume is exceeded, it is removed automatically from the choices shown to the customer.

USPS Shipping Module Update - RateV4 - IntlRateV2

There is one issue related to international firstclass that is easily fixed by changing the word package to parcel or viceversa (I don't remember which way I did it back in January)

We use 13 cubic inches as the max we will allow in a FR envelope

It also includes the Regional A & B flat rate boxes for options.

If this won't work, I'd bet that the code fragments that you need can be found in it.
Thanks for this.. I'll take a look!!

Page 6 of 6 First ... 456

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
disjunctive-egg