Zen Cart Logo
Forums / Addon Shipping Modules / USPS Shipping Module [Support Thread]

USPS Shipping Module [Support Thread]

Sticky

Views: 77,355

Results 181 to 200 of 447
31 Oct 2022, 10:27 AM
#181
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

USPS Shipping Module [Support Thread]

@ChuckPhillips it's easy to change the $300 from a hardcoded number to a value in your Admin's Configuration screens. See

https://docs.zen-cart.com/dev/plugins/adding_config/

31 Oct 2022, 10:29 AM
#182
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

This is super rare but I have seen logs from K11d when $uspsQuote['Package'] is not set on line 539.

--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/CUST/public_html/includes/modules/shipping/usps.php on line 539.

31 Oct 2022, 3:53 PM
#183
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
367
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

swguy:

This is super rare but I have seen logs from K11d when $uspsQuote['Package'] is not set on line 539.

--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/CUST/public_html/includes/modules/shipping/usps.php on line 539.

Hi @swguy, I received the exact same warning last week. It might be due to the USPS API glitch?

I changed the nearby line

if ($this->is_us_shipment) {

To the following line

if ($this->is_us_shipment && $uspsQuote['Package']) {

And it seems working without generating new logs.

In the past, I only received warning regarding un-countable $uspsQuote['Package']['Service'] (for intl quote), not un-countable $uspsQuote['Package'] (for US domestic quote).

31 Oct 2022, 4:53 PM
#184
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

It might be due to the USPS API glitch?
Certainly could be. Let's sit tight until it starts happening with regularity.

28 Dec 2022, 3:13 AM
#185
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

usps 1st class won't show? i am using PHP version 7.4. and usps version is 2022-08-07 K11e.

I selected domestic first class letter, first class package retail, and priority mail, but only priority mail shows.
my product weight unit is oz. i tried 3oz, 9oz,.. etc but first class never show.

i registered and got use ID for the API, but i don't see anywhere to enter anything else. so the user ID (which looks something like 008XPRAV6385) is the only thing i've entered into the settings. i have entered my site URL for registration. I have not contacted USPS for permission like i've read somewhere. i just need to get the shipping cost. so i suppose i don't need to?

i've changed Tare from 0:3 to 10:0 and nothing changed.
i've changed Minimum Length to 0 from the default 8.625, and nothing changed.
i've changed 'Enable USPS First-Class filter' to false, and nothing changed.

this is my site: https://xtrava.us

btw, also if i use flat rate shipping on 1 item, then order with multiple products will all have the same flat rate. how do i change that?

thanks

28 Dec 2022, 12:42 PM
#186
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

gdtw:

usps 1st class won't show? i am using PHP version 7.4. and usps version is 2022-08-07 K11e.

I selected domestic first class letter, first class package retail, and priority mail, but only priority mail shows.
my product weight unit is oz. i tried 3oz, 9oz,.. etc but first class never show.

i registered and got use ID for the API, but i don't see anywhere to enter anything else. so the user ID (which looks something like 008XPRAV6385) is the only thing i've entered into the settings. i have entered my site URL for registration. I have not contacted USPS for permission like i've read somewhere. i just need to get the shipping cost. so i suppose i don't need to?

i've changed Tare from 0:3 to 10:0 and nothing changed.
i've changed Minimum Length to 0 from the default 8.625, and nothing changed.
i've changed 'Enable USPS First-Class filter' to false, and nothing changed.

this is my site: https://xtrava.us

btw, also if i use flat rate shipping on 1 item, then order with multiple products will all have the same flat rate. how do i change that?

thanks
See post #177 in this support thread for a possible solution, setting the Tare weights to 0:0.

The "Flat rate" shipping is, as you've noted, a flat rate for the entire order. You could use the "Per Item" method to assign a cost of shipping on a per-item basis.

28 Dec 2022, 3:46 PM
#187
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

See post #177 in this support thread for a possible solution, setting the Tare weights to 0:0.

The "Flat rate" shipping is, as you've noted, a flat rate for the entire order. You could use the "Per Item" method to assign a cost of shipping on a per-item basis.

setting Tare to 0:0 makes no difference for me..

28 Dec 2022, 9:20 PM
#188
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

What is the weight of the product(s) in question?

28 Dec 2022, 10:05 PM
#189
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

What is the weight of the product(s) in question?

tried 3oz, 6oz, 10oz

29 Dec 2022, 2:21 AM
#190
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

A screenshot of the site's current USPS configuration would help, too. Thanks for your patience.

29 Dec 2022, 3:07 AM
#191
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

A screenshot of the site's current USPS configuration would help, too. Thanks for your patience.

USPS Version Date
2022-08-07 K11e

Enable USPS Shipping
True

Full Name or Short Name
Long

Enter the USPS Web Tools User ID
008XTRXXX305

Which server to use
production

Quote Sort Order
Price-LowToHigh

Handling Fee - US
0

Handling Fee - International
0

Handling Per Order or Per Box
Box

Decimal Settings
2

Tax Class
Taxable Goods

Tax Basis
Shipping

Shipping Zone
--none--

Sort Order
0

All Packages are Machinable?
False

USPS Options
Display transit time

USPS Domestic Transit Time Calculation Mode
NEW

USPS Domestic minimum Length
8.625

USPS minimum Width
5.375

USPS minimum Height
1.625

USPS International minimum Length
8.625

USPS minimum Width
5.375

USPS minimum Height
1.625

Enable USPS First-Class filter for US shipping
False

Shipping Methods (Domestic and International)
First-Class Mail Letter, 0, .21875, 0.00, 0, .8125, 0.00, First-Class Package Service - RetailTM, 0, .8125, 0.00, 0, .9375, 0.00, 0, 70, 0.00, 0, 70, 0.00, Priority MailRM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 15, 0.00, 0, 20, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, .21875, 0.00, 0, 4, 0.00, 0, 4, 0.00, 0, 66, 0.00, 0, 4, 0.00, 0, 4, 0.00, 0, 20, 0.00, 0, 20, 0.00, 0, 66, 0.00, 0, 4, 0.00, 0, 70, 0.00, 0, 70, 0.00

Retail pricing or Online pricing?
Online

Debug Mode
Off

** i notice that it says "USPS expects you to use pounds as weight measure for your products." so i changed my product weight from 3 (oz) to 0.2.
still nothing has changed.

it also says "You will need to have registered an account with USPS at https://secure.shippingapis.com/registration/ to use this module" i register at usps.com site in "web tools". i received an email with user ID which i used.

3 Jan 2023, 6:06 PM
#192
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

any help? ^^

4 Jan 2023, 1:42 AM
#193
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

Look in Configuration :: Shipping/Packaging. What settings do you have for

Package Tare Small to Medium - added percentage:weight **and **Larger packages - added packaging percentage:weight

I'm betting that they're not set to 0:0 (which adds no weight to the value you've set for the products' weight).

4 Jan 2023, 8:10 PM
#194
gdtw avatar

gdtw

New Zenner

Join Date:
Mar 2018
Location:
atlanta
Posts:
10
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

Look in Configuration :: Shipping/Packaging. What settings do you have for

Package Tare Small to Medium - added percentage:weight **and **Larger packages - added packaging percentage:weight

I'm betting that they're not set to 0:0 (which adds no weight to the value you've set for the products' weight).

they are both 0:0

5 Jan 2023, 12:11 AM
#195
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

gdtw:

they are both 0:0
Turn on the USPS debug (to file) and then post (using the 'CODE' tag) the output. Something's (obviously) amiss with your setup, since it's working properly for me.

17 Jan 2023, 10:24 PM
#196
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

I've just learned that several USPS services are being discontinued as of January 22, 2023--Regional Rates A and B. Is that going to require any changes to the USPS shipping module? We use Regional Rate A more than anything else, so it's definitely going to have an impact on us and our customers.

20 Jan 2023, 5:00 PM
#197
spyderrobotics avatar

spyderrobotics

New Zenner

Join Date:
Oct 2007
Posts:
75
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

Something must have updated on the USPS side. When creating a shipment this morning the module is now reporting "-2147221202 - The element 'RateV4Request' has incomplete content. List of possible elements expected: 'RateClientType, Package'." I get the message with international packages using priority mail. Appears first class and priority domestic mail still functions.

20 Jan 2023, 5:27 PM
#198
spyderrobotics avatar

spyderrobotics

New Zenner

Join Date:
Oct 2007
Posts:
75
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

Here is the log file with my user info removed. Everything worked fine a couple of days ago.

2023-01-20 11:24:15: USPS build: 2022-08-07 K11e

Server: production
Quote Request Rate Type: Retail
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 1.63
Total Quote Weight: 1.63 Pounds: 1 Ounces: 11
Maximum: 100 Tare Rates: Small/Medium: 0:0 Large: 10:0
Handling method: Box Handling fee Domestic: $0.00 US Handling fee International: $0.00 US
Decimals: 2
Domestic Length: 8.625 Width: 5.375 Height: 1.625
International Length: 8.625 Width: 5.375 Height: 1.625
All Packages are Machinable: False
Enable USPS First-Class filter for US shipping: True
Sorts the returned quotes: Price-LowToHigh

ZipOrigination: 61015
ZipDestination: Postcode: 61015 Country: United States City: Chana State: Illinois
Order SubTotal: $125.00 US
Order Total: $125.00 US
Uninsurable Portion: $0.00 US
Insurable Value: $125.00 US

2023-01-20 11:24:15: Sending request to USPS

2023-01-20 11:24:15: ==================================

SENT TO USPS:

<RateV4Request USERID="XXXXXXXXXXXXX"><Revision>2</Revision>
</RateV4Request>


RESPONSE FROM USPS: 

==================================
CommErr (should be 0): 0 - 

==================================

USPS Country - $order->delivery[country][iso_code_2]: United States $this->usps_countries: US
Domestic Services Selected: 

2023-01-20 11:24:15: RESPONSE FROM USPS:
==================================
============

RAW XML FROM USPS:

SimpleXMLElement Object
(
    [Number] => -2147221202
    [Source] => Common:XmlParse
    [Description] => The element 'RateV4Request' has incomplete content. List of possible elements expected: 'RateClientType, Package'.
    [HelpFile] => SimpleXMLElement Object
        (
        )

    [HelpContext] => SimpleXMLElement Object
        (
        )

)
20 Jan 2023, 6:16 PM
#199
spyderrobotics avatar

spyderrobotics

New Zenner

Join Date:
Oct 2007
Posts:
75
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

Disregaurd my previous posts. Things appear to be working now without changing anything.

23 Jan 2023, 7:18 PM
#200
randolph_hoppe avatar

randolph_hoppe

Zen Follower

Join Date:
Jan 2004
Posts:
129
Plugin Contributions:
1

Re: USPS Shipping Module [Support Thread]

Media Mail Parcel query coming back with a 0 rate as of a few days ago. Priority Mail works fine.

Any ideas?