USPS2 Not Providing Rates

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368504

Odd, I wonder why I cannot get any rates to return when just the weight alone is used with the same settings you are.

And once I disable all the other shipping methods, I get the following error on an item without dimensions:



It's really a pain to test this when I cannot do it when any other USPS payment methods are enabled.
It makes the process particularly challenging on a live site.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 2 weeks ago #368505

All of our products have dimensions entered, so we haven't run into that issue.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368508

gpraceman wrote: All of our products have dimensions entered, so we haven't run into that issue.


Sorry, I misunderstood. So, it is a dimension issue, and weight-based only should work just as before, but it needs a way to do it.

It isn't something we can discuss with USPS; it is more about understanding how the chosen API works and providing the correct information.

As I mentioned, we basically need the "Use product dimension" on/off switch, similar to the one in the old USPS plugin. How that is implemented, I cannot say. I provided a few suggestions, but there may be a better, less crude approach.

It is not just one of the clients' sites that is impacted, but several that use weight-based shipping with USPS. They will all be in a similar situation.

To HikaShop's credit, they do work on these paid plugins faster than on non-paid ones, I feel.

At least there was plenty of lead time to work and test this out before the end of the old API.

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 2 weeks ago #368507

Hi,

You need to provide dimensions in your products. The previous API of USPS didn't require dimensions, but the new one requires it. So we couldn't add a similar setting in the new plugin due to USPS, not a limitation of what we did in the plugin.

Last edit: 1 month 2 weeks ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368518

Okay, but can we also have an option to set a "default" in the plugin if none is set?

Some methods are set up to handle products literally the size of a stamp/sticker that fits in a regular envelope, such as those measuring 0.1 oz. or less, so not even a measurable height.

Otherwise, we're talking about hundreds, if not a few thousand, products without weight across multiple client sites.

It has never been required before in HikaShop or USPS, and clients will not be happy with that.

As I pointed out, USPS's own rate calculation allows it, so how it is done with the API isn't a restriction.
It just allows a method to trick it, just like they are.

I'm not saying it's perfect, and clients probably should enter dimensions long term, but I also see cases where it isn't going to be practical

Additionally, it will run the risk of angering some of our Joomla/HikaShop clients/subscribers who have been using this for a long time.

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 2 weeks ago #368522

Hi,

If all the products have the same dimensions and weight, you can easily enter it in all the products at once with a mass action :
www.hikashop.com/support/documentation/167-massaction-form.html
You can use the action "update the values" several times, select the column for the weight, height, width and length, one for each action, and the mode "float" and the value you want.

The plugin will automatically increase the dimensions and weight to the minimum allowed if it is to small. So, for example, if you have a height of 0.0001 inches in your products, whether you have 1 product or a thousand in the cart, the total height provided to USPS will be 1 inch because otherwise the API would refuse the package.

Since the weight and dimensions can be added to all the products at once relatively easily with a mass action, I don't see why your clients won't be happy ? It's just a matter of a few minutes.

Now, you're also saying that you see cases where it isn't going to be practical. Could you develop on this ? I'm not against adding new options if it's useful, but I don't want to add options just for the sake of it either when a mass action can relatively easily remedy the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368524

I don't think a mass action to set all unset LWH is a good idea.

I provided an example of a set of products, but they don't represent the entire spectrum.

The products range from a stamp/sticker under .99oz up to large objects weighing 30 to 40 lbs with varying dimensions.

Some fit in a box, some don't.

Additionally, we need to account for orders that include both small items (which ship individually in a letter envelope) and larger items that are combined under one shipping method into a single package.

That's why we have multiple shipping methods set up with USPS, based on both weight and USPS service.
Some are packages, some are envelopes, some combine them, while others don't.

It is based on weight, however, rather than dimensions, for the most part.
We don't have a single method that just covers "packages" with first-class/ground.
Some use letters/machine-readable (letters), while others use packages/parcels.

I'll have to experiment with setting WLH to something like 0.1 x 0.1 x 0.1 and see what happens.
However, I can see where that might cause issues with certain products/shipping method calculations.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368525

Dimension aside, I think I see another issue (or it could be why there is some confusion).

I'm unable to find a way to obtain pricing for a First-Class Mail Stamped Letter (regular letter envelope) using this new plugin.

We can use the old plugin, and you can still access it through the USPS Rate Lookup on their website.
We used the First Class Mail type Letter and Variable container under the old plugin.

FYI, First Class Mail is not the same as Ground Advantage. That's a package, and we need the letter.

I know I'm in the range of the First-Class Mail letter (LWH) and weight, but I cannot find any way to get it under the new plugin.

This appears to be under a different section in the API than previously referenced although I'm not sure why:
developers.usps.com/domesticpricesv3#tag...-letter-rates-search

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 2 weeks ago #368546

Hi,

Sorry for the delay. I looked into it during the weekend and today too.

So, first, note that with this new USPS plugin you can still have several instances of it, if you need to have different configurations for different products based on weight and service. So, the fact that you need to add dimensions to the products should not be a problem.

And yes, I think that some of the confusion indeed comes from the API used in the plugin. It uses the "base-rates" endpoint and reading into it, it doesn't take into account letters and flats (large envelopes). And so, if we were to use this base-rates endpoint, we would also need to implement the letter-rates endpoint that you mentioned for letters.
However, upon further reading, the "total-rates" endpoint seems to be the solution here. From what I could read, it can provide rates for both packages / parcels and letters / flats.
So, I've worked on a new version of the plugin over the past few days. I've tried the "letter-rates" endpoint with dimensions and weight corresponding to normal letters / flats. Then, I switched to the "total-rates" endpoint and I got the same rates for the same letters / flats.
Then, I did the same for the "base-rates" endpoint and the "total-rates" endpoint for packages / parcels, and again I got the same rates.
So, the "total-rates" endpoint seems to be the solution here.
Another advantage of this endpoint is that you don't have to provide the rate indicator, processing category etc. So I was able to remove them from the plugin.
I've just released a new version of the USPS plugin with the necessary changes.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368547

Closer, but I don't think it is quite right.

I think the processing category might be important in determining which services are returned for letters, because I'm still not seeing first-class mail (among other letter service options, such as flat-rate envelopes).



The last entry is the old plugin, which is the correct amount for the given weight and dimensions.

I'm pretty sure we need the category option, otherwise I appear it is being treated like a package/parcel.

I'm pretty sure about rateIndicator, too. I conducted a test with a non-rectangular package, a tube, which we commonly use, and it was not displaying the correct pricing, even when weight, dimensions, and "Has non-standard characteristics" were enabled. It was way too low, like it was doing a normal rectangular package.

Products that would go in standard rectangular packages seem fine, but not anything outside of that.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 1 week ago #368552

One other annoyance with the plugin is that with the order emails the customer's selected shipping method ends up like this:

Shipping Method: 16-USPS_GROUND_ADVANTAGE

Would rather that it look like below (as the old plugin did). The above method listing trips up our order system.
Shipping Method: USPS Ground Advantage

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 1 week ago #368553

gpraceman wrote: One other annoyance with the plugin is that with the order emails the customer's selected shipping method ends up like this:

Shipping Method: 16-USPS_GROUND_ADVANTAGE

Agreed.

But I think it is because the language files or variables haven't been set yet? All my service options are still variable names with _ in them, even in today's release.

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 1 week ago #368554

jazzmang wrote: Agreed.

But I think it is because the language files or variables haven't been set yet? All my service options are still variable names with _ in them, even in today's release.


True, the list of shipping services is not plain text, but variable names. The language INI file that comes with the plugin does have the plain text corresponding to the variable names.
USPS_CLIENT_ID="USPS Client ID"
USPS_CLIENT_SECRET="USPS Client Secret"
USPS_ACCOUNT_NUMBER="USPS Account Number"
USPS_ACCOUNT_TYPE="USPS Account Type"
ENVIRONMENT="Environment"
PARCEL_SELECT="Parcel Select"
PRIORITY_MAIL_EXPRESS="Priority Mail Express"
PRIORITY_MAIL="Priority Mail"
LIBRARY_MAIL="Library Mail"
MEDIA_MAIL="Media Mail"
BOUND_PRINTED_MATTER="Bound Printed Matter"
USPS_CONNECT_LOCAL="USPS Connect Local"
USPS_CONNECT_MAIL="USPS Connect Mail"
USPS_CONNECT_REGIONAL="USPS Connect Regional"
USPS_GROUND_ADVANTAGE="USPS Ground Advantage"
FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE="First-Class Package International Service"
PRIORITY_MAIL_INTERNATIONAL="Priority Mail International"
PRIORITY_MAIL_EXPRESS_INTERNATIONAL="Priority Mail Express International"
HAS_NON_STANDARD_CHARACTERISTICS="Has non standard characteristics"
HAS_NON_STANDARD_CHARACTERISTICS_DESC="Only for domestic shipping. Only turn on if your packages are cylindrical tubes or rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and parcels with contents that may cause the parcel to roll or not maintain the integrity of the packaging during processing."
ENTRY_FACILITY_TYPE="Entry Facility Type"
ENTRY_FACILITY_TYPE_DESC="Only for domestic shipping.You can find more information about the entry facility in the <href='https://about.usps.com/postal-bulletin/2007/html/pb22213/updt.3.8.html'>USPS Publication 205 (the eVS parcel pricing guide)</a>"
PROCESSING_CATEGORY="Processing Category"
PROCESSING_CATEGORY_DESC="Only for domestic shipping. You can find more information about the categories in the <a href='https://pe.usps.com/text/dmm300/dmm300_landing.htm'>USPS Domestic Mail Manual</a>"
RATE_INDICATOR="Rate Indicator"
RATE_INDICATOR_DESC="Only for domestic shipping. You can find more information about the rate indicators in the <href='https://about.usps.com/postal-bulletin/2007/html/pb22213/updt.3.8.html'>USPS Publication 205 (the eVS parcel pricing guide)</a>"
PRICE_TYPE="Price Type"
PRICE_TYPE_DESC="Only for domestic shipping. The retail price is the price a customer would be charged by USPS at a Post Office. The commercial price is the price a business would be charged by USPS if they have a business account. The contract price is the price a business would be charged by USPS if they have negotiated a contract with USPS."
USPS_ACCOUNT_TYPE_DESC="Select the type of USPS account you have. A USPS 'Permit' Imprint account is used for bulk/business mailing. A 'Meter' account is used for postage printed via a postage meter or online postage provider. An EPS account is used for online postage providers only. You can leave this empty if you do not have a USPS account number."
USPS_ACCOUNT_NUMBER_DESC="Enter your USPS account number. This is required for 'EPS', 'Permit' and 'Meter' account types. This number can be the Enterprise Payment Account, Permit number or PC Postage meter number associated with a contract."
ENVIRONMENT_DESC="Select 'Testing' to use the USPS test environment. You need to have a test account to use this environment. Select 'Production' to use the live USPS environment. The credentials below need to match the selected environment."
USPS_CLIENT_ID_DESC="Enter your USPS Client ID / Consumer Key. After logging into the Developer Portal, you need to go to the 'Apps' area and either create a new app or use an existing one to get the Client ID / Consumer Key."
USPS_CLIENT_SECRET_DESC="Enter your USPS Client Secret / Consumer Secret. After logging into the Developer Portal, you need to go to the 'Apps' area and either create a new app or use an existing one to get the Client Secret / Consumer Secret."

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 1 week ago #368556

Hi,

Thanks for your feedback.
I've made changes in the plugin for these issues and published a new version of the plugin.
Please update the plugin again.
Also, you'll now have a "First-Class Mail" service which you need to select if you want the shipping method to support letters / flats.
You'll also have a "processing category" setting for machinable or nonstandard packages.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 1 week ago #368561

True, the list of shipping services is not plain text, but variable names. The language INI file that comes with the plugin does have the plain text corresponding to the variable names.


Huh, wonder why then they are not shown.

Also spotted that the version # for the plugin isn't set, just has " {__PLUGIN_VERSION__} "

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 1 week ago #368562

I'm fairly certain we need the "rateIndicator" option, not just the processingCategory.

I'm getting inconsistent results, even for standard package prices with dimensions or ones that match our expectations (e.g., those that are even close to either the n value or the correct services listed). For example:



I have no idea why there is a difference between the Priority Mail options in the old and new plugins, while the Ground Advantage remains the same.
There is only one product in the cart, so it should be using the same weight/dimensions. The old one is the correct amount.

Be aware that if you have a "FIRST-CLASS_MAIL" check, you can only receive FIRST-CLASS_MAIL rates, regardless of any other setting, including "MACHINEABLE" or "NONSTANDARD". Not sure if this is intentional or not. Does it auto-set processingCategory to "LETTERS"?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 1 week ago #368563

nicolas wrote: Hi,

Thanks for your feedback.
I've made changes in the plugin for these issues and published a new version of the plugin.
Please update the plugin again.
Also, you'll now have a "First-Class Mail" service which you need to select if you want the shipping method to support letters / flats.
You'll also have a "processing category" setting for machinable or nonstandard packages.

I installed the latest plugin. I see the "FIRST-CLASS_MAIL" option listed in the shipping services. However, the variable names are still being used in the plugin admin and in the emails. I also see the variable name on when viewing the order through the admin.

Last edit: 1 month 1 week ago by gpraceman.

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 1 week ago #368566

Hi,

Thanks for your feedback.

- For the name of the services in the plugin settings, I've made a modification for this for the next version of the plugin.

- For the plugin version, same, I've made a modification for this for the next version.

- For the name of the services in the email and order details in the backend, I'm not able to reproduce the issue anymore. I don't see why @gpraceman would still have the issue. Could you please double check ? Do you also have the issue @jazzmang ?

- Regarding "if you have a "FIRST-CLASS_MAIL" check, you can only receive FIRST-CLASS_MAIL rates", I'm also not able to reproduce the problem. I've tested the current version of the plugin with both package services and the new FIRST-CLASS_MAIL services checked, and when the product in the cart had dimensions and weight of a letter or flat I would get the FIRST-CLASS_MAIL service rate, and when they would exceed the limits of a flat, the plugin then switched automatically to package rates. Could you please double check ?

- Regarding the Priority Mail rate being high, I'm surprised you get these results. I actually have the rate for Priority Mail just a few dollars above the rate for Ground Advantage on my tests. Could it be you have "NONSTANDARD" selected, or the "Has non standard characteristics" checkbox checked on your end which would lead to the high Priority Mail rate on your end ?
I also can't compare to the old plugin on my end as I don't have a USPS WebTools User ID. The old USPS plugin was made by a third party developer and donated to us years ago. We only maintained the plugin.
This might require checking the situation directly on your website with some backend and FTP access in order to really understand what's going on.

Last edit: 1 month 1 week ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 1 week ago #368575

nicolas wrote: - For the name of the services in the email and order details in the backend, I'm not able to reproduce the issue anymore. I don't see why @gpraceman would still have the issue. Could you please double check ? Do you also have the issue @jazzmang ?


Yes, I see the same variable names only in both orders, emails, and the plugin settings - no actual names..

nicolas wrote: Regarding "if you have a "FIRST-CLASS_MAIL" check, you can only receive FIRST-CLASS_MAIL rates", I'm also not able to reproduce the problem. I've tested the current version of the plugin with both package services and the new FIRST-CLASS_MAIL services checked, and when the product in the cart had dimensions and weight of a letter or flat I would get the FIRST-CLASS_MAIL service rate, and when they would exceed the limits of a flat, the plugin then switched automatically to package rates. Could you please double-check?


Currently, I am unable to obtain a FIRST-CLASS_MAIL result under the new plugin (I can with the old one for the same product). It's a .5oz decal, so dimensions are absurdly small and will fit in a standard 4-1/8" x 9-1/2 letter envelope. It should be $1.27 pretty much regardless of where you ship it from/to in the US.

Here is what I'm using for this very targeted set of products (has to be under 1 oz, limit set in the plugin):

nicolas wrote: - Regarding the Priority Mail rate being high, I'm surprised you get these results. I actually have the rate for Priority Mail just a few dollars above the rate for Ground Advantage on my tests. Could it be you have "NONSTANDARD" selected, or the "Has non standard characteristics" checkbox checked on your end which would lead to the high Priority Mail rate on your end ?


Current settings to get the last results shown above. Things are set as they should be for the product type in the cart.

In fact, if I select NONSTANDARD, I get no results at all.

I've tried a few other products with the same settings and get widely varying results between what I get from the old plugin and the new one with the same product in the cart. Sometimes, the prices match; sometimes they are wildly different, as shown above.

The old plugin displays the correct price, exactly as if you went to USPS.com's rate finder and entered the same information.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84584
  • Thank you received: 13753
  • MODERATOR
1 month 1 week ago #368576

Hi,

1. Thanks for the information on the translated text. I found the issue. I had made several packages for the previous version during my tests and I had uploaded one with a typo for the translated text, while I was using one without the typo.

2. Regarding FIRST-CLASS_MAIL I think the issue is that the dimensions of your decal product are too small. If I read on the USPS Domestic Prices v3 API documentation page, they say:

To be eligible for mailing at the price for letters, a piece must be:
At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.

And while I made a check to switch to flats if the dimensions are higher, I didn't make a check for the minimum dimensions. So if your decals have dimensions lower than 3-1/2 in x 5 in then the API might not return anything.
So, I've made modifications to the plugin to use the minimum size allowed if the size of the product is below the minimums.

3. Regarding your last issue with the NONSTANDARD rates not being returned, I can't reproduce the issue. Could you provide the debug data from the "payment log file" for that situation ?


For now, I've just released a small new version of the plugin with the different small fixes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.123 seconds
Powered by Kunena Forum