-
USPS Shipping Module [Support Thread]
After all these years (!), this thread will now consolidate the support-thread for the USPS shipping module, downloadable from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=1292.
I've gathered a bunch of disparate threads previously posted, in an attempt to keep everything 'together':
-
Re: USPS Shipping Module [Support Thread]
Version 2020-09-24 K11 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1292
Note that this version is not compatible with Zen Cart versions prior to 1.5.2 and is not supported for Zen Cart versions prior to 1.5.4.
The following changes were made:
- Restructuring to prevent PHP notices and warnings.
- Re-factored to use now-current code styling.
- Includes modifications to use stripos/strpos instead of preg_match for 'simple' string-in-string checks.
- Use foreach() instead of deprecated each()
- Use secure (https: //secure.shippingapis.com/ShippingAPI.dll) endpoint for API requests; unsecure endpoint being retired.
- Simplifies debug handling, 'Screen' and 'Email' no longer supported.
- Debug filename changed to enable sort-by-name to mimic sort-by-date on the files.
- Restores the USPS icon to this shipping-method's distribution zip-file.
- Correct missing constant warning (MODULE_SHIPPING_USPS_REGULATIONS)
- That 'soft' configuration setting is now available in the usps.php language file.
- Additional, previously undefined language constants added in support of the display.
- 'Return Receipt for Merchandise [107]' retired and USPS will return an error if requested.
- Country name changes:
- Country ('MK') changed from 'Macedonia, Republic of' to 'North Macedonia, Republic of'.
- Country ('SZ') changed from 'Swaziland' to 'Eswatini'.
- Country ('SS') added (South Sudan); note that the country is not currently registered in the countries table.
- Add 'soft' configuration settings, present in the module's language file (refer to that file for additional information):
- MODULE_SHIPPING_USPS_SHIPPING_CUTOFF ... the shipping cut-off time, used to determine the delivery date.
- MODULE_SHIPPING_USPS_GROUNDONLY ... identifies whether the database field 'products::products_groundonly' should be interrogated.
- MODULE_SHIPPING_USPS_FRAGILE ... identifies whether the database field 'products::products_fragile' should be interrogated.
- Remove fallback 'plugin_check_for_updates' function. It's now expected to be present as part of the base Zen Cart distribution (zc152+).
- Auto-disable on the storefront if no shipping services have been selected or if the store's country-of-origin isn't the US (country code 223).
-
Re: USPS Shipping Module [Support Thread]
Thanks lat9 for the refresh and xoxo to Ajeh for all her efforts (past, present, and future), too.
Where would the 'if clause' be inserted in this update to create a USPS Minimum Shipping Cost? Example $6 for 1st Class.
USPS_2020_09_24_K11>includes>modules>shipping>usps.php @line 779 ?
Was using this in previous versions. Thanks in advance.
$methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
to now force the amount ...
Code:
if ($cost < 6.00) { $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);} else { $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
-
Re: USPS Shipping Module [Support Thread]
@webskipper, find the following code fragment, starting at line 724:
Code:
// add handling for shipping method costs for extra services applied
$cost_original = $cost;
$cost = ($cost + $handling + $hiddenCost) * $shipping_num_boxes;
// add handling fee per Box or per Order
$cost += (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box') ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee;
and add the highlighted code fragments:
Code:
// add handling for shipping method costs for extra services applied
$cost_original = $cost;
//-bof-Force minimum cost of $6.00
if ($cost < 6) {
$cost = 6;
}
//-eof-Force minimum cost
$cost = ($cost + $handling + $hiddenCost) * $shipping_num_boxes;
// add handling fee per Box or per Order
$cost += (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box') ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee;
-
Re: USPS Shipping Module [Support Thread]
Worked like magic! Thanks.
Donated a Jackson.
-
Re: USPS Shipping Module [Support Thread]
I will periodically see
--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /SITE/includes/modules/shipping/usps.php on line 492. // line 487 in an unmodified file
where that line is
$PackageSize = count($uspsQuote['Package']['Service']);
This is the else branch of $this->is_us_shipment.
Is it possible this branch needs the same check as the other branch, where we check count($uspsQuote['Package']); (line 480).
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
swguy
I will periodically see
--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /SITE/includes/modules/shipping/usps.php on line 492. // line 487 in an unmodified file
where that line is
$PackageSize = count($uspsQuote['Package']['Service']);
This is the else branch of $this->is_us_shipment.
Is it possible this branch needs the same check as the other branch, where we check count($uspsQuote['Package']); (line 480).
Quite possible!
What international methods and services does the site offer?
Do you have any insight into the ship-to country/zone/postcode used when the warning was issued?
-
Re: USPS Shipping Module [Support Thread]
Recently upgraded to 1.5.7 of ZC, but have not been able to import orders to stamps.com since Saturday. Should I have my web person install this module, or is it included in 1.5.7? Trying to figure out why I can't import; I have the updated php file that DrByte wrote, and it was working fine until today.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
CraftCorner
Recently upgraded to 1.5.7 of ZC, but have not been able to import orders to stamps.com since Saturday. Should I have my web person install this module, or is it included in 1.5.7? Trying to figure out why I can't import; I have the updated php file that DrByte wrote, and it was working fine until today.
The USPS shipping module must be installed separately from the 'base' Zen Cart files. Note that the shipping-module has no effect on the ShipStation import; it's only active during a site's checkout.
-
Re: USPS Shipping Module [Support Thread]
I'm trying to get this working on Zencart 1.5.5f and keep getting an error on the checkout page that says:
"An error occurred in obtaining USPS shipping quotes.
If you prefer to use USPS as your shipping method, please try refreshing this page, or contact the store owner."
I've turned on debugging and the log has the following (I've replaced the username):
2020-11-12 18:28:26: USPS build: 2020-09-24 K11
Server: production
Quote Request Rate Type: Retail
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: CUSTOM
Cart Weight: 0.5
Total Quote Weight: 0.5 Pounds: 0 Ounces: 8
Maximum: 50 Tare Rates: Small/Medium: 0 Large: 0
Handling method: Box Handling fee Domestic: $0.00 Handling fee International: $0.00
Decimals: 3
Domestic Length: 8.625 Width: 5.375 Height: 1.625
International Length: 9.50 Width: 1.0 Height: 5.50
All Packages are Machinable: False
Enable USPS First-Class filter for US shipping: True
Sorts the returned quotes: Unsorted
ZipOrigination: 92065
ZipDestination: Postcode: 32570 Country: United States City: Milton State: Florida
Order SubTotal: $34.95
Order Total: $34.95
Uninsurable Portion: $0.00
Insurable Value: $34.95
2020-11-12 18:28:26: Sending request to USPS
2020-11-12 18:28:41: ==================================
SENT TO USPS:
<RateV4Request USERID="**********"><Revision>2</Revision>
<Package ID="0"><Service>First Class</Service><FirstClassMailType>FLAT</FirstClassMailType><ZipOrigination>92065</ZipOrigination><ZipDestination>32570</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>34.95</Value><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>First Class</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>92065</ZipOrigination><ZipDestination>32570</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>34.95</Value><Machinable>FALSE</Machinable></Package>
<Package ID="2"><Service>MEDIA</Service><ZipOrigination>92065</ZipOrigination><ZipDestination>32570</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>34.95</Value><Machinable>FALSE</Machinable></Package>
<Package ID="3"><Service>PARCEL</Service><ZipOrigination>92065</ZipOrigination><ZipDestination>32570</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>34.95</Value><Machinable>FALSE</Machinable></Package>
<Package ID="4"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>92065</ZipOrigination><ZipDestination>32570</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>34.95</Value><Machinable>FALSE</Machinable></Package>
</RateV4Request>
RESPONSE FROM USPS:
==================================
CommErr (should be 0): 28 - connect() timed out!
==================================
USPS Country - $order->delivery[country][iso_code_2]: United States $this->usps_countries: US
Domestic Services Selected:
-
Re: USPS Shipping Module [Support Thread]
That's something to do with your site's server settings, as the request to USPS has (as the debug indicates) timed out.
What version of PHP is in use?
When you view the Admin Tools->Server/Version Information, what values are shown for the site's CURL settings?
-
Re: USPS Shipping Module [Support Thread]
I'm trying to upgrade my usps shipping module...I am not good at this. I followed the instructions..downloaded, unzipped. It said to upload the two files...I found the usps.php in shipping and languages...deeper..but you know that. Now I have no usps shipping module available in my admin page. Sigh.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
GoodLifeToGo
I'm trying to upgrade my usps shipping module...I am not good at this. I followed the instructions..downloaded, unzipped. It said to upload the two files...I found the usps.php in shipping and languages...deeper..but you know that. Now I have no usps shipping module available in my admin page. Sigh.
Chances are that an error is occurring where it "draws" the usps module details to the screen, and that error is also preventing the right-column and the page-footer from showing too. Is that what you're seeing? If so then the error should be documented in your /logs/ directory as a myDebug-adm-xxxxxxxx.log file every time you try to go to that page. What's in that error log file?
And, double-checking ... while the files have the same name, their contents are different, so ... you uploaded each to their corresponding correct directories, overwriting the prior usps.php files, right?
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
That's something to do with your site's server settings, as the request to USPS has (as the debug indicates) timed out.
What version of PHP is in use?
When you view the Admin Tools->Server/Version Information, what values are shown for the site's CURL settings?
cURL support enabled
cURL Information 7.19.7
Age 3
Features
AsynchDNS No
CharConv No
Debug No
GSS-Negotiate Yes
IDN Yes
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
SPNEGO No
SSL Yes
SSPI No
Protocols tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps, scp, sftp
Host x86_64-redhat-linux-gnu
SSL Version NSS/3.44
ZLib Version 1.2.3
libSSH Version libssh2/1.4.2
-
Re: USPS Shipping Module [Support Thread]
The current USPS - United States Postal Service module for Zen Cart plugin worked when i was running 1.5.7 Now I am on 1.5.7b and USPS is never an shipping option during the checkout process. No errors are displayed and no error logs created. The only customization is SBA.
-
Re: USPS Shipping Module [Support Thread]
What happens if you enable the USPS debug logging? That will let you (and me) know whether the shipping-method is actually requesting quotes from USPS.
There will be USPS_*.log files generated in your site's /logs sub-directory that contain the request/response information.
-
Re: USPS Shipping Module [Support Thread]
I should have tried the USPS Debug Log first. It gave me clues with what the problem could be and after trying a couple changes in the shipping module set up I got it working. Thanks for your reply.
-
Re: USPS Shipping Module [Support Thread]
Here's where you help others by letting them know what cured the problem. Nothing worse than finding a thread, following it for a few pages and finding "I fixed it.":P
-
Re: USPS Shipping Module [Support Thread]
I've recently upgraded to v1.5.7, and thought all was working well. Then I noticed I wasn't receiving any international orders. Maybe because of the pandemic I thought? But no, I created a new user with a known good address in Canada. Tried to place an order, and on the shipping page it says: Shipping Method:
This is currently the only shipping method available to use on this order - and it's blank. Nothing to select. I change to a US address, and it works fine. I then upgraded the USPS shipping module, and still the same. I'm only offering flat rate, based on a quantity, since I only sell 1 thing. On domestic I have selected Priority Sm. F/R Box, Priority Md. F/R Box, Priority Lg. F/R Box. For international, I have selected Priority Intl Sm. F/R Box, Priority Intl Md. F/R Box, Priority Intl Lg. F/R Box. All was working prior to upgrading to v1.5.7, and it seems as though domestic is working as it is. Anything in particular I should look at to try to fix this? I have now turned on debug, and see international customers trying to place orders, but are not able to complete them.
Thanks,
Scott
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
fordlove
I've recently upgraded to v1.5.7, and thought all was working well. Then I noticed I wasn't receiving any international orders. Maybe because of the pandemic I thought? But no, I created a new user with a known good address in Canada. Tried to place an order, and on the shipping page it says: Shipping Method:
This is currently the only shipping method available to use on this order - and it's blank. Nothing to select. I change to a US address, and it works fine. I then upgraded the USPS shipping module, and still the same. I'm only offering flat rate, based on a quantity, since I only sell 1 thing. On domestic I have selected Priority Sm. F/R Box, Priority Md. F/R Box, Priority Lg. F/R Box. For international, I have selected Priority Intl Sm. F/R Box, Priority Intl Md. F/R Box, Priority Intl Lg. F/R Box. All was working prior to upgrading to v1.5.7, and it seems as though domestic is working as it is. Anything in particular I should look at to try to fix this? I have now turned on debug, and see international customers trying to place orders, but are not able to complete them.
Thanks,
Scott
I'm sorry you're having issues with the USPS shipping module. You indicated that you enabled the USPS debug, would you post the contents of one where the international orders have failed? If you do, you could post those contents within the "CODE" tags (the big # in the menu-bar when you're writing your response)?
BTW, which version of 1.5.7 is installed? 1.5.7 (no suffix), 1.5.7a or 1.5.7b?
-
Re: USPS Shipping Module [Support Thread]
I'm using 1.5.7 (no suffix)
Debug is as follows:
Code:
(You can turn off this debug email by editing your USPS module settings in the admin area of your store.)
<?xml version="1.0" encoding="UTF-8"?>
<IntlRateV2Response><Package ID="0"><Prohibitions>An issue of a publication in which more than 5 percent of its total advertising space is primarily directed to a Canadian market and which indicates:
(a) Specifically where goods or services may be obtained in Canada, or
(b) Specific items or conditions relating to the sale or provision of goods or services in Canada.
All alcoholic beverages including wines, etc.
An issue of a publication that contains an advertisement primarily directed to a Canadian market is a prohibited import if that advertisement does not appear in identical form in all editions of the issue distributed in the country of origin.
Articles so marked as to create the false impression that they were made in Canada, Great Britain or any other British country.
Commercial tags of metal.
Firearms, except as follows: Firearms may be mailed to Canada if the importer has the required documentation and if the firearms meet the requirements in Publication 52, subchapter 43 and part 632. Before mailing, customers must visit cbsa-asfc.gc.ca/import/iefw-iefa-eng.html to review Canadian import requirements.
Gold bullion, gold dust, and nonmanufactured precious metals.
Non-refillable lighters or any other lighter that contains fuel. New lighters with no fuel may be sent.
Oleomargarine and other butter substitutes, including altered or renovated butter.
Perishable infectious biological substances.
Perishable noninfectious biological substances.
Plumage and skins of wild birds.
Prison-made goods being sold or intended for sale by a person or firm.
Radioactive materials.
############## or inert munitions, as well as other devices that simulate explosive devices or munitions, including ############## or inert grenades or other simulated military munitions, whether or not such items are for display purposes.
Reprints of Canadian or British works copyrighted in Canada.
Reproductions of Canadian postage stamps unless printed in publications in black and white only and with a defacing line drawn across each reproduction.
Shipments bearing caution labels indicating the contents are flammable.
Smoke-making devices for motor vehicles and boats.
Used or secondhand hives or bee supplies.
Vaping liquids containing 66 mg/g or more nicotine by weight. Note: The U.S. Postal Service measures the concentration of nicotine solutions by volume rather than by weight, so it is possible that a product that does not exceed Canada's weight restriction would exceed the Postal Service's volume restriction. Nicotine solutions with a concentration of 16.67 percent (166 mg/ml) or more, when nicotine is the only toxic material in the liquid, are classified as "dangerous goods" (see 136.1) and as such are prohibited in international mail. (See also Observation 1.)
</Prohibitions><Restrictions>Coins; banknotes; currency notes; securities payable to bearer; traveler's checks; gold, silver, platinum, manufactured or not; jewelry; and other valuable articles may be sent only in registered items First-Class Package International Service with Registered Mail service.
Exceptions:
Coins sent to or from collectors or dealers may be mailed in ordinary (uninsured) parcels.
Drugs and medicines must comply with Canadian law.
Eggs for hatching must be packed in new, clean containers and accompanied by a certificate issued by a veterinarian of the U.S. Department of Agriculture, or one issued by a State veterinarian and endorsed by a veterinarian of that Bureau, stating that to the best of his or her knowledge the eggs come from a flock that is free from Newcastle disease, fowl pest, or fowl typhoid. See 135.3 for method of packing.
Meat and meat food products must be accompanied by an export certificate issued by the U.S. Department of Agriculture and labeled in accordance with Canadian regulations. Exception to these requirements are:
1. bona fide sample shipments weighing less than 10 kg;
2. meat products addressed to a government department or agency;
3. meat products intended for personal consumption when they enter Canada in the possession of the importer.
Pet food that contains biologically appropriate raw food or bones and raw food - such as heat-processed, shelf-stable pet foods, treats, and compound chews - must be accompanied by an import permit from the Canadian Food Inspection Agency and a zoo sanitary certificate from the United States Department of Agriculture (USDA) Animal and Plant Health Inspection Service (APHIS) Veterinarian Services. Attach a copy of both documents to the outside of the mailpiece for review by the Canada Border Service Agency.
Precious stones, set or not set; all items used as dress ornaments and coming under the term "jewelry" including articles of gold or other precious metal for personal use such as cigarette holders, cases, powder cases, card cases, opera glasses, fountain pens, watches, etc., are permitted in insured parcels provided the articles have value not over $5 U.S. A parcel containing a number of such articles valued at $5 or less may be insured for the total value of the contents up to a maximum of $200.
Veterinary biological products including serums and vaccines must be accompanied by a permit issued by the Veterinary Director General, Ministry of Agriculture of Canada.</Restrictions><Observations>1. As noted in the Prohibitions section, Canada prohibits certain vaping products. However, vaping products, otherwise known as electronic smoking products (i.e., electronic products for the vaporization and administration of inhaled doses of nicotine including electronic cigarettes, cigars, cigarillos, and pipes, as well as cartridges of nicotine solutions and related products), that make health claims are subject to the Canadian Food and Drugs Act (FDA). "Health claims" refers to any statement that represents the product as a drug or device under section 2 of the FDA - for example, a statement that the product will help someone quit smoking. Vaping products that make health claims require authorization under the FDA before being commercially imported, advertised, or sold in Canada. A vaping product that makes health claims is considered a prescription drug, and before importation to Canada, it requires a Drug Establishment License and an assigned corresponding Drug Identification Number (DIN). For more information, visit canada.ca/en/health-canada/topics/licensing-authorizing-manufacturing-drug-health-products.html. Vaping products with no health claims and no drugs other than nicotine are not subject to the FDA.
2. Banknotes valued at $100 or more must be put up in a compact package and securely tied with strong twine before wrapping. The wrapper must be linen or other strong, woven material, linen lined paper, or two thicknesses of strong kraft paper. After wrapping, the package must be again securely tied or stitched and sealed at the points of closing.
3. The name of the Canadian province in which the office of destination is located must appear as part of the address.
4. The following must not be accepted for insurance:
Bees, postage stamps (canceled and uncanceled) and albums in which they are mounted, and parcels addressed to CFPOs.
5. Canadian Forces Mail (CFPO) is processed through Canadian military post offices and must be addressed in the following manner:
(a) NUMBER, RANK, NAME UNIT
(b) CFPO (NUMBER)
(c) BELLEVILLE ON K0K 3R0
(d) CANADA
Maximum weight limits for mail addressed to members of the Canadian Forces based outside of Canada (CFPO) is 22 pounds. Parcels for CFPO addresses may not be insured. Direct sacks of printed matter (M-bags) are not permitted for CFPO addresses.
6. A letter fully prepaid and bearing the same address as that of a parcel may be tied or otherwise securely attached to the outside of the parcel. Stamps to cover postage on the parcel must be affixed to the wrapper of the parcel. Stamps to pay postage on the letter must be affixed to the envelope thereof.
7. Certain types of merchandise must be marked to show country of origin in the manner prescribed by the Canadian customs regulations.
8. Goods valued under 20 Canadian dollars are duty and excise tax exempt. Goods over 20 Canadian dollars will be subject to the applicable duties and excise taxes. Gift shipments received by mail that are valued under 60 Canadian dollars are duty and excise tax exempt.
9. For all casual and commercial goods valued at or under 1,600 Canadian dollars, Canada Post will collect assessed duties, excise taxes, and a handling fee from the addressee. This handling fee is set by Canada Post (see http://www.canadapost.ca/tools/pg/manual/PGcustoms-e.asp). All commercial mail items over 1,600 Canadian dollars will be held by Canada Customs and Excise until proper invoice and accounting documentation is provided by the addressee.
10. The Canada Customs Invoice can be obtained from stationery, office supply, or printing companies. If mailers are unable to obtain the Canada Customs Invoice locally, they should visit the following Web site: www.canadapost.ca. In addition, commercial invoices are acceptable provided that each invoice has the required information for customs purposes.
11. Information on Canadian customs regulations may be obtained from the Office of International Marketing/223, Bureau of International Commerce, Department of Commerce, Washington, DC 20230, or any field office of that Department.
Obtaining post code information:
12. Information on Canadian post code directories can be obtained from:
(a) NATIONAL PHILATELIC CENTER
CANADA POST CORPORATION
STATION 1
ANTIGONISH NS B2G 2R8
Telephone: 1-800-565-4362
Fax: 1-902-863-6796
(b) To obtain Canadian post codes for specific addresses, call the General Information line at 1-416-979-8822 or access the Canada Post Corporation web site on the Internet at http://www.canadapost.ca.
13. Pursuant to the Canada Customs Act and a need to heighten border security, Canada will deny entry of all postal items (except postcards) that do not bear complete sender and addressee information in roman letters and arabic numerals. </Observations><CustomsForms>First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes:
PS Form 2976 (see 123.61)
Priority Mail International parcels:
PS Form 2976-A inside 2976-E (envelope)</CustomsForms><ExpressMail>Country Code:
CA
Reciprocal Service Name:
There is no reciprocal service.
Required Customs Form/Endorsement
1. Business papers and commercial documents.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
2. Merchandise samples and gift shipments (non-commercial parcels).
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
3. Merchandise (commercial shipments) and all articles subject to customs duty.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
Notes:
1. Gift shipments (non-commercial parcels) require a sales receipt, invoice or other documentation to support the declared value.
2. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to Canada.
3. Priority Mail Express International shipments may have a street address or a post office box address. A local telephone number for the addressee MUST be provided for shipments addressed to a post office box address. A local telephone number for the addressee should be provided if possible for shipments to a street address.
Areas Served: All</ExpressMail><AreasServed>Please reference Express Mail for Areas Served.</AreasServed><AdditionalRestrictions>No Additional Restrictions Data found.</AdditionalRestrictions><Service ID="4"><Pounds>43</Pounds><Ounces>8</Ounces><MailType>All</MailType><GXG><POBoxFlag>N</POBoxFlag><GiftFlag>N</GiftFlag></GXG><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><Country>CANADA</Country><Postage>301.95</Postage><CommercialPostage>286.85</CommercialPostage><ExtraServices><ExtraService><ServiceID>106</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><OnlineAvailable>True</OnlineAvailable><Price>6.50</Price><PriceOnline>6.50</PriceOnline><DeclaredValueRequired>True</DeclaredValueRequired></ExtraService></ExtraServices><ValueOfContents>544.00</ValueOfContents><SvcCommitments>1 - 3 business days to many major markets</SvcCommitments><SvcDescription>Global Express Guaranteed&lt;sup&gt;&#174;&lt;/sup&gt; (GXG)</SvcDescription><MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth combined 108"</MaxDimensions><MaxWeight>70</MaxWeight><GXGLocations><PostOffice><Name>EUREKA</Name><Address>113 14TH ST</Address><City>EUREKA</City><State>MT</State><ZipCode>59917</ZipCode><RetailGXGCutOffTime>5:00 PM</RetailGXGCutOffTime><SaturDayCutOffTime>1:30 PM</SaturDayCutOffTime></PostOffice></GXGLocations></Service><Service ID="12"><Pounds>43</Pounds><Ounces>8</Ounces><MailType>All</MailType><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><Country>CANADA</Country><Postage>301.95</Postage><CommercialPostage>286.85</CommercialPostage><ExtraServices><ExtraService><ServiceID>106</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><OnlineAvailable>True</OnlineAvailable><Price>6.50</Price><PriceOnline>6.50</PriceOnline><DeclaredValueRequired>True</DeclaredValueRequired></ExtraService></ExtraServices><ValueOfContents>544.00</ValueOfContents><SvcCommitments>1 - 3 business days to many major markets</SvcCommitments><SvcDescription>USPS GXG&lt;sup&gt;&#8482;&lt;/sup&gt; Envelopes</SvcDescription><MaxDimensions>USPS-Produced regular size cardboard envelope (12-1/2" x 9-1/2"), the legal-sized cardboard envelope (15" x 9-1/2") and the GXG Tyvek envelope (15-1/2" x 12-1/2")</MaxDimensions><MaxWeight>70</MaxWeight><GXGLocations><PostOffice><Name>EUREKA</Name><Address>113 14TH ST</Address><City>EUREKA</City><State>MT</State><ZipCode>59917</ZipCode><RetailGXGCutOffTime>5:00 PM</RetailGXGCutOffTime><SaturDayCutOffTime>1:30 PM</SaturDayCutOffTime></PostOffice></GXGLocations></Service><Service ID="1"><Pounds>43</Pounds><Ounces>8</Ounces><MailType>All</MailType><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><Country>CANADA</Country><Postage>261.10</Postage><CommercialPostage>242.08</CommercialPostage><ExtraServices><ExtraService><ServiceID>107</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><OnlineAvailable>True</OnlineAvailable><Price>12.25</Price><PriceOnline>12.25</PriceOnline><DeclaredValueRequired>True</DeclaredValueRequired></ExtraService></ExtraServices><ValueOfContents>544.00</ValueOfContents><SvcCommitments>3 - 5 business days to many major markets</SvcCommitments><SvcDescription>Priority Mail Express International&lt;sup&gt;&#8482;&lt;/sup&gt;</SvcDescription><MaxDimensions>Max. length 59", max. length plus girth 108"</MaxDimensions><MaxWeight>66</MaxWeight></Service><Service ID="2"><Pounds>43</Pounds><Ounces>8</Ounces><MailType>All</MailType><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><Country>CANADA</Country><Postage>187.25</Postage><CommercialPostage>177.89</CommercialPostage><ExtraServices><ExtraService><ServiceID>108</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><OnlineAvailable>True</OnlineAvailable><Price>12.25</Price><PriceOnline>12.25</PriceOnline><DeclaredValueRequired>True</DeclaredValueRequired></ExtraService><ExtraService><ServiceID>105</ServiceID><ServiceName>Return Receipt</ServiceName><Available>True</Available><OnlineAvailable>True</OnlineAvailable><Price>4.25</Price><PriceOnline>4.25</PriceOnline></ExtraService></ExtraServices><ValueOfContents>544.00</ValueOfContents><SvcCommitments>6 - 10 business days to many major markets</SvcCommitments><SvcDescription>Priority Mail International&lt;sup&gt;&#174;&lt;/sup&gt;</SvcDescription><MaxDimensions>Max. length 79", max. length plus girth 108"</MaxDimensions><MaxWeight>66</MaxWeight></Service></Package></IntlRateV2Response>
-
Re: USPS Shipping Module [Support Thread]
In posting my reply, I'm getting the following error:
The following errors occurred with your submission
The text that you have entered is too long (24643 characters). Please shorten it to 23000 characters long.
I'll try to shorten the output a bit, or put in two different replies.
-
Re: USPS Shipping Module [Support Thread]
Code:
2021-02-05 13:08:31: USPS build: 2020-09-24 K11
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 40
Total Quote Weight: 43 Pounds: 43 Ounces: 0
Maximum: 50 Tare Rates: Small/Medium: 0:3 Large: 10:0
Handling method: Order Handling fee Domestic: $1.00 Handling fee International: $1.00
Decimals: 2
Domestic Length: 8.625 Width: 5.375 Height: 1.625
International Length: 9.50 Width: 1.0 Height: 5.50
All Packages are Machinable: False
Enable USPS First-Class filter for US shipping: True
Sorts the returned quotes: Price-LowToHigh
ZipOrigination: 59917
ZipDestination: Postcode: V0P 1K0 Country: Canada City: Mansons Landing State: British Columbia
Order SubTotal: $528.00
Order Total: $528.00
Uninsurable Portion: $0.00
Insurable Value: $528.00
2021-02-05 13:08:31: Sending request to USPS
2021-02-05 13:08:31: ==================================
SENT TO USPS:
<IntlRateV2Request USERID="xxxxxxxxxx"><Revision>2</Revision>
<Package ID="0"><Pounds>43</Pounds><Ounces>0</Ounces><MailType>All</MailType><GXG> <POBoxFlag>N</POBoxFlag> <GiftFlag>N</GiftFlag></GXG><ValueOfContents>528.00</ValueOfContents><Country>Canada</Country><Container>RECTANGULAR</Container><Size>REGULAR</Size><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><OriginZip>59917</OriginZip><CommercialFlag>Y</CommercialFlag></Package>
</IntlRateV2Request>
RESPONSE FROM USPS:
==================================
CommErr (should be 0): 0 -
==================================
USPS Country - $order->delivery[country][iso_code_2]: Canada $this->usps_countries: CA
International Services Selected:
2021-02-05 13:08:31: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Package] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 0
)
[Prohibitions] => An issue of a publication in which more than 5 percent of its total advertising space is primarily directed to a Canadian market and which indicates:
(a) Specifically where goods or services may be obtained in Canada, or
(b) Specific items or conditions relating to the sale or provision of goods or services in Canada.
All alcoholic beverages including wines, etc.
An issue of a publication that contains an advertisement primarily directed to a Canadian market is a prohibited import if that advertisement does not appear in identical form in all editions of the issue distributed in the country of origin.
Articles so marked as to create the false impression that they were made in Canada, Great Britain or any other British country.
Commercial tags of metal.
Firearms, except as follows: Firearms may be mailed to Canada if the importer has the required documentation and if the firearms meet the requirements in Publication 52, subchapter 43 and part 632. Before mailing, customers must visit cbsa-asfc.gc.ca/import/iefw-iefa-eng.html to review Canadian import requirements.
Gold bullion, gold dust, and nonmanufactured precious metals.
Non-refillable lighters or any other lighter that contains fuel. New lighters with no fuel may be sent.
Oleomargarine and other butter substitutes, including altered or renovated butter.
Perishable infectious biological substances.
Perishable noninfectious biological substances.
Plumage and skins of wild birds.
Prison-made goods being sold or intended for sale by a person or firm.
Radioactive materials.
############## or inert munitions, as well as other devices that simulate explosive devices or munitions, including ############## or inert grenades or other simulated military munitions, whether or not such items are for display purposes.
Reprints of Canadian or British works copyrighted in Canada.
Reproductions of Canadian postage stamps unless printed in publications in black and white only and with a defacing line drawn across each reproduction.
Shipments bearing caution labels indicating the contents are flammable.
Smoke-making devices for motor vehicles and boats.
Used or secondhand hives or bee supplies.
Vaping liquids containing 66 mg/g or more nicotine by weight. Note: The U.S. Postal Service measures the concentration of nicotine solutions by volume rather than by weight, so it is possible that a product that does not exceed Canada's weight restriction would exceed the Postal Service's volume restriction. Nicotine solutions with a concentration of 16.67 percent (166 mg/ml) or more, when nicotine is the only toxic material in the liquid, are classified as "dangerous goods" (see 136.1) and as such are prohibited in international mail. (See also Observation 1.)
[Restrictions] => Coins; banknotes; currency notes; securities payable to bearer; traveler's checks; gold, silver, platinum, manufactured or not; jewelry; and other valuable articles may be sent only in registered items First-Class Package International Service with Registered Mail service.
Exceptions:
Coins sent to or from collectors or dealers may be mailed in ordinary (uninsured) parcels.
Drugs and medicines must comply with Canadian law.
Eggs for hatching must be packed in new, clean containers and accompanied by a certificate issued by a veterinarian of the U.S. Department of Agriculture, or one issued by a State veterinarian and endorsed by a veterinarian of that Bureau, stating that to the best of his or her knowledge the eggs come from a flock that is free from Newcastle disease, fowl pest, or fowl typhoid. See 135.3 for method of packing.
Meat and meat food products must be accompanied by an export certificate issued by the U.S. Department of Agriculture and labeled in accordance with Canadian regulations. Exception to these requirements are:
1. bona fide sample shipments weighing less than 10 kg;
2. meat products addressed to a government department or agency;
3. meat products intended for personal consumption when they enter Canada in the possession of the importer.
Pet food that contains biologically appropriate raw food or bones and raw food - such as heat-processed, shelf-stable pet foods, treats, and compound chews - must be accompanied by an import permit from the Canadian Food Inspection Agency and a zoo sanitary certificate from the United States Department of Agriculture (USDA) Animal and Plant Health Inspection Service (APHIS) Veterinarian Services. Attach a copy of both documents to the outside of the mailpiece for review by the Canada Border Service Agency.
Precious stones, set or not set; all items used as dress ornaments and coming under the term "jewelry" including articles of gold or other precious metal for personal use such as cigarette holders, cases, powder cases, card cases, opera glasses, fountain pens, watches, etc., are permitted in insured parcels provided the articles have value not over $5 U.S. A parcel containing a number of such articles valued at $5 or less may be insured for the total value of the contents up to a maximum of $200.
Veterinary biological products including serums and vaccines must be accompanied by a permit issued by the Veterinary Director General, Ministry of Agriculture of Canada.
[Observations] => 1. As noted in the Prohibitions section, Canada prohibits certain vaping products. However, vaping products, otherwise known as electronic smoking products (i.e., electronic products for the vaporization and administration of inhaled doses of nicotine including electronic cigarettes, cigars, cigarillos, and pipes, as well as cartridges of nicotine solutions and related products), that make health claims are subject to the Canadian Food and Drugs Act (FDA). "Health claims" refers to any statement that represents the product as a drug or device under section 2 of the FDA - for example, a statement that the product will help someone quit smoking. Vaping products that make health claims require authorization under the FDA before being commercially imported, advertised, or sold in Canada. A vaping product that makes health claims is considered a prescription drug, and before importation to Canada, it requires a Drug Establishment License and an assigned corresponding Drug Identification Number (DIN). For more information, visit canada.ca/en/health-canada/topics/licensing-authorizing-manufacturing-drug-health-products.html. Vaping products with no health claims and no drugs other than nicotine are not subject to the FDA.
2. Banknotes valued at $100 or more must be put up in a compact package and securely tied with strong twine before wrapping. The wrapper must be linen or other strong, woven material, linen lined paper, or two thicknesses of strong kraft paper. After wrapping, the package must be again securely tied or stitched and sealed at the points of closing.
3. The name of the Canadian province in which the office of destination is located must appear as part of the address.
4. The following must not be accepted for insurance:
Bees, postage stamps (canceled and uncanceled) and albums in which they are mounted, and parcels addressed to CFPOs.
5. Canadian Forces Mail (CFPO) is processed through Canadian military post offices and must be addressed in the following manner:
(a) NUMBER, RANK, NAME UNIT
(b) CFPO (NUMBER)
(c) BELLEVILLE ON K0K 3R0
(d) CANADA
Maximum weight limits for mail addressed to members of the Canadian Forces based outside of Canada (CFPO) is 22 pounds. Parcels for CFPO addresses may not be insured. Direct sacks of printed matter (M-bags) are not permitted for CFPO addresses.
6. A letter fully prepaid and bearing the same address as that of a parcel may be tied or otherwise securely attached to the outside of the parcel. Stamps to cover postage on the parcel must be affixed to the wrapper of the parcel. Stamps to pay postage on the letter must be affixed to the envelope thereof.
7. Certain types of merchandise must be marked to show country of origin in the manner prescribed by the Canadian customs regulations.
8. Goods valued under 20 Canadian dollars are duty and excise tax exempt. Goods over 20 Canadian dollars will be subject to the applicable duties and excise taxes. Gift shipments received by mail that are valued under 60 Canadian dollars are duty and excise tax exempt.
9. For all casual and commercial goods valued at or under 1,600 Canadian dollars, Canada Post will collect assessed duties, excise taxes, and a handling fee from the addressee. This handling fee is set by Canada Post (see http://www.canadapost.ca/tools/pg/manual/PGcustoms-e.asp). All commercial mail items over 1,600 Canadian dollars will be held by Canada Customs and Excise until proper invoice and accounting documentation is provided by the addressee.
10. The Canada Customs Invoice can be obtained from stationery, office supply, or printing companies. If mailers are unable to obtain the Canada Customs Invoice locally, they should visit the following Web site: www.canadapost.ca. In addition, commercial invoices are acceptable provided that each invoice has the required information for customs purposes.
11. Information on Canadian customs regulations may be obtained from the Office of International Marketing/223, Bureau of International Commerce, Department of Commerce, Washington, DC 20230, or any field office of that Department.
Obtaining post code information:
12. Information on Canadian post code directories can be obtained from:
(a) NATIONAL PHILATELIC CENTER
CANADA POST CORPORATION
STATION 1
ANTIGONISH NS B2G 2R8
Telephone: 1-800-565-4362
Fax: 1-902-863-6796
(b) To obtain Canadian post codes for specific addresses, call the General Information line at 1-416-979-8822 or access the Canada Post Corporation web site on the Internet at http://www.canadapost.ca.
13. Pursuant to the Canada Customs Act and a need to heighten border security, Canada will deny entry of all postal items (except postcards) that do not bear complete sender and addressee information in roman letters and arabic numerals.
[CustomsForms] => First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes:
PS Form 2976 (see 123.61)
Priority Mail International parcels:
PS Form 2976-A inside 2976-E (envelope)
[ExpressMail] => Country Code:
CA
Reciprocal Service Name:
There is no reciprocal service.
Required Customs Form/Endorsement
1. Business papers and commercial documents.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
2. Merchandise samples and gift shipments (non-commercial parcels).
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
3. Merchandise (commercial shipments) and all articles subject to customs duty.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
Notes:
1. Gift shipments (non-commercial parcels) require a sales receipt, invoice or other documentation to support the declared value.
2. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to Canada.
3. Priority Mail Express International shipments may have a street address or a post office box address. A local telephone number for the addressee MUST be provided for shipments addressed to a post office box address. A local telephone number for the addressee should be provided if possible for shipments to a street address.
-
Re: USPS Shipping Module [Support Thread]
Code:
Areas Served: All
[AreasServed] => Please reference Express Mail for Areas Served.
[AdditionalRestrictions] => No Additional Restrictions Data found.
[Service] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 4
)
[Pounds] => 43
[Ounces] => 0
[MailType] => All
[GXG] => SimpleXMLElement Object
(
[POBoxFlag] => N
[GiftFlag] => N
)
[Width] => 1.0
[Length] => 9.50
[Height] => 5.50
[Girth] => 0
[Country] => CANADA
[Postage] => 298.05
[CommercialPostage] => 283.15
[ExtraServices] => SimpleXMLElement Object
(
[ExtraService] => SimpleXMLElement Object
(
[ServiceID] => 106
[ServiceName] => Insurance
[Available] => True
[OnlineAvailable] => True
[Price] => 6.50
[PriceOnline] => 6.50
[DeclaredValueRequired] => True
)
)
[ValueOfContents] => 528.00
[SvcCommitments] => 1 - 3 business days to many major markets
[SvcDescription] => Global Express Guaranteed<sup>®</sup> (GXG)
[MaxDimensions] => Max. length 46", width 35", height 46" and max. length plus girth combined 108"
[MaxWeight] => 70
[GXGLocations] => SimpleXMLElement Object
(
[PostOffice] => SimpleXMLElement Object
(
[Name] => EUREKA
[Address] => 113 14TH ST
[City] => EUREKA
[State] => MT
[ZipCode] => 59917
[RetailGXGCutOffTime] => 5:00 PM
[SaturDayCutOffTime] => 1:30 PM
)
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 12
)
[Pounds] => 43
[Ounces] => 0
[MailType] => All
[Width] => 1.0
[Length] => 9.50
[Height] => 5.50
[Girth] => 0
[Country] => CANADA
[Postage] => 298.05
[CommercialPostage] => 283.15
[ExtraServices] => SimpleXMLElement Object
(
[ExtraService] => SimpleXMLElement Object
(
[ServiceID] => 106
[ServiceName] => Insurance
[Available] => True
[OnlineAvailable] => True
[Price] => 6.50
[PriceOnline] => 6.50
[DeclaredValueRequired] => True
)
)
[ValueOfContents] => 528.00
[SvcCommitments] => 1 - 3 business days to many major markets
[SvcDescription] => USPS GXG<sup>™</sup> Envelopes
[MaxDimensions] => USPS-Produced regular size cardboard envelope (12-1/2" x 9-1/2"), the legal-sized cardboard envelope (15" x 9-1/2") and the GXG Tyvek envelope (15-1/2" x 12-1/2")
[MaxWeight] => 70
[GXGLocations] => SimpleXMLElement Object
(
[PostOffice] => SimpleXMLElement Object
(
[Name] => EUREKA
[Address] => 113 14TH ST
[City] => EUREKA
[State] => MT
[ZipCode] => 59917
[RetailGXGCutOffTime] => 5:00 PM
[SaturDayCutOffTime] => 1:30 PM
)
)
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 1
)
[Pounds] => 43
[Ounces] => 0
[MailType] => All
[Width] => 1.0
[Length] => 9.50
[Height] => 5.50
[Girth] => 0
[Country] => CANADA
[Postage] => 256.80
[CommercialPostage] => 238.11
[ExtraServices] => SimpleXMLElement Object
(
[ExtraService] => SimpleXMLElement Object
(
[ServiceID] => 107
[ServiceName] => Insurance
[Available] => True
[OnlineAvailable] => True
[Price] => 12.25
[PriceOnline] => 12.25
[DeclaredValueRequired] => True
)
)
[ValueOfContents] => 528.00
[SvcCommitments] => 3 - 5 business days to many major markets
[SvcDescription] => Priority Mail Express International<sup>™</sup>
[MaxDimensions] => Max. length 59", max. length plus girth 108"
[MaxWeight] => 66
)
[3] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 2
)
[Pounds] => 43
[Ounces] => 0
[MailType] => All
[Width] => 1.0
[Length] => 9.50
[Height] => 5.50
[Girth] => 0
[Country] => CANADA
[Postage] => 183.85
[CommercialPostage] => 174.66
[ExtraServices] => SimpleXMLElement Object
(
[ExtraService] => Array
(
[0] => SimpleXMLElement Object
(
[ServiceID] => 108
[ServiceName] => Insurance
[Available] => True
[OnlineAvailable] => True
[Price] => 12.25
[PriceOnline] => 12.25
[DeclaredValueRequired] => True
)
[1] => SimpleXMLElement Object
(
[ServiceID] => 105
[ServiceName] => Return Receipt
[Available] => True
[OnlineAvailable] => True
[Price] => 4.25
[PriceOnline] => 4.25
)
)
)
[ValueOfContents] => 528.00
[SvcCommitments] => 6 - 10 business days to many major markets
[SvcDescription] => Priority Mail International<sup>®</sup>
[MaxDimensions] => Max. length 79", max. length plus girth 108"
[MaxWeight] => 66
)
)
)
)
-
Re: USPS Shipping Module [Support Thread]
I'm not sure if this is a 1.5.7 (unsuffixed) anomaly since international shipments are working fine on my needlework site that's running zc157a. Do you have any zone-restriction associated with the USPS shipping module?
-
Re: USPS Shipping Module [Support Thread]
I think I see the issue. That quote that you posted was for a 43 pound shipment, but the maximum weight (the default, anyway) for the International F/R boxes is 4, 20 or 20 pounds for the F/R small/medium/large boxes, respectively
-
Re: USPS Shipping Module [Support Thread]
Each item weighs 0.5 lb in the product admin. I went back and added just the 1 item to the cart weighing 0.5 and tried to check-out and got the same error. This is currently the only shipping method available to use on this order. Here's another debug (split into two posts) showing Cart Weight: 0.5 Total Quote Weight: 3.5 Pounds: 3 Ounces: 8 (Not sure where it gets the rest of the weight from)
Code:
2021-02-05 14:25:04: USPS build: 2020-09-24 K11
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.5
Total Quote Weight: 3.5 Pounds: 3 Ounces: 8
Maximum: 50 Tare Rates: Small/Medium: 0:3 Large: 10:0
Handling method: Order Handling fee Domestic: $1.00 Handling fee International: $1.00
Decimals: 2
Domestic Length: 8.625 Width: 5.375 Height: 1.625
International Length: 9.50 Width: 1.0 Height: 5.50
All Packages are Machinable: False
Enable USPS First-Class filter for US shipping: True
Sorts the returned quotes: Price-LowToHigh
ZipOrigination: 59917
ZipDestination: Postcode: V0P 1K0 Country: Canada City: Mansons Landing State: British Columbia
Order SubTotal: $16.00
Order Total: $16.00
Uninsurable Portion: $0.00
Insurable Value: $16.00
2021-02-05 14:25:04: Sending request to USPS
2021-02-05 14:25:05: ==================================
SENT TO USPS:
<IntlRateV2Request USERID="xxxxxxxxxx"><Revision>2</Revision>
<Package ID="0"><Pounds>3</Pounds><Ounces>8</Ounces><MailType>All</MailType><GXG> <POBoxFlag>N</POBoxFlag> <GiftFlag>N</GiftFlag></GXG><ValueOfContents>16.00</ValueOfContents><Country>Canada</Country><Container>RECTANGULAR</Container><Size>REGULAR</Size><Width>1.0</Width><Length>9.50</Length><Height>5.50</Height><Girth>0</Girth><OriginZip>59917</OriginZip><CommercialFlag>Y</CommercialFlag></Package>
</IntlRateV2Request>
RESPONSE FROM USPS:
==================================
CommErr (should be 0): 0 -
==================================
USPS Country - $order->delivery[country][iso_code_2]: Canada $this->usps_countries: CA
International Services Selected:
2021-02-05 14:25:05: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Package] => SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 0
)
[Prohibitions] => An issue of a publication in which more than 5 percent of its total advertising space is primarily directed to a Canadian market and which indicates:
(a) Specifically where goods or services may be obtained in Canada, or
(b) Specific items or conditions relating to the sale or provision of goods or services in Canada.
All alcoholic beverages including wines, etc.
An issue of a publication that contains an advertisement primarily directed to a Canadian market is a prohibited import if that advertisement does not appear in identical form in all editions of the issue distributed in the country of origin.
Articles so marked as to create the false impression that they were made in Canada, Great Britain or any other British country.
Commercial tags of metal.
Firearms, except as follows: Firearms may be mailed to Canada if the importer has the required documentation and if the firearms meet the requirements in Publication 52, subchapter 43 and part 632. Before mailing, customers must visit cbsa-asfc.gc.ca/import/iefw-iefa-eng.html to review Canadian import requirements.
Gold bullion, gold dust, and nonmanufactured precious metals.
Non-refillable lighters or any other lighter that contains fuel. New lighters with no fuel may be sent.
Oleomargarine and other butter substitutes, including altered or renovated butter.
Perishable infectious biological substances.
Perishable noninfectious biological substances.
Plumage and skins of wild birds.
Prison-made goods being sold or intended for sale by a person or firm.
Radioactive materials.
############## or inert munitions, as well as other devices that simulate explosive devices or munitions, including ############## or inert grenades or other simulated military munitions, whether or not such items are for display purposes.
Reprints of Canadian or British works copyrighted in Canada.
Reproductions of Canadian postage stamps unless printed in publications in black and white only and with a defacing line drawn across each reproduction.
Shipments bearing caution labels indicating the contents are flammable.
Smoke-making devices for motor vehicles and boats.
Used or secondhand hives or bee supplies.
Vaping liquids containing 66 mg/g or more nicotine by weight. Note: The U.S. Postal Service measures the concentration of nicotine solutions by volume rather than by weight, so it is possible that a product that does not exceed Canada's weight restriction would exceed the Postal Service's volume restriction. Nicotine solutions with a concentration of 16.67 percent (166 mg/ml) or more, when nicotine is the only toxic material in the liquid, are classified as "dangerous goods" (see 136.1) and as such are prohibited in international mail. (See also Observation 1.)
[Restrictions] => Coins; banknotes; currency notes; securities payable to bearer; traveler's checks; gold, silver, platinum, manufactured or not; jewelry; and other valuable articles may be sent only in registered items First-Class Package International Service with Registered Mail service.
Exceptions:
Coins sent to or from collectors or dealers may be mailed in ordinary (uninsured) parcels.
Drugs and medicines must comply with Canadian law.
Eggs for hatching must be packed in new, clean containers and accompanied by a certificate issued by a veterinarian of the U.S. Department of Agriculture, or one issued by a State veterinarian and endorsed by a veterinarian of that Bureau, stating that to the best of his or her knowledge the eggs come from a flock that is free from Newcastle disease, fowl pest, or fowl typhoid. See 135.3 for method of packing.
Meat and meat food products must be accompanied by an export certificate issued by the U.S. Department of Agriculture and labeled in accordance with Canadian regulations. Exception to these requirements are:
1. bona fide sample shipments weighing less than 10 kg;
2. meat products addressed to a government department or agency;
3. meat products intended for personal consumption when they enter Canada in the possession of the importer.
Pet food that contains biologically appropriate raw food or bones and raw food - such as heat-processed, shelf-stable pet foods, treats, and compound chews - must be accompanied by an import permit from the Canadian Food Inspection Agency and a zoo sanitary certificate from the United States Department of Agriculture (USDA) Animal and Plant Health Inspection Service (APHIS) Veterinarian Services. Attach a copy of both documents to the outside of the mailpiece for review by the Canada Border Service Agency.
Precious stones, set or not set; all items used as dress ornaments and coming under the term "jewelry" including articles of gold or other precious metal for personal use such as cigarette holders, cases, powder cases, card cases, opera glasses, fountain pens, watches, etc., are permitted in insured parcels provided the articles have value not over $5 U.S. A parcel containing a number of such articles valued at $5 or less may be insured for the total value of the contents up to a maximum of $200.
Veterinary biological products including serums and vaccines must be accompanied by a permit issued by the Veterinary Director General, Ministry of Agriculture of Canada.
[Observations] => 1. As noted in the Prohibitions section, Canada prohibits certain vaping products. However, vaping products, otherwise known as electronic smoking products (i.e., electronic products for the vaporization and administration of inhaled doses of nicotine including electronic cigarettes, cigars, cigarillos, and pipes, as well as cartridges of nicotine solutions and related products), that make health claims are subject to the Canadian Food and Drugs Act (FDA). "Health claims" refers to any statement that represents the product as a drug or device under section 2 of the FDA - for example, a statement that the product will help someone quit smoking. Vaping products that make health claims require authorization under the FDA before being commercially imported, advertised, or sold in Canada. A vaping product that makes health claims is considered a prescription drug, and before importation to Canada, it requires a Drug Establishment License and an assigned corresponding Drug Identification Number (DIN). For more information, visit canada.ca/en/health-canada/topics/licensing-authorizing-manufacturing-drug-health-products.html. Vaping products with no health claims and no drugs other than nicotine are not subject to the FDA.
2. Banknotes valued at $100 or more must be put up in a compact package and securely tied with strong twine before wrapping. The wrapper must be linen or other strong, woven material, linen lined paper, or two thicknesses of strong kraft paper. After wrapping, the package must be again securely tied or stitched and sealed at the points of closing.
3. The name of the Canadian province in which the office of destination is located must appear as part of the address.
4. The following must not be accepted for insurance:
Bees, postage stamps (canceled and uncanceled) and albums in which they are mounted, and parcels addressed to CFPOs.
5. Canadian Forces Mail (CFPO) is processed through Canadian military post offices and must be addressed in the following manner:
(a) NUMBER, RANK, NAME UNIT
(b) CFPO (NUMBER)
(c) BELLEVILLE ON K0K 3R0
(d) CANADA
Maximum weight limits for mail addressed to members of the Canadian Forces based outside of Canada (CFPO) is 22 pounds. Parcels for CFPO addresses may not be insured. Direct sacks of printed matter (M-bags) are not permitted for CFPO addresses.
6. A letter fully prepaid and bearing the same address as that of a parcel may be tied or otherwise securely attached to the outside of the parcel. Stamps to cover postage on the parcel must be affixed to the wrapper of the parcel. Stamps to pay postage on the letter must be affixed to the envelope thereof.
7. Certain types of merchandise must be marked to show country of origin in the manner prescribed by the Canadian customs regulations.
8. Goods valued under 20 Canadian dollars are duty and excise tax exempt. Goods over 20 Canadian dollars will be subject to the applicable duties and excise taxes. Gift shipments received by mail that are valued under 60 Canadian dollars are duty and excise tax exempt.
9. For all casual and commercial goods valued at or under 1,600 Canadian dollars, Canada Post will collect assessed duties, excise taxes, and a handling fee from the addressee. This handling fee is set by Canada Post (see http://www.canadapost.ca/tools/pg/manual/PGcustoms-e.asp). All commercial mail items over 1,600 Canadian dollars will be held by Canada Customs and Excise until proper invoice and accounting documentation is provided by the addressee.
10. The Canada Customs Invoice can be obtained from stationery, office supply, or printing companies. If mailers are unable to obtain the Canada Customs Invoice locally, they should visit the following Web site: www.canadapost.ca. In addition, commercial invoices are acceptable provided that each invoice has the required information for customs purposes.
11. Information on Canadian customs regulations may be obtained from the Office of International Marketing/223, Bureau of International Commerce, Department of Commerce, Washington, DC 20230, or any field office of that Department.
Obtaining post code information:
12. Information on Canadian post code directories can be obtained from:
(a) NATIONAL PHILATELIC CENTER
CANADA POST CORPORATION
STATION 1
ANTIGONISH NS B2G 2R8
Telephone: 1-800-565-4362
Fax: 1-902-863-6796
(b) To obtain Canadian post codes for specific addresses, call the General Information line at 1-416-979-8822 or access the Canada Post Corporation web site on the Internet at http://www.canadapost.ca.
13. Pursuant to the Canada Customs Act and a need to heighten border security, Canada will deny entry of all postal items (except postcards) that do not bear complete sender and addressee information in roman letters and arabic numerals.
[CustomsForms] => First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes:
PS Form 2976 (see 123.61)
Priority Mail International parcels:
PS Form 2976-A inside 2976-E (envelope)
[ExpressMail] => Country Code:
CA
Reciprocal Service Name:
There is no reciprocal service.
Required Customs Form/Endorsement
1. Business papers and commercial documents.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
2. Merchandise samples and gift shipments (non-commercial parcels).
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
3. Merchandise (commercial shipments) and all articles subject to customs duty.
PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
Notes:
1. Gift shipments (non-commercial parcels) require a sales receipt, invoice or other documentation to support the declared value.
2. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to Canada.
3. Priority Mail Express International shipments may have a street address or a post office box address. A local telephone number for the addressee MUST be provided for shipments addressed to a post office box address. A local telephone number for the addressee should be provided if possible for shipments to a street address.
-
Re: USPS Shipping Module [Support Thread]
Code:
AreasServed:All
[AreasServed]=>PleasereferenceExpressMailforAreasServed.
[AdditionalRestrictions]=>NoAdditionalRestrictionsDatafound.
[Service]=>Array
(
[0]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>4
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[GXG]=>SimpleXMLElementObject
(
[POBoxFlag]=>N
[GiftFlag]=>N
)
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>99.65
[CommercialPostage]=>94.67
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>106
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>1-3businessdaystomanymajormarkets
[SvcDescription]=>GlobalExpressGuaranteed<sup>®</sup>(GXG)
[MaxDimensions]=>Max.length46",width35",height46"andmax.lengthplusgirthcombined108"
[MaxWeight]=>70
[GXGLocations]=>SimpleXMLElementObject
(
[PostOffice]=>SimpleXMLElementObject
(
[Name]=>EUREKA
[Address]=>11314THST
[City]=>EUREKA
[State]=>MT
[ZipCode]=>59917
[RetailGXGCutOffTime]=>5:00PM
[SaturDayCutOffTime]=>1:30PM
)
)
)
[1]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>12
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>99.65
[CommercialPostage]=>94.67
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>106
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>1-3businessdaystomanymajormarkets
[SvcDescription]=>USPSGXG<sup>™</sup>Envelopes
[MaxDimensions]=>USPS-Producedregularsizecardboardenvelope(12-1/2"x9-1/2"),thelegal-sizedcardboardenvelope(15"x9-1/2")andtheGXGTyvekenvelope(15-1/2"x12-1/2")
[MaxWeight]=>70
[GXGLocations]=>SimpleXMLElementObject
(
[PostOffice]=>SimpleXMLElementObject
(
[Name]=>EUREKA
[Address]=>11314THST
[City]=>EUREKA
[State]=>MT
[ZipCode]=>59917
[RetailGXGCutOffTime]=>5:00PM
[SaturDayCutOffTime]=>1:30PM
)
)
)
[2]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>1
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>66.40
[CommercialPostage]=>61.79
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>107
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>3-5businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailExpressInternational<sup>™</sup>
[MaxDimensions]=>Max.length59",max.lengthplusgirth108"
[MaxWeight]=>66
)
[3]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>10
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>45.95
[CommercialPostage]=>42.85
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>107
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>3-5businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailExpressInternational<sup>™</sup>FlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:12-1/2"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[4]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>17
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>45.95
[CommercialPostage]=>42.85
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>107
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>3-5businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailExpressInternational<sup>™</sup>LegalFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:15"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[5]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>27
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>45.95
[CommercialPostage]=>42.85
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>SimpleXMLElementObject
(
[ServiceID]=>107
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>3-5businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailExpressInternational<sup>™</sup>PaddedFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:12-1/2"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[6]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>2
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>51.75
[CommercialPostage]=>49.16
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>
[MaxDimensions]=>Max.length79",max.lengthplusgirth108"
[MaxWeight]=>66
)
[7]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>11
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>71.05
[CommercialPostage]=>67.50
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>LargeFlatRateBox
[MaxDimensions]=>USPS-ProducedBox:23-11/16"x11-3/4"x3"or12"x12"x5-1/2"<br>Maximumweight20pounds.
[MaxWeight]=>20
)
[8]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>9
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>54.65
[CommercialPostage]=>51.90
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>MediumFlatRateBox
[MaxDimensions]=>USPS-ProducedBox:13-5/8"x11-7/8"x3-3/8"or11"x8-1/2"x5-1/2"<br>Maximumweight20pounds.
[MaxWeight]=>20
)
[9]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>8
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>28.50
[CommercialPostage]=>27.10
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>FlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:12-1/2"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[10]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>22
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>28.50
[CommercialPostage]=>27.10
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>LegalFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:15"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[11]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>23
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>28.50
[CommercialPostage]=>27.10
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>PaddedFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:12-1/2"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[12]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>18
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>28.50
[CommercialPostage]=>27.10
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>GiftCardFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:10"x7"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[13]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>19
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>28.50
[CommercialPostage]=>27.10
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>108
[ServiceName]=>Insurance
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
[DeclaredValueRequired]=>True
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[SvcCommitments]=>6-10businessdaystomanymajormarkets
[SvcDescription]=>PriorityMailInternational<sup>®</sup>WindowFlatRateEnvelope
[MaxDimensions]=>USPS-ProducedEnvelope:10"x5"or12-1/2"x9-1/2"<br>Maximumweight4pounds.
[MaxWeight]=>4
)
[14]=>SimpleXMLElementObject
(
[@attributes]=>Array
(
[ID]=>15
)
[Pounds]=>3
[Ounces]=>8
[MailType]=>All
[Width]=>1.0
[Length]=>9.50
[Height]=>5.50
[Girth]=>0
[Country]=>CANADA
[Postage]=>44.75
[CommercialPostage]=>42.51
[ExtraServices]=>SimpleXMLElementObject
(
[ExtraService]=>Array
(
[0]=>SimpleXMLElementObject
(
[ServiceID]=>109
[ServiceName]=>ElectronicUSPSDeliveryConfirmation™International(E-USPSDELCONINTL™)
[Available]=>True
[OnlineAvailable]=>True
[Price]=>0.00
[PriceOnline]=>0.00
)
[1]=>SimpleXMLElementObject
(
[ServiceID]=>100
[ServiceName]=>CertificateofMailing
[Available]=>True
[OnlineAvailable]=>True
[Price]=>1.55
[PriceOnline]=>1.55
)
[2]=>SimpleXMLElementObject
(
[ServiceID]=>103
[ServiceName]=>RegisteredMail
[Available]=>True
[OnlineAvailable]=>True
[Price]=>16.30
[PriceOnline]=>16.30
)
[3]=>SimpleXMLElementObject
(
[ServiceID]=>105
[ServiceName]=>ReturnReceipt
[Available]=>True
[OnlineAvailable]=>True
[Price]=>4.25
[PriceOnline]=>4.25
)
)
)
[ValueOfContents]=>16.00
[InsComment]=>SERVICE
[SvcCommitments]=>Variesbydestination
[SvcDescription]=>First-ClassPackageInternationalService<sup>™</sup>
[MaxDimensions]=>Otherthanrolls:Min.length6",Min.height4",Max.length24",maxlength,heightanddepth(thickness)combined36"<br>Rolls:Max.length36".Maxlengthandtwicethediametercombined42"
[MaxWeight]=>4
)
)
)
)
-
Re: USPS Shipping Module [Support Thread]
What are the site's settings for Configuration :: Shipping/Packaging? There are some 'tare' weight additions defined there that will affect the final shipping weight.
Update: Those are shown in the debug:
Maximum: 50 Tare Rates: Small/Medium: 0:3 Large: 10:0
-
Re: USPS Shipping Module [Support Thread]
It was set to 0:3, and I changed to 0:0, but no difference.
After I changed that to 0;0, I adjusted some of the weights in the International section of the USPS Shipping Mod:
Priority Sm. F/R Box 0 - 1.2
Priority Md. F/R Box 1.3 - 5
Priority Lg. F/R Box 5 - 70
I can add enough items to the cart to get the Medium Flat Rate shipping option to show, but if I remove just 1 item, then I go back to: This is currently the only shipping method available to use on this order.
Not sure I'm understanding what's going on. Each item weighs 0.2. I can fit 6 in a small flat rate box.
-
Re: USPS Shipping Module [Support Thread]
I'm checking it out and I don't recommend changing those weights from their default, since those are the maximum weights that USPS accepts. There appears to be something funky going on with the International F/R small box.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
I'm checking it out and I don't recommend changing those weights from their default, since those are the maximum weights that USPS accepts. There appears to be something funky going on with the International F/R small box.
... and there is. For whatever reason, USPS is not returning an International Flat Rate Small quote; that's why it's not showing up. For the medium/large boxes quotes, you'll need to take your Tare settings into account when offering USPS international shipping.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
I'm checking it out and I don't recommend changing those weights from their default, since those are the maximum weights that USPS accepts. There appears to be something funky going on with the International F/R small box.
I've been using weights similarly for years to solve the same specific need as described without a hiccup. One possibility could be a total weight of 1.25 pounds which is not inclusive in any options (or an invisible rounding error just going over 1.2 pounds). I use the 2nd decimal weight to prevent creating that weight window. 0-1.50, 1.51-3.00, 3.01-7.00, etc
Could another possibility be a 'slight change' in the nomenclature used by the USPS in their Jan 24 update? They were notorious for making a single letter or space change a few years ago.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
RixStix
I've been using weights similarly for years to solve the same specific need as described without a hiccup. One possibility could be a total weight of 1.25 pounds which is not inclusive in any options (or an invisible rounding error just going over 1.2 pounds). I use the 2nd decimal weight to prevent creating that weight window. 0-1.50, 1.51-3.00, 3.01-7.00, etc
Could another possibility be a 'slight change' in the nomenclature used by the USPS in their Jan 24 update? They were notorious for making a single letter or space change a few years ago.
Unlike some of the other shipping services, USPS returns all available shipping methods for a given weight and destination. The logs that I've reviewed have not returned any Small Flat Rate Box quotes.
-
Re: USPS Shipping Module [Support Thread]
If you change the dimensions for the International Small Flat Rate box to the actual dimensions of a Small Flat Rate box, the SM FR quotes will be shown.
8.625 x 1.625 x 5.375
I think this has been an issue in the past and the fix was to use actual dimensions. A few minutes ago, I changed the dimensions in my setup to 9.5 x 1 x 5.5 and international sm fr quotes disappeared from the displayed choices. Actually, International First Class also disappeared.
Changed back to actual sm fr size. 1st class and sm fr quotes reappeared. FWIW: I am still using USPS Version Date 2017-09-16
Using these dimensions, an 0-1096 box is still allowed to be used as an alternative packaging to sm fr International ONLY
-
Re: USPS Shipping Module [Support Thread]
Rick, are you referencing the Domestic and International Minimum Length x Height x Width settings?
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
Rick, are you referencing the Domestic and International Minimum Length x Height x Width settings?
Cindy,
Yes, I am. Domestic already shows the actual dimensions of a SMFR box in the min settings.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
RixStix
Cindy,
Yes, I am. Domestic already shows the actual dimensions of a SMFR box in the min settings.
Those default international dimensions have been incorrect for a very, very long time. I've validated that changing the International Minimum Dimensions to match the Domestic Minimum Dimensions does, in fact, result in an International F/R Small Box to be quoted.
Thanks a bunch for the information and the correction! I'll get a GitHub issue created for tracking and get those default dimensions corrected.
-
Re: USPS Shipping Module [Support Thread]
-
Re: USPS Shipping Module [Support Thread]
You don't know how hard it was to force those brain cells to trigger from a session with Linda (ajeh) years ago and once changed in my setup, the settings tend to never be looked at again.
I think at that time, the USPS API actually had the 9.5x1.0x5.5 inch dimensions in the docs.
-
Re: USPS Shipping Module [Support Thread]
I am new to Zencart, and working with installing the USPS mode, I think I got it install right.
- /includes/modules/shipping/usps.php
- /includes/languages/english/modules/shipping/usps.php
- /includes/templates/template_default/images/icons/shipping_usps.gif
have it in test mode. I added a couple things to my cart, but when I go to my cart. Nothing is showing for USPS. It's like the Mod is not there or not working HELP
Any help would be appreciated.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
Coastalpond
I am new to Zencart, and working with installing the USPS mode, I think I got it install right.
- /includes/modules/shipping/usps.php
- /includes/languages/english/modules/shipping/usps.php
- /includes/templates/template_default/images/icons/shipping_usps.gif
have it in test mode. I added a couple things to my cart, but when I go to my cart. Nothing is showing for USPS. It's like the Mod is not there or not working HELP
Any help would be appreciated.
Is that the current (2020-09-24 K11) version of USPS? Which version of Zen Cart is in use?
It would also help if you could post a screenshot of the current settings (obfuscating your USPS ID).
-
Re: USPS Shipping Module [Support Thread]
Yes current version k11 and 1.5.7 of zencart
-
Re: USPS Shipping Module [Support Thread]
settings
United States Postal Service
You will need to have registered an account with USPS at https://secure.shippingapis.com/registration/ to use this module
USPS expects you to use pounds as weight measure for your products.
USPS Version Date
2020-09-24 K11
Enable USPS Shipping
True
Full Name or Short Name
Long
Enter the USPS Web Tools User ID
Which server to use
test
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 weight, 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
9.50
USPS minimum Width
1.0
USPS minimum Height
5.50
Enable USPS First-Class filter for US shipping
True
Shipping Methods (Domestic and International)
First-Class Mail Letter, 0, .21875, 0.00, First-Class Mail Large Envelope, 0, .8125, 0.00, First-Class Package Service - RetailTM, 0, .8125, 0.00, First-ClassTM Package Service, 0, .9375, 0.00, 0, 70, 0.00, USPS Retail GroundRM, 0, 70, 0.00, Priority MailTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, Priority MailTM Small Flat Rate Box, 0, 70, 0.00, Priority MailTM Medium Flat Rate Box, 0, 70, 0.00, Priority MailTM Large Flat Rate Box, 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
Extra Services (Domestic)
Certified MailRM, N, USPS TrackingTM Electronic, Y, USPS TrackingTM, Y, Insurance, Y, Priority Mail Express Insurance, Y, Priority Mail Insurance, Y, Adult Signature Restricted Delivery, N, Adult Signature Required, N, Registered MailTM, N, Collect on Delivery, N, Return Receipt, N, Certificate of Mailing (Form 3665), N, Certificate of Mailing (Form 3817), N, Signature ConfirmationTM Electronic, N, Signature ConfirmationTM, N, Priority Mail Express 1030 AM Delivery, N, Certified MailRM Restricted Delivery, N, Certified MailRM Adult Signature Required, N, Certified MailRM Adult Signature Restricted Delivery, N, Signature ConfirmationTM Restricted Delivery, N, Signature ConfirmationTM Electronic Restricted Delivery, N, Collect on Delivery Restricted Delivery, N, Registered MailTM Restricted Delivery, N, Insurance Restricted Delivery, N, Insurance Restricted Delivery (Priority Mail Express), N, Insurance Restricted Delivery (Priority Mail), N
Extra Services (International)
Registered Mail, N, Insurance, N, Return Receipt, N, Electronic USPS Delivery Confirmation International, N, Certificate of Mailing, N
Retail pricing or Online pricing?
Online
Debug Mode
-
Re: USPS Shipping Module [Support Thread]
Turn the USPS debug-mode on and retry the shipping request. It will be a large file. I'll send you my direct email address via PM (Private Message); send that debug file to me.
-
Re: USPS Shipping Module [Support Thread]
ok I missed a step I see, but still having problems. It seems I didn't go far enough in check out. But when I get to that point where I select the rate. Under the USPS mod I get 80040B1A - Authorization failure. Perhaps username and/or password is incorrect, So I double check the userID and is right. But there is no space for password. I thought in the latest version of the mod you didn't need a password.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
Coastalpond
ok I missed a step I see, but still having problems. It seems I didn't go far enough in check out. But when I get to that point where I select the rate. Under the USPS mod I get 80040B1A - Authorization failure. Perhaps username and/or password is incorrect, So I double check the userID and is right. But there is no space for password. I thought in the latest version of the mod you didn't need a password.
From this posting by Ajeh back in 2014: https://www.zen-cart.com/showthread....n-failure-quot
Call USPS and have them enable your code for the Production Server ... they are open until 11:00pm EST if I am not mistaken ...
-
Re: USPS Shipping Module [Support Thread]
Did that; and it was switched, then this happens.
[05-Apr-2021 19:36:31 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: 96.93.162.190
#1 sizeof() called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php:102]
#2 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php) called at [/home/coastalp/public_html/includes/modules/shipping_estimator.php:297]
#3 require(/home/coastalp/public_html/includes/modules/shipping_estimator.php) called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_shopping_cart_default.php:197]
#4 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_shopping_cart_default.php) called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:251]
#5 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/coastalp/public_html/index.php:94]
--> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php on line 102.
[05-Apr-2021 19:36:31 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: 96.93.162.190
#1 sizeof() called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php:130]
#2 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php) called at [/home/coastalp/public_html/includes/modules/shipping_estimator.php:297]
#3 require(/home/coastalp/public_html/includes/modules/shipping_estimator.php) called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_shopping_cart_default.php:197]
#4 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_shopping_cart_default.php) called at [/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:251]
#5 require(/home/coastalp/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/coastalp/public_html/index.php:94]
--> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/coastalp/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_shipping_estimator.php on line 130.
On the front end I got this message
We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.
If you prefer to use USPS as your shipping method, please contact us for assistance.
(Please check that your Zip Code is entered correctly.
-
Re: USPS Shipping Module [Support Thread]
Using zen cart v1.5.7C, USPS 2020-09-24 K11. I know this is an old problem but this new module has different code. Problem: Always shows Media Mail option even when not in Media Category (5). Where do I place and what do I place to get only Media Category to show Media Mail in this new module???. Any mixture of non media should not show media mail option. Thanks.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
tedjmaines
Using zen cart v1.5.7C, USPS 2020-09-24 K11. I know this is an old problem but this new module has different code. Problem: Always shows Media Mail option even when not in Media Category (5). Where do I place and what do I place to get only Media Category to show Media Mail in this new module???. Any mixture of non media should not show media mail option. Thanks.
I don't understand the problem statement.
What is the "Media Category (5)"? Did you have this working on a previous USPS version? If so, could you point me to a thread where Ajeh identified how to do it?
If I know "how you did it before", I can point you to "how to do it again".
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
I don't understand the problem statement.
What is the "Media Category (5)"? Did you have this working on a previous USPS version? If so, could you point me to a thread where Ajeh identified how to do it?
If I know "how you did it before", I can point you to "how to do it again".
I have never got it working. in previous edition v154 and beyond, we did flat rate. I would like to get this working. I read the other versions post but it does not work for v157c with K11. If someone got it to work in previous versions of USPS maybe they can let you know. The code I read before used a master category number for Media (mine is Master_id = 5) for loop but that did not work on my K11.
-
Re: USPS Shipping Module [Support Thread]
So, we installed the new patch in order to switch the URL's to secrure as directed. Using ZC 1.5.7a and the 2020-09-24 K11 build from USPS. Am I missing a setting somewhere? First Class does not show up as an option even on the lightest shipments, and I'm losing orders based on only priority mail and express mail showing up. I've gone back and checked the USPS module, and really didn't change anything except the handling fee. I don't offer flat rate for anything, so the only options my customers have are First Class Package Service, Priority Mail, Express Mail, First Class International Package, Priority Mail International, and Express Mail International. Here are my settings in the USPS module:
USPS Version Date
2020-09-24 K11
Enable USPS Shipping
True
Full Name or Short Name
Long
Enter the USPS Web Tools User ID
XXXXXXXXXXXXX (changed from original for privacy)
Which server to use
production
Quote Sort Order
Price-LowToHigh
Handling Fee - US
2.5
Handling Fee - International
3
Handling Per Order or Per Box
Order
Decimal Settings
3
Tax Class
--none--
Tax Basis
Shipping
Shipping Zone
--none--
Sort Order
0
All Packages are Machinable?
False
USPS Options
--none--
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
9.50
USPS minimum Width
1.0
USPS minimum Height
5.50
Enable USPS First-Class filter for US shipping
True
Shipping Methods (Domestic and International)
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 MailTM, 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, Priority Mail ExpressTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, .21875, 0.00, 0, 4, 0.00, First-Class Package International ServiceTM, 0, 4, 0.00, Priority Mail InternationalRM, 0, 66, 0.00, 0, 4, 0.00, 0, 4, 0.00, 0, 20, 0.00, 0, 20, 0.00, Priority Mail Express InternationalTM, 0, 66, 0.00, 0, 4, 0.00, 0, 70, 0.00, 0, 70, 0.00
Extra Services (Domestic)
Certified MailRM, N, USPS TrackingTM Electronic, N, USPS TrackingTM, N, Insurance, N, Priority Mail Express Insurance, N, Priority Mail Insurance, N, Adult Signature Restricted Delivery, N, Adult Signature Required, N, Registered MailTM, N, Collect on Delivery, N, Return Receipt, N, Certificate of Mailing (Form 3665), N, Certificate of Mailing (Form 3817), N, Signature ConfirmationTM Electronic, N, Signature ConfirmationTM, N, Priority Mail Express 1030 AM Delivery, N, Certified MailRM Restricted Delivery, N, Certified MailRM Adult Signature Required, N, Certified MailRM Adult Signature Restricted Delivery, N, Signature ConfirmationTM Restricted Delivery, N, Signature ConfirmationTM Electronic Restricted Delivery, N, Collect on Delivery Restricted Delivery, N, Registered MailTM Restricted Delivery, N, Insurance Restricted Delivery, N, Insurance Restricted Delivery (Priority Mail Express), N, Insurance Restricted Delivery (Priority Mail), N
Extra Services (International)
Registered Mail, N, Insurance, N, Return Receipt, N, Electronic USPS Delivery Confirmation International, N, Certificate of Mailing, N
Retail pricing or Online pricing?
Online
Debug Mode
Off
-
Re: USPS Shipping Module [Support Thread]
Never mind. It only had the first class - retail option selected; once I checked the first class - comm option, they started showing up again.
-
Re: USPS Shipping Module [Support Thread]
so......I have an item that is bulky...like 30" x 24" x 24"......around 30 pounds......BUT zencart chooses a large flat rate USPS box.......my item would never fit in a USPS LFR box!
how do I fix this problem?
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lrfowler24
so......I have an item that is bulky...like 30" x 24" x 24"......around 30 pounds......BUT zencart chooses a large flat rate USPS box.......my item would never fit in a USPS LFR box!
how do I fix this problem?
The USPS shipping module works on weights alone, so that 30-pound item will (from a weight standpoing) 'fit' in the large flat-rate box, which is limited to 70 pounds.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lrfowler24
so......I have an item that is bulky...like 30" x 24" x 24"......around 30 pounds......BUT zencart chooses a large flat rate USPS box.......my item would never fit in a USPS LFR box!
how do I fix this problem?
You could change the max weight of a LFRbox from 70 down to something more realistic.
In our case & based upon the products we sell, we limit SMfr boxes to a total zencart weight of 1.5 pounds
Regional A boxes 1.51 to 3.00 pounds
MEDfr from 3.01-7 pounds
Then juggle database weights of products to make them fit to the boxes desired. Not perfect but works for us.
-
Re: USPS Shipping Module [Support Thread]
i saw something in this forum about the Unsecure HTTP Endpoint Retirement, and there being a patch for that. I can't find it now, but when I got the USPS notice, I just searched the files for all the places where http://production.shippingapis dot com was mentioned, and changed them to https. Is anything needed besides that? I have the 2017 version of the file, if that makes any difference.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
HeleneWallis
i saw something in this forum about the Unsecure HTTP Endpoint Retirement, and there being a patch for that. I can't find it now, but when I got the USPS notice, I just searched the files for all the places where
http://production.shippingapis dot com was mentioned, and changed them to https. Is anything needed besides that? I have the 2017 version of the file, if that makes any difference.
From the updated module's _getQuote method:
PHP Code:
// Prepare to make quote-request to USPS servers
switch (MODULE_SHIPPING_USPS_SERVER) {
// -----
// 20200924 Update: USPS will be phasing out the http:// (non-secure) URL.
//
// Secure APIs: https://secure.shippingapis.com/ShippingAPI.dll
// Non-secure APIs: http://production.shippingapis.com
//
case 'production':
$usps_server = 'https://secure.shippingapis.com';
$api_dll = 'ShippingAPI.dll';
break;
case 'test':
default:
// 09-7-2014
//Secure APIs: https://stg-secure.shippingapis.com/ShippingApi.dll
//Non-secure APIs: http://stg-production.shippingapis.com/ShippingApi.dll
$usps_server = 'https://stg-secure.shippingapis.com';
$api_dll = 'ShippingApi.dll';
break;
}
-
Re: USPS Shipping Module [Support Thread]
I've just submitted USPS version 2021-05-05 K11a for the Zen Cart moderators' review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#15: Correcting minimum International dimensions so that International Small F/R Box can be quoted.
#16: Add notification to enable site-specific customizations for configured shipping methods.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted USPS version 2021-05-05 K11a for the Zen Cart moderators' review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#15: Correcting minimum International dimensions so that International Small F/R Box can be quoted.
#16: Add notification to enable site-specific customizations for configured shipping methods.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1292
-
Re: USPS Shipping Module [Support Thread]
Working on a "update" to 1.5.7c from a older version, and I can't get this module working properly.
All files in store are 1.5.7c, and a clean install of the USPS module was done.
Currently I am not getting any XML data returned...
USPS Debug contents:
Code:
2021-05-13 11:17:06: USPS build: 2021-05-05 K11a
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.8
Total Quote Weight: 3.8 Pounds: 3 Ounces: 13
Maximum: 50 Tare Rates: Small/Medium: 0:3 Large: 10:0
Handling method: Order Handling fee Domestic: $1.00 Handling fee International: $3.00
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: 48348
ZipDestination: Postcode: 48353 Country: United States City: Hartland State: Michigan
Order SubTotal: $25.00
Order Total: $26.50
Uninsurable Portion: $0.00
Insurable Value: $26.50
2021-05-13 11:17:06: Sending request to USPS
2021-05-13 11:17:07: ==================================
SENT TO USPS:
<RateV4Request USERID="XXX"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>3</Pounds><Ounces>13</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>26.50</Value><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>EXPRESS COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>3</Pounds><Ounces>13</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>26.50</Value><Machinable>FALSE</Machinable></Package>
</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:
2021-05-13 11:17:07: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
This is happening on both the test and production servers.
The store files are in a test folder on the site currently so they are not "public", I am wondering if the directory of the store is making a difference? or if it could be something else?
Any help would be GREATLY appreciated
-
Re: USPS Shipping Module [Support Thread]
@mikestaps, that log implies that you haven't 'ticked' any of the checkboxes to identify which USPS shipping methods you want to use.
-
1 Attachment(s)
Re: USPS Shipping Module [Support Thread]
Screen shot of selected methods...
Attachment 19567
-
Re: USPS Shipping Module [Support Thread]
I just uninstalled the module, re-installed, input settings and no change.
Same Debug results and shipping method of:
We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.
If you prefer to use USPS as your shipping method, please contact us for assistance.
(Please check that your Zip Code is entered correctly.)
-
Re: USPS Shipping Module [Support Thread]
Could you include that RAW XML FROM USPS section of the log?
-
Re: USPS Shipping Module [Support Thread]
There is nothing there to include... I just got off the phone with USPS tech support and started a ticket on this as well. Figured a two prong attack was the best idea.
Below are all contents from log file:
Code:
2021-05-13 13:10:34: USPS build: 2021-05-05 K11a
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): Display transit time
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 3.4
Total Quote Weight: 6.4 Pounds: 6 Ounces: 7
Maximum: 50 Tare Rates: Small/Medium: 0:3 Large: 10:0
Handling method: Order Handling fee Domestic: $1.00 Handling fee International: $3.00
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: False
Sorts the returned quotes: Price-LowToHigh
ZipOrigination: 48348
ZipDestination: Postcode: 48353 Country: United States City: Hartland State: Michigan
Order SubTotal: $89.43
Order Total: $94.80
Uninsurable Portion: $0.00
Insurable Value: $94.80
2021-05-13 13:10:34: Sending request to USPS
2021-05-13 13:10:34: ==================================
SENT TO USPS:
<RateV4Request USERID="XXXXXXXXXXX"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>6</Pounds><Ounces>7</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>94.80</Value><SpecialServices> <SpecialService>155</SpecialService>
<SpecialService>106</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable><ShipDate>2021-05-13</ShipDate></Package>
<Package ID="1"><Service>EXPRESS COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>6</Pounds><Ounces>7</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>94.80</Value><SpecialServices> <SpecialService>155</SpecialService>
<SpecialService>106</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable><ShipDate>2021-05-13</ShipDate></Package>
</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:
USPS TrackingTM Electronic
USPS TrackingTM
2021-05-13 13:10:34: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
-
Re: USPS Shipping Module [Support Thread]
Any debug-logs present on/around the time of that USPS quote?
-
Re: USPS Shipping Module [Support Thread]
This one has the same time stamp...
Code:
[13-May-2021 13:10:34 America/Chicago] Request URI: /store_157/index.php?main_page=checkout_shipping, IP address: 68.42.180.41
#1 require(/includes/templates/bootstrap/common/tpl_header.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:126]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/common/tpl_header.php on line 103.
[13-May-2021 13:10:34 America/Chicago] Request URI: /store_157/index.php?main_page=checkout_shipping, IP address: 68.42.180.41
#1 require(/includes/templates/bootstrap/common/tpl_header.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:126]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/common/tpl_header.php on line 105.
I tried switching templates, but that had no effect on the USPS that I could see.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
mikestaps
This one has the same time stamp...
Code:
[13-May-2021 13:10:34 America/Chicago] Request URI: /store_157/index.php?main_page=checkout_shipping, IP address: 68.42.180.41
#1 require(/includes/templates/bootstrap/common/tpl_header.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:126]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/common/tpl_header.php on line 103.
[13-May-2021 13:10:34 America/Chicago] Request URI: /store_157/index.php?main_page=checkout_shipping, IP address: 68.42.180.41
#1 require(/includes/templates/bootstrap/common/tpl_header.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:126]
#2 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /includes/templates/bootstrap/common/tpl_header.php on line 105.
I tried switching templates, but that had no effect on the USPS that I could see.
Not pertinent to USPS, but what version of the bootstrap template is in use?
-
Re: USPS Shipping Module [Support Thread]
ZCA-Bootstrap-Template-3.1.1
This is a fresh build, with all new files, but updating an old database to retain customer and order history.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
mikestaps
ZCA-Bootstrap-Template-3.1.1
This is a fresh build, with all new files, but updating an old database to retain customer and order history.
For the as-shipped bootstrap template v3.1.1's /includes/templates/bootstrap/common/tpl_header.php, lines 94-114 read as followed, with lines 103 and 105 highlighted:
Code:
<?php
if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
if ($banner->RecordCount() > 0) {
$find_banners = zen_build_banners_group(SHOW_BANNERS_GROUP_SET2);
$banner_group = 2;
?>
<div class="zca-banner bannerTwo rounded">
<?php
if (ZCA_ACTIVATE_BANNER_TWO_CAROUSEL == 'true') {
require($template->get_template_dir('tpl_zca_banner_carousel.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_zca_banner_carousel.php');
} else {
echo zen_display_banner('static', $banner);
}
?>
</div>
<?php
}
}
?>
Might I suggest a re-install?
-
Re: USPS Shipping Module [Support Thread]
-
Re: USPS Shipping Module [Support Thread]
USPS wants to see what XML request the site is sending over to diagnose what is happening, how would I obtain that???
-
Re: USPS Shipping Module [Support Thread]
NVM... It's in the log... I have been staring at this stuff to much today:blush:
-
Re: USPS Shipping Module [Support Thread]
Clean install on stock 1.57c and this prevents getting rates...?
Checkout Error:
We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.
If you prefer to use USPS as your shipping method, please contact us for assistance.
(Please check that your Zip Code is entered correctly.)
Debug Log:
2021-05-18 09:07:42: USPS build: 2021-05-05 K11a
Server: production
Quote Request Rate Type: Retail
Quote from main_page: checkout_shipping
USPS Options (weight, time): Display weight
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.175
Total Quote Weight: 0.3 Pounds: 0 Ounces: 5
Maximum: 25 Tare Rates: Small/Medium: 0:0.125 Large: 0:15
Handling method: Box Handling fee Domestic: $0.00 Handling fee International: $0.00
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: 89128
ZipDestination: Postcode: 89128 Country: United States City: Las Vegas State: Nevada
Order SubTotal: $41.00
Order Total: $41.00
Uninsurable Portion: $0.00
Insurable Value: $41.00
2021-05-18 09:07:42: Sending request to USPS
2021-05-18 09:07:42: ==================================
SENT TO USPS:
<RateV4Request USERID="833BGGEA0547"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LEGAL FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>MD FLAT RATE BOX</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="2"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LG FLAT RATE BOX</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
</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:
USPS TrackingTM Electronic
2021-05-18 09:07:42: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
- end of log -
Previous version on ZC 1.55f running:
USPS Version Date - 2017-09-16
Has no problem with the same settings collecting rates.
Any ideas why the newest version is not working?
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
twitchtoo
Clean install on stock 1.57c and this prevents getting rates...?
Checkout Error:
We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.
If you prefer to use USPS as your shipping method, please contact us for assistance.
(Please check that your Zip Code is entered correctly.)
Debug Log:
2021-05-18 09:07:42: USPS build: 2021-05-05 K11a
Server: production
Quote Request Rate Type: Retail
Quote from main_page: checkout_shipping
USPS Options (weight, time): Display weight
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.175
Total Quote Weight: 0.3 Pounds: 0 Ounces: 5
Maximum: 25 Tare Rates: Small/Medium: 0:0.125 Large: 0:15
Handling method: Box Handling fee Domestic: $0.00 Handling fee International: $0.00
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: 89128
ZipDestination: Postcode: 89128 Country: United States City: Las Vegas State: Nevada
Order SubTotal: $41.00
Order Total: $41.00
Uninsurable Portion: $0.00
Insurable Value: $41.00
2021-05-18 09:07:42: Sending request to USPS
2021-05-18 09:07:42: ==================================
SENT TO USPS:
<RateV4Request USERID="833BGGEA0547"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LEGAL FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>MD FLAT RATE BOX</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="2"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LG FLAT RATE BOX</Container><Size>REGULAR</Size><Value>41.00</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
</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:
USPS TrackingTM Electronic
2021-05-18 09:07:42: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
- end of log -
Previous version on ZC 1.55f running:
USPS Version Date - 2017-09-16
Has no problem with the same settings collecting rates.
Any ideas why the newest version is not working?
This is the same thing I am running into. I'm still waiting to hear back from USPS to see what they had to say about it...
-
Re: USPS Shipping Module [Support Thread]
mikestaps have you checked this relative to the CommErr... https://www.zen-cart.com/showthread....shipping-error
-
Re: USPS Shipping Module [Support Thread]
What special services are enabled? I'm seeing 155 (whatever that is).
-
Re: USPS Shipping Module [Support Thread]
twichtoo the CommErr is 0-. I just ran the Curl test and all came back good.
lat9 I have all the special services turned off, and get the same result.
Log File:
start of file-
2021-05-18 09:44:52: USPS build: 2021-05-05 K11a
Server: production
Quote Request Rate Type: Online
Quote from main_page: checkout_shipping
USPS Options (weight, time): --none--
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.26
Total Quote Weight: 0.26 Pounds: 0 Ounces: 5
Maximum: 50 Tare Rates: Small/Medium: 0:0 Large: 0:0
Handling method: Order Handling fee Domestic: $1.00 Handling fee International: $3.00
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: False
Sorts the returned quotes: Price-LowToHigh
ZipOrigination: 48348
ZipDestination: Postcode: 48353 Country: United States City: Hartland State: Michigan
Order SubTotal: $23.98
Order Total: $25.42
Uninsurable Portion: $0.00
Insurable Value: $25.42
2021-05-18 09:44:52: Sending request to USPS
2021-05-18 09:44:52: ==================================
SENT TO USPS:
<RateV4Request USERID="xxxxxxxxxxxx"><Revision>2</Revision>
<Package ID="0"><Service>First Class Commercial</Service><FirstClassMailType>PACKAGE SERVICE</FirstClassMailType><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>25.42</Value><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>25.42</Value><Machinable>FALSE</Machinable></Package>
<Package ID="2"><Service>EXPRESS COMMERCIAL</Service><ZipOrigination>48348</ZipOrigination><ZipDestination>48353</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Value>25.42</Value><Machinable>FALSE</Machinable></Package>
</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:
2021-05-18 09:44:52: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
-end of log file
-
Re: USPS Shipping Module [Support Thread]
@mikestaps, any debug-logs around the time of that USPS quote? I'm not able to replicate the issue that you (and twitch) are posting.
-
Re: USPS Shipping Module [Support Thread]
Nope... I wish there was.
I am running into a PayPal checkout error too, I wouldn't think that could be related as it's the "next" step, but maybe.
I'm getting a "10002 Security error - Security header is not valid". All settings in that module have been quadruple checked.
-
Re: USPS Shipping Module [Support Thread]
I'll note that in my use, I've got
Enable USPS First-Class filter for US shipping: True
-
Re: USPS Shipping Module [Support Thread]
No change in results when switching the First-Class Filter to True.
-
Re: USPS Shipping Module [Support Thread]
Please take a screenshot of the editing of the USPS module settings (obfuscating your API key) and post. I'll attempt to recreate using the settings that you're using.
-
3 Attachment(s)
Re: USPS Shipping Module [Support Thread]
-
Re: USPS Shipping Module [Support Thread]
@mikestaps, I don't get it. I've applied your settings (other than that "non-taxable" tax class) and am receiving quotes.
How is that Non-Taxable tax class defined? Why not just "not" identify a tax group?
Update: Is there any difference if you change the server from 'production' to 'test'?
-
Re: USPS Shipping Module [Support Thread]
Lat9 - retail radio, USPS Tracking and display weight are selected. Rest of the switches are the same, values are close to mikestaps.
2021-05-18 12:11:00: USPS build: 2021-05-05 K11a
Server: test
Quote Request Rate Type: Retail
Quote from main_page: popup_shipping_estimator
USPS Options (weight, time): Display weight
USPS Domestic Transit Time Calculation Mode: NEW
Cart Weight: 0.175
Total Quote Weight: 0.3 Pounds: 0 Ounces: 5
Maximum: 25 Tare Rates: Small/Medium: 0:0.125 Large: 0:15
Handling method: Box Handling fee Domestic: $0.00 Handling fee International: $0.00
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: 89128
ZipDestination: Postcode: 89128 Country: United States City: Las Vegas State: Nevada
Order SubTotal: $20.50
Order Total: $20.50
Uninsurable Portion: $0.00
Insurable Value: $20.50
2021-05-18 12:11:00: Sending request to USPS
2021-05-18 12:11:00: ==================================
SENT TO USPS:
<RateV4Request USERID="***Twitch removed***"><Revision>2</Revision>
<Package ID="0"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LEGAL FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Value>20.50</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>MD FLAT RATE BOX</Container><Size>REGULAR</Size><Value>20.50</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
<Package ID="2"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>89128</ZipOrigination><ZipDestination>89128</ZipDestination><Pounds>0</Pounds><Ounces>5</Ounces><Container>LG FLAT RATE BOX</Container><Size>REGULAR</Size><Value>20.50</Value><SpecialServices> <SpecialService>155</SpecialService>
</SpecialServices><Machinable>FALSE</Machinable></Package>
</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:
USPS TrackingTM Electronic
2021-05-18 12:11:00: RESPONSE FROM USPS:
==================================
============
RAW XML FROM USPS:
- end of log -
-
Re: USPS Shipping Module [Support Thread]
No change in the test vs production switch on the live site either.
-
Re: USPS Shipping Module [Support Thread]
No change from production to testing server wise, I have switched back and forth. Also no change by switching the Tax Class. I ran it using --none--, Taxable, and Non-Taxable.
The Non-taxable tax class is pre-set up. We have always used that for shipping, as it is a service vs. a product.
I'm really wondering if it is something to do with the the USERID on their end?
twitch, is your 1.5.5f still up and running? and USPS still working on it? That would rule out my USERID theory...
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
mikestaps
No change from production to testing server wise, I have switched back and forth. Also no change by switching the Tax Class. I ran it using --none--, Taxable, and Non-Taxable.
The Non-taxable tax class is pre-set up. We have always used that for shipping, as it is a service vs. a product.
I'm really wondering if it is something to do with the the USERID on their end?
twitch, is your 1.5.5f still up and running? and USPS still working on it? That would rule out my USERID theory...
Yes USPS is running properly on this server in the 1.55f production site.
I can make this happen on occasion in the 1.57c USPS test site but I haven't had a chance to trace it:
RAW XML FROM USPS:
SimpleXMLElement Object
(
[Number] => 80040B1A
[Description] => Authorization failure. Perhaps username and/or password is incorrect.
[Source] => USPSCOM::DoAuth
)
-
Re: USPS Shipping Module [Support Thread]
Twitchtoo Have you made any progress with this?
Unfortunately I have not... I contacted USPS to see if it could be something going on with my account on their end of things, but after several phone calls and emails I am not getting any response from them.
-
Re: USPS Shipping Module [Support Thread]
I've installed the new USPS shipping module and I'm getting the error "Nothing has been selected for quotes." I'm dead in the water on a busy weekend until this is fixed. I've looked at all the things you can edit for the module and don't see anything that hasn't been set the same way as it was before, as directed in the installation instructions. What am I doing wrong?
I did track down where the error message is coming from--"Will auto-disable the shipping method if either no services // have been selected or the country-of-origin is not the US." Neither of those conditions is true.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
HeleneWallis
I've installed the new USPS shipping module and I'm getting the error "Nothing has been selected for quotes." I'm dead in the water on a busy weekend until this is fixed. I've looked at all the things you can edit for the module and don't see anything that hasn't been set the same way as it was before, as directed in the installation instructions. What am I doing wrong?
A screenshot of your USPS settings would help. What version of Zen Cart is in use?
-
Re: USPS Shipping Module [Support Thread]
Never mind, I realized that none of the boxes for the shipping rates were checked. Problem fixed.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
tedjmaines
I have never got it working. in previous edition v154 and beyond, we did flat rate. I would like to get this working. I read the other versions post but it does not work for v157c with K11. If someone got it to work in previous versions of USPS maybe they can let you know. The code I read before used a master category number for Media (mine is Master_id = 5) for loop but that did not work on my K11.
Still have this issue with new K11a on v157c. I put the proper category for books which is shipped Media Parcel Mail in code as instructed. What it is suppose to do is if anything is NOT a book is put in cart then Media Mail option should not be shown, but on my site Media Mail option is always shown. Anyone have a thought on why??? Thanks.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
tedjmaines
Still have this issue with new K11a on v157c. I put the proper category for books which is shipped Media Parcel Mail in code as instructed. What it is suppose to do is if anything is NOT a book is put in cart then Media Mail option should not be shown, but on my site Media Mail option is always shown. Anyone have a thought on why??? Thanks.
I had a similar situation. Ajeh (Linda) provided me with a starter routine to permit the exclusion of a class or classes of shipping types depending on the shopping cart contents. To my amazement, that starter code is now in the new version of usps.php, and available for anyone to play with.
With whatever editor program you're using, do a search for " // *** Customizations once per display ***"
The lines after that are as follows:
// bof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
// change false to true to use
if (false) {
$chk_cart = 0;
$chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','12');
$chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','15');
}
// see below use of $chk_cart
// eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
This was my initial attempt to keep certain things from being shipped in a small flat rate box, and $master_categories_id shown here was the first two categories that I needed to exclude from small flat rate shipping . I have since expanded on this to exclude a wide variety of shipping types, depending on the category or the product or the quantity being ordered. If you want to try this, simply substitute your category number for books for the '12' shown in the example above. You'll need to comment out the next statement if you don't want your category '15' to be similarly affected. And it would be a good idea to substitute the shipping type you're excluding (Media) in the comments, in place of the 'USPS Priority MailTM Small Flat Rate box' verbage. Otherwise, someone (possibly you) is going to be really confused at some point in the future when you need to edit this section or figure out why something isn't working.
There is one more place where you need to insert a few lines. Search for "$type_rebuilt = $type;"
The first few lines after that should read:
// bof: example to block USPS Priority MailTM Small Flat Rate Box when anything from specific master_categories_id are in the cart
// see above for $chk_cart settings
// change false to true to use WAS FALSE
if (true) {
if ($chk_cart > 0 && $type == 'Priority MailTM Small Flat Rate Box') {
// echo 'USPS $type: ' . $type . ' $chk_cart:' . $chk_cart . ', line 575 <br>';
continue;
}
}
// eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
You'll need to substitute 'MEDIA' where the line above says 'Priority MailTM Small Flat Rate Box.' And you might want to change the wording of the comments so it's refers to Media Mail rather than the Small Flat Rate Box in the code.
The first section of code checks the category number of the items in the cart. If any of them is in a category that could not be shipped by the specified shipping type, then it increments the variable $chk_cart. The second section of code tests $chk_cart to see whether it is greater than zero AND if the shipping type variable ($type) is exactly equal to the value in the quotes. If so, that shipping type will be excluded from the list of shipping types that the customer can choose from.
If you're comfortable tweaking the code, you can expand on this the same way I did, to check for multiple different product or category numbers, for the quantities of certain items, and for whatever else you need to exclude from certain shipping types. Over the years, I've added enough checks that it's very seldom a customer can specify a shipping type unsuitable for the product(s) in the cart. Every test you add will slow down execution just a little bit, of course, so it you have an extremely varied inventory, this may not work well for you. But it has been ideal for us, with a fairly small number of broad categories.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
HeleneWallis
The first section of code checks the category number of the items in the cart. If any of them is in a category that could not be shipped by the specified shipping type, then it increments the variable $chk_cart. The second section of code tests $chk_cart to see whether it is greater than zero AND if the shipping type variable ($type) is exactly equal to the value in the quotes. If so, that shipping type will be excluded from the list of shipping types that the customer can choose from.
Thank you Helene. I did modifications as you suggested and it works the reverse that I need. I need only master category 15 (books) to use Media Mail. What I have is category 15 (books) excludes the Media Mail and all other non-books show media mail. So my logic is backwards. I tried changing true and false but does not seem to work. Must have made a logic error.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
tedjmaines
Thank you Helene. I did modifications as you suggested and it works the reverse that I need. I need only master category 15 (books) to use Media Mail. What I have is category 15 (books) excludes the Media Mail and all other non-books show media mail. So my logic is backwards. I tried changing true and false but does not seem to work. Must have made a logic error.
I see that I phrased something backwards. What you need to do is not substitute your category number for books, but to add all the category numbers except the one for books. Changing true to false will just prevent the code from being executed at all.
For example, this shows two categories excluded from Small Flat Rate box shipping. That was my original requirement. Now I have four categories excluded, plus a couple of product numbers that are in permitted categories but are still not appropriate to ship in a Small Flat Rate box. I also have exclusions in otherwise permissible categories based on the quantity of items ordered (two would be okay in a Small Flat Rate box, three would not be okay, for example).
If you have a very large number of categories, so many that adding a conditional statement for every one of them except books wouldn't be feasible, you might want to look at reorganizing your categories so you have broader ones that include more kinds of products. For example, I had one category that included all the products from a particular vendor. Then he started producing a product that fell more logically into another category I already had set up. Except that it required me to add many more conditional statements to keep that new product from being shipped in certain size boxes, even though everything else in that category could be shipped in those boxes. I eventually moved the new product to the category that included all the others from that vendor, and was able to simplify the shipping code considerably.
-
Re: USPS Shipping Module [Support Thread]
If you're using USPS K11a, then including a modified version of the autoloaded observer example (present in the zip-files /extras sub-directory) should disable media-mail unless all products in the cart are from category 15:
Code:
case 'NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE':
// -----
// Disallow "Media Mail" unless all products in the cart have their master_categories_id within category 15.
//
if (stripos($p1, 'Media Mail') !== false) {
$chk_media = 0;
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id', '15');
if ($chk_media == $_SESSION['cart']->count_contents()) {
$p2 = false;
}
}
break;
If that books category contains sub-categories, you'll need to add additional lines to check for the presence of each of the sub-categories.
-
Re: USPS Shipping Module [Support Thread]
Quote:
Originally Posted by
lat9
If you're using USPS K11a, then including a modified version of the autoloaded observer example (present in the zip-files /extras sub-directory) should disable media-mail unless all products in the cart are from category 15:
Code:
case 'NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE':
// -----
// Disallow "Media Mail" unless all products in the cart have their master_categories_id within category 15.
//
if (stripos($p1, 'Media Mail') !== false) {
$chk_media = 0;
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id', '15');
if ($chk_media == $_SESSION['cart']->count_contents()) {
$p2 = false;
}
}
break;
If that books category contains sub-categories, you'll need to add additional lines to check for the presence of each of the sub-categories.
Thanks, I can use that too.