Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / USPS and UPS shipping module update

USPS and UPS shipping module update

Locked

Views: 26,934

Results 101 to 120 of 130
This thread is locked. New replies are disabled.
16 Mar 2010, 1:41 AM
#101
johnchazz avatar

johnchazz

New Zenner

Join Date:
Feb 2010
Location:
Tucson, AZ
Posts:
16
Plugin Contributions:
0

USPS and UPS shipping module update

I am using a clean install of the v1.3.8 version of Zen-Cart with the Cherry Zen template mod and a few other stable mods (incl. USPS/Shipping Insurance/Image Handler mods/CEON Back In Stock Notification).

Ever since I installed and configured the USPS mod through Admin, I get the following extra white space during checkout:

You will notice the price is on one line, right-justified, then a line break followed the shipping method left-justified. They should be on the same line and they are not.

In Firebug, I get the following HTML code, which I believe is coming from tpl_checkout_shipping_default.php?? I'm not sure if the line breaks between the price and the shipping type are coming from my stylesheet or from how the order of the shipping price and the shipping method are coded in my template file??

Can someone please assist? I've scoured the entire community forum and I can't find any other Cherry Zen zenner with the same issue??? I'm stumped.


<legend>United States Postal Service (1 x 2.40lbs) <img height="13" width="50" title=" United States Postal Service " alt="United States Postal Service" src="includes/templates/cherry_zen/images/icons/shipping_usps.gif"></legend> <div class="important forward">$18.10</div>

<input type="radio" id="ship-usps-EXPRESS" value="usps_EXPRESS" name="shipping"><label class="checkboxLabel" for="ship-usps-EXPRESS">Express Mail (1 - 2 days)</label>

<!--</div>--> <br class="clearBoth"> <div class="important forward">$5.70</div>

<input type="radio" id="ship-usps-PRIORITY" value="usps_PRIORITY" name="shipping"><label class="checkboxLabel" for="ship-usps-PRIORITY">Priority Mail (2 - 3 days)</label>

<!--</div>--> <br class="clearBoth"> <div class="important forward">$5.45</div>

<input type="radio" id="ship-usps-PARCEL" checked="checked" value="usps_PARCEL" name="shipping"><label class="checkboxLabel" for="ship-usps-PARCEL">Parcel Post (4 - 7 days)</label>

<!--</div>--> <br class="clearBoth"> </fieldset>
4 Apr 2010, 7:14 PM
#102
kehrli avatar

kehrli

Zen Follower

Join Date:
Aug 2007
Location:
Cannon Beach, OR
Posts:
180
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Ajeh:

This is where you need to customize your USPS shipping module ...

      //PRIORITY MAIL OPTIONS
      if ($key == 'PRIORITY'){
        $this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box
      }

This worked great for one of my stores, because I wanted the max price for Priority Mail to be the cost of a Small Flat Rate Box.

However, for another store, I need the max price to be a Large Flat Rate Box.  But using the 'Lg Flat Rate Box' option means that all orders, even small orders, get charged the Large Flat Rate Box price.  

Is there a way to have the lesser of the 2 prices show?

OR

Is there a way to have both the Large Flat Rate Box price AND the regular price (calculated from weight only) show?

That way if a small item, that should only cost $4.85 to ship, could be charged correctly, but large items can ship in the flat rate box.
4 Apr 2010, 7:26 PM
#103
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

Change the setting from being blank on the Priority to the method you want to use ...

4 Apr 2010, 8:39 PM
#104
kehrli avatar

kehrli

Zen Follower

Join Date:
Aug 2007
Location:
Cannon Beach, OR
Posts:
180
Plugin Contributions:
0

Re: USPS and UPS shipping module update

But if I choose 'Large Flat Rate Box', then small items that should cost $4.85 to ship, will be charged 13.95.

I need a way to get the lowest of the 2 prices. Or to show both options to the customer.

Is there a way to show both Priority Mail (without any Flat Rate Box) AND the Large Flat Rate Box option?

OR

To have the module select the lowest price of the 2?

4 Apr 2010, 9:07 PM
#105
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

Not without rewriting the code ...

The quote is only getting 1 rate at a time for that based on the setting ...

5 Apr 2010, 8:54 AM
#106
kehrli avatar

kehrli

Zen Follower

Join Date:
Aug 2007
Location:
Cannon Beach, OR
Posts:
180
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Thank you.

14 Apr 2010, 1:47 AM
#107
beckyb49 avatar

beckyb49

New Zenner

Join Date:
Jul 2008
Location:
Roswell, GA
Posts:
4
Plugin Contributions:
0

Re: USPS and UPS shipping module update

I am using Version 1.3.8a for Zen Cart. The only change I made was removing the old module and trying to install the new one. The new one didn't work as I discribed, so I had to reinstall the old back on. Now shipping is hit and miss on the cart. I have lots of traffic on the site, but not a sale in months.

14 Apr 2010, 2:00 AM
#108
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

Could you be more specific about what did not work with the USPS January 4, 2010 shipping module? :unsure:

17 May 2010, 4:09 AM
#109
lissa8723 avatar

lissa8723

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Hello, Im on 1.3.8a and am trying to set up my usps shipping.
I have marked for domestic first class and media mail and first class just refuses to add itself on my shipping estimator.
Which is why i have media mail up too.
I have a product called test that weighs 1oz and no matter what first class will not come on the shipping estimator.
So i have media mail in its place at the moment but even media mail is too high at $3.55 for a 1oz package.
I have tried changing the php from lbs to oz. putting the decimal 0.01 for oz and the 1 oz.

Any help would be appreciated...

here is a link so you can see what im talking about.
Thanks a bunch :)

25 Jul 2010, 11:17 PM
#111
puppypaw avatar

puppypaw

New Zenner

Join Date:
Feb 2010
Posts:
1
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Hello I updated to the new USPS file for the new rates since we were still on the old one.

I did a REMOVE, INSTALL, EDIT and for some reason it is now using updated rates.

Any suggestions?

25 Jul 2010, 11:25 PM
#112
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: USPS and UPS shipping module update

@puppy
Could you hit reply, answer some of the pertinent posting tips, and tell us (a little better) what seems to be the problem?

1 Aug 2010, 2:01 AM
#113
spembleton avatar

spembleton

Zen Follower

Join Date:
Jun 2010
Location:
Holland, MI
Posts:
232
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Ajeh:

This is where you need to customize your USPS shipping module ...

,,, }
[/CODE]

And these will get results such as:

But you need to customize it for your shop ...

I have been reading everything in this thread for hours, trying everythink anyone suggested, but I cannot get my site to show Small Flat Rate Box. All I get is Priority mail, which is slightly higher in cost.

I am using 1.3.9d, I did a clean install. My usps.php file has the lines of text that you stated, bu I still cannot get the Flat rate option.

Any ideas?

1 Aug 2010, 2:29 AM
#114
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

Edit the file:
/includes/modules/shipping/usps.php

And see what setting is used for:

          //PRIORITY MAIL OPTIONS
          if ($key == 'PRIORITY'){
            $this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box

          }

This controls which one is used for the Priority shipping ...

1 Aug 2010, 2:36 AM
#115
spembleton avatar

spembleton

Zen Follower

Join Date:
Jun 2010
Location:
Holland, MI
Posts:
232
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Here is what my file shows now:

//PRIORITY MAIL OPTIONS
if ($key == 'PRIORITY'){
$this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box

Is that not what you also posted. Sorry if I am not understanding.

1 Aug 2010, 2:41 AM
#116
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

What I am saying is if you want to ensure that ALL of the Priority Mail is:
Sm Flat Rate Box

Then change the code to read:

$this->container = 'Sm Flat Rate Box'; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box

If you want to ensure that ALL of the Priority Mail is:
Lg Flat Rate Box

Then change the code to read:

$this->container = 'Lg Flat Rate Box'; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box
1 Aug 2010, 2:42 AM
#117
spembleton avatar

spembleton

Zen Follower

Join Date:
Jun 2010
Location:
Holland, MI
Posts:
232
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Duh - I finally understand. Thanks!! It worked. I have to put the service I want between the 2 single quotes!

1 Aug 2010, 2:44 AM
#118
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS and UPS shipping module update

Thanks for the update that this works for you ... :smile:

1 Aug 2010, 11:35 PM
#119
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: USPS and UPS shipping module update

Got this email a couple of days ago. Anything here that is going to require a new version of the shipping module?

Valued Web Tools Customer;
There are several important changes occurring in the coming months for the Customs Forms and International APIs. Please read the following notice in its entirety.

  1. Please reference the June 17, 2010 edition of the USPS Postal Bulletin (http://www.usps.com/cpim/ftp/bulletin/pb2010.htm) for a valid index of countries and localities. Effective August 2, 2010, integrators of the following APIs may receive an error response if requests are made to the API with values other than those on the USPS Postal Bulletin list:
  • IntlRate
  • ExpressMailIntl
  • PriorityMailIntl
  • FirstClassMailIntl
  • CustomsCN22*
  • CustomsCN22V2
  • CustomsCP72V2*
  • CustomsCP72V3
  • CustomsCN22 and CustomsCP72V2 are out-dated and will be retired on September 26, 2010 and January 2, 2011, respectively (see below).
  1. Effective September 26, 2010, the Customs Form 2976/CN22 API (CustomsCN22) will be retired. Requests made to this API will result in an error response. A new version of the API, CustomsCN22V2, is currently available for use. Detailed technical specifications for this API can be found at http://www.usps.com/webtools/technical.htm under Online Customs Forms.

  2. Effective September 26, 2010, the Customs Form 2976/CN22 API (CustomsCN22V2) will undergo several changes. Most significantly, the label image will change in the following ways to satisfy USPS and US Census Bureau regulations:

  • A second “Post Office” copy will be added to the bottom portion of the label. This area was blank in the past;

  • An “Exemption and Exclusion Legend” box will be added to the label;

  • The dimensions of the “Shipping Label” and “Customer Copy” will change slightly relative to each other, though the overall dimensions will remain the same;

  • A “Merchandise” checkbox will be added;

  • Instructions, certification and Privacy Act text on the second page will be modified.
    Changes to the XML schema will be made to enforce several restrictions and add several optional fields. New XML tags will be optional and updated specifications will be published at http://www.usps.com/webtools/technical.htm when the changes are available in the Web Tools production environment:

  • <GrossPounds> plus <GrossOunces> cannot exceed 4 pounds, unless addressed to an APO/FPO/DPO or US Possession, Territory or Freely Associated State;

  • The sum of <NetPounds> and <NetOunces> values cannot exceed 4 pounds, unless addressed to an APO/FPO/DPO or US Possession, Territory or Freely Associated State;

  • The sum of <NetValue> values cannot exceed 400, unless addressed to an APO/FPO/DPO or US Possession, Territory or Freely Associated State;

  • An <EELPFC> tag to allow input of an “Exemption and Exclusion Legend” to satisfy US Census Bureau regulations;

  • A “MERCHANDISE” enumeration in the <ContentType> tag;

  • An optional <ContentTypeOther> tag for use when <ContentType> = “OTHER”

  • Up to 5 items in the <ItemDetail> group;

  • An optional <HSTariffNumber> tag in the <ItemDetail> group to allow an HS Tariff Number to be input for each of up to 5 items;

  • An optional tag to specify Ship Date;

  • Changes in the <MailClass> enumerations;

  • An optional tag to specify a US Possession, Territory or Freely Associated State destination ZIP Code.

  1. Effective January 2, 2011, the Customs Form 2976-A/CP72 API (CustomsCP72V2) will be retired. Requests made to this API will result in an error response. A new version of the API, CustomsCP72V3, is currently available for use. Detailed technical specifications for this API can be found at http://www.usps.com/webtools/technical.htm under Online Customs Forms.
24 Sep 2010, 8:07 PM
#120
dtakle avatar

dtakle

New Zenner

Join Date:
Nov 2006
Location:
Pasadena, CA
Posts:
17
Plugin Contributions:
0

Re: USPS and UPS shipping module update

supersnow:

... when I choose an international address I get: -2147218052 - The ounces field must be less than 5 digits ....

I found the problem.
See your /includes/modules/shipping/usps.php
there is a line that is supposed to prevent this, but it does not work. It tries to round ounces to 3 decimal places. We have no use for fractions of an ounce, so I rounded it up. It will probably also work if you change the rounding to 2 places instead of 3.

// usps currently cannot handle more than 5 digits on international
//    $shipping_ounces = zen_round($shipping_ounces, 3);   // original code 09-24-2010
$shipping_ounces = ceil($shipping_ounces);   // new code 09-24-2010