USPS - multiple of same item does not increase shipping weight

Posts: 19
Joined: 12/19/2007

Just to start... I can replicate this on my site every time.

I am using the latest bazaar code after noticing this issue earlier today. The only shipping module I have installed is USPS.

Essentially here is what is happening.

- If I add an item to my cart, then increase the quantity to 2 or more, the shipping weight does not multiply. So for instance assuming ITEM A weighs 1 pound, and I have a quantity of 3 the calculated shipping weight is 1 pound. (according to the debug info)

however

- If I add an additional unique item to the cart, all weights are correctly calculated. For instance. ITEM B weighs 1 pound. If cart contains a quantity of 2 ITEM A and 1 ITEM B, the calculated weight is 3 pounds. (according to debug info)

I couldn't find any information regarding this, I'm hoping I'm not the only one...

If you would like to try it yourself to compare to the USPS calculator you can go here http://chuckpalahniuk.net/store use "shirts", since those are the only items ubercart ships for us. FYI I do have a markup of $2, but even when disabled I still get this problem. Origin is 90034 destination is 60140

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

How long ago did you update the code from Bazaar? I put some code in that addresses this issue earlier this week. At least, I thought it fixed it. Do bzr update from the ubercart directory and see if the usps module changes.

Posts: 19
Joined: 12/19/2007

I'll give it a shot tonight and report back. The bazaar code was dated the 19th, IIRC.

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

Yeah, the commit I was thinking of was put in on the 23rd.

Posts: 6
Joined: 01/14/2008

Do you know when it will be added to a release?

Thanks

Posts: 19
Joined: 12/19/2007

OK, I've verified that I have the June 23 module. However, the issue persists.

One thing I'm not clear on is update.php doesn't show the module as having any available updates... Is there something I should do there?

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

Is this line in uc_usps.module?

<?php
   
for ($i = 0; $i < $qty; $i++) {
?>

If it is, I might have to see the XML generated in the debug output. There's a setting in Shipping quotes to turn that on.

Posts: 19
Joined: 12/19/2007

That line is in there, without the php tags, or course. Here is the XML, this order has 2 of the same items, which weigh 8 ounces.

<?xml version="1.0"?>
<RateV3Response>
    <Package ID="0">
    <ZipOrigination>90034</ZipOrigination>
    <ZipDestination>60140</ZipDestination>
    <Pounds>0</Pounds>
    <Ounces>8.0</Ounces>
    <Size>REGULAR</Size>
    <Machinable>FALSE</Machinable>
    <Zone>7</Zone>
        <Postage CLASSID="23">
            <MailService>Express Mail Sunday/Holiday Guarantee</MailService>
            <Rate>31.75</Rate>
        </Postage>
        <Postage CLASSID="25">
            <MailService>Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee</MailService>
            <Rate>29.00</Rate>
        </Postage>
        <Postage CLASSID="2">
            <MailService>Express Mail Hold For Pickup</MailService>
            <Rate>19.25</Rate>
        </Postage>
        <Postage CLASSID="27">
            <MailService>Express Mail Flat-Rate Envelope Hold For Pickup</MailService>
            <Rate>16.50</Rate>
        </Postage>
        <Postage CLASSID="3">
            <MailService>Express Mail</MailService>
            <Rate>19.25</Rate>
        </Postage>
        <Postage CLASSID="13">
            <MailService>Express Mail Flat-Rate Envelope</MailService>
            <Rate>16.50</Rate>
        </Postage>
        <Postage CLASSID="1">
            <MailService>Priority Mail</MailService>
            <Rate>4.80</Rate>
        </Postage>
        <Postage CLASSID="16">
            <MailService>Priority Mail Flat-Rate Envelope</MailService>
            <Rate>4.80</Rate>
        </Postage>
        <Postage CLASSID="17">
            <MailService>Priority Mail Flat-Rate Box</MailService>
            <Rate>9.80</Rate>
        </Postage>
        <Postage CLASSID="22">
            <MailService>Priority Mail Large Flat-Rate Box</MailService>
            <Rate>12.95</Rate>
        </Postage>
        <Postage CLASSID="0">
            <MailService>First-Class Mail Flat</MailService>
            <Rate>2.36</Rate>
        </Postage>
        <Postage CLASSID="0">
            <MailService>First-Class Mail Parcel</MailService>
            <Rate>2.36</Rate>
        </Postage>
        <Postage CLASSID="4">
            <MailService>Parcel Post</MailService>
            <Rate>8.25</Rate>
        </Postage>
        <Postage CLASSID="5">
            <MailService>Bound Printed Matter</MailService>
            <Rate>2.51</Rate>
        </Postage>
        <Postage CLASSID="6">
            <MailService>Media Mail</MailService>
            <Rate>2.23</Rate>
        </Postage>
        <Postage CLASSID="7">
            <MailService>Library Mail</MailService>
            <Rate>2.12</Rate>
        </Postage>
    </Package>
</RateV3Response>

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

It came to my attention today that the Bazaar repository might not have been updated as well as it should. Try getting the latest code again.

Posts: 19
Joined: 12/19/2007

I'm still kind of new to bazaar, but I'm not seeing any updates to the code. Does it take a while to post?

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

No more than an hour, generally. http://bazaar.ubercart.org/drupal5/ubercart/shipping/uc_usps/uc_usps.mod... looks like it should, to me.

Posts: 19
Joined: 12/19/2007

Just because I'm curious... http://bazaar.ubercart.org/drupal5/ubercart/shipping/uc_usps/ still shows the most recent update as the 23rd.

Either way, the issue still persists. Sad

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

I don't know what to tell you, then. I've gotten it to work with that exact file. For two identical products with a pkg_qty of 1, you should get two packages.

AttachmentSize
two_packages.xml4.01 KB
Posts: 19
Joined: 12/19/2007

OK, comparing your XML to mine, the difference seems to be that you have a Package ID=0 and Package ID=1

I only have Package ID=0

Is there perhaps something I need to change in my store config to get that to happen?

I went to admin/store/settings/quotes/methods/usps and changed Product Packages from "all in one" to "each in it's own", but that didn't seem to change anything.