Hi,
I've had a weird problem with the USPS shipping module ever since I started using ubercart in alpha 8e; it still doesn't work in Beta 4.
The values that ubercart reports for First-Class Mail don't match the XML provided by the post office; they are ridiculously high!
I figured out that this is happening because ubercart gets three quotes for first class (CLASSID=0), but the code seems to assume one quote per CLASSID. So ubercart is mistakenly adding all of the first-class quotes together!
For example, I have a markup of $.75 on all my shipments; a 3oz item costs $1.47 to ship + .75 markup = $2.22. Ubercart should return $2.22 for a first-class parcel. Instead it adds up the quotes for first-class ($1.67), first-class ($2.22) and first-class parcel ($2.22) to give a quote of $6.11!
I would be happy to fix this myself but I've just spent a fair amount of time staring at the source code and can't figure out where this is happening. If someone can fix the issue or point me in the right direction, I'd really appreciate it.
Here is the actual XML and results:
<?xml version="1.0"?>
<RateV3Response><Package ID="0"><ZipOrigination>85711</ZipOrigination><ZipDestination>85711</ZipDestination><Pounds>0</Pounds><Ounces>3.0</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1, local</Zone><Postage CLASSID="2"><MailService>Express Mail PO to PO</MailService><Rate>13.85</Rate></Postage><Postage CLASSID="3"><MailService>Express Mail</MailService><Rate>16.25</Rate></Postage><Postage CLASSID="13"><MailService>Express Mail Flat-Rate Envelope</MailService><Rate>16.25</Rate></Postage><Postage CLASSID="1"><MailService>Priority Mail</MailService><Rate>4.60</Rate></Postage><Postage CLASSID="16"><MailService>Priority Mail Flat-Rate Envelope</MailService><Rate>4.60</Rate></Postage><Postage CLASSID="17"><MailService>Priority Mail Flat-Rate Box</MailService><Rate>8.95</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail</MailService><Rate>0.92</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail Flat</MailService><Rate>1.47</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail Parcel</MailService><Rate>1.47</Rate></Postage><Postage CLASSID="4"><MailService>Parcel Post</MailService><Rate>6.29</Rate></Postage><Postage CLASSID="5"><MailService>Bound Printed Matter</MailService><Rate>2.12</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail</MailService><Rate>2.13</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail</MailService><Rate>2.02</Rate></Postage></Package></RateV3Response>
U.S.P.S. Priority Mail: $5.35
U.S.P.S. First-Class Mail Parcel: $6.11
U.S.P.S. Parcel Post: $7.04





Joined: 01/31/2008