sparky5693 Posted September 7, 2014 Share Posted September 7, 2014 Starting this morning, if I have first class enabled, first class mail postcards is also on. Very heavy orders now how the option to choose postcard shipping. I noticed that USPS updated their API this morning, could this have something to do with it? Is there a way I can entirely remove the postcard shipping, as I'll never use this in my store. Currently the only way I can remove it is to disable ALL first class shipping. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 7, 2014 Share Posted September 7, 2014 Mark your items as non-machinable. I haven't tested since the changes today, but that has worked for me. Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted September 7, 2014 Author Share Posted September 7, 2014 Mark your items as non-machinable. I haven't tested since the changes today, but that has worked for me. If you mean in the shipping module itself, this is already set. Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted September 7, 2014 Author Share Posted September 7, 2014 Mark your items as non-machinable. I haven't tested since the changes today, but that has worked for me. For what it's worth, your store is also offering first class postcard shipping. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 7, 2014 Share Posted September 7, 2014 Ha! Like I said - hadn't tested it yet. Having other issues today. Thanks for the heads up. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 8, 2014 Share Posted September 8, 2014 The problem seems to be that USPS has changed the designation for First Class Parcels. We will have to require Priority until CC can get it fixed. NOPE - that won't work either for International orders. Until CC can fix it, we're out of business. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 8, 2014 Share Posted September 8, 2014 The USPS module uses CubeCart's Request class which may log the response for a rate quote. Please view the admin Request Log for an entry for a USPS rate quote and reproduce it here. We may be able to edit the USPS module shipping calculator to remove the postcard rate. Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted September 8, 2014 Author Share Posted September 8, 2014 Request Sent - http://production.shippingapis.com/ShippingAPI.dllAPI=RateV4&XML=<RateV4Request USERID="872WWWTH7071"> <Package ID="0"> <Service>ALL</Service> <ZipOrigination>24523</ZipOrigination> <ZipDestination>24523</ZipDestination> <Pounds>1</Pounds> <Ounces>5</Ounces> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Machinable>False</Machinable> <ReturnLocations>TRUE</ReturnLocations> </Package> </RateV4Request> Response received<?xml version="1.0" encoding="UTF-8"?> <RateV4Response><Package ID="0"><ZipOrigination>24523</ZipOrigination><ZipDestination>24523</ZipDestination><Pounds>1</Pounds><Ounces>5</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage CLASSID="3"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt;</MailService><Rate>19.15</Rate></Postage><Postage CLASSID="2"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Hold For Pickup</MailService><Rate>19.15</Rate></Postage><Postage CLASSID="55"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Flat Rate Boxes</MailService><Rate>44.95</Rate></Postage><Postage CLASSID="56"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Flat Rate Boxes Hold For Pickup</MailService><Rate>44.95</Rate></Postage><Postage CLASSID="13"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Flat Rate Envelope</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="27"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Flat Rate Envelope Hold For Pickup</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="30"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Legal Flat Rate Envelope</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="31"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Legal Flat Rate Envelope Hold For Pickup</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="62"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Padded Flat Rate Envelope</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="63"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Padded Flat Rate Envelope Hold For Pickup</MailService><Rate>19.99</Rate></Postage><Postage CLASSID="1"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt;</MailService><Rate>5.95</Rate></Postage><Postage CLASSID="22"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Large Flat Rate Box</MailService><Rate>17.90</Rate></Postage><Postage CLASSID="17"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Medium Flat Rate Box</MailService><Rate>12.65</Rate></Postage><Postage CLASSID="28"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Small Flat Rate Box</MailService><Rate>5.95</Rate></Postage><Postage CLASSID="16"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="44"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Legal Flat Rate Envelope</MailService><Rate>5.90</Rate></Postage><Postage CLASSID="29"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Padded Flat Rate Envelope</MailService><Rate>6.10</Rate></Postage><Postage CLASSID="38"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Gift Card Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="42"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Small Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="40"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Window Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards</MailService><Rate>0.34</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>3.17</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>3.02</Rate></Postage></Package></RateV4Response> Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 8, 2014 Share Posted September 8, 2014 I've been looking for a up-to-date list of the CLASSID values and the <MailService> those values relate to. In the meantime, what happens when you disable the Domestic Service named "First Class"? The USPS Control Panel identifies this service as CLASSID=0, which is what the USPS Response says is now named "First-Class Mail Postcards" at $0.34. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 8, 2014 Share Posted September 8, 2014 International First Class is messed up, too. Almost all of our items are 10 ounces or less, and customers usually only order one item. When I test with an International address, there are NO shipping choices when only USPS shipping is enabled. For the time being I have By Weight AND USPS enabled, with First Class on USPS disabled. That provides a choice list for the customers with First Class coming from By Weight for Domestic and International. The Priority Mail choices come from USPS for Domestic, but customers are not getting any International Priority Choices showing. (I have posted an urgent request for help on this with CC GitHub) Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted September 8, 2014 Author Share Posted September 8, 2014 I've been looking for a up-to-date list of the CLASSID values and the <MailService> those values relate to. In the meantime, what happens when you disable the Domestic Service named "First Class"? The USPS Control Panel identifies this service as CLASSID=0, which is what the USPS Response says is now named "First-Class Mail Postcards" at $0.34. When I disable the domestic service "first class", the postcard option is disabled. I've shifted our store to only use priority shipping for the time being, This has decreased orders, but at least I don't lose all our profit in a shipping error. Quote Link to comment Share on other sites More sharing options...
JoshuaH Posted September 11, 2014 Share Posted September 11, 2014 i have the same problem exactly!did you find a solution? Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted September 11, 2014 Author Share Posted September 11, 2014 Nothing as of yet that I know of. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 11, 2014 Share Posted September 11, 2014 From a USPS Update to the Web API document dated July 2013, the USPS is using the same CLASSID code for several First Class services: CLASSID Service 0 First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Envelope 0 First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Letter 0 First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Parcel 0 First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards I assume the names have changed a bit since then. So the question I now have is: Is there someone whose Response Log for a rate quote contains and entry that has more than one <Postage CLASSID="0"> section? If there is such a response, please try this edit in /modules/shipping/USPS/shipping.class.php, near line 151: Was: foreach($xml->Package->Postage as $option){ if($this->_settings['class_id_'.$option['CLASSID']]) { $package[] = array( Now: foreach($xml->Package->Postage as $option){ if($this->_settings['class_id_'.$option['CLASSID']]) { if(strpos((string)$this->cleanName((string)$option->MailService),'Postcards') !== false) continue; $package[] = array( Again, assuming the USPS response includes more than just Postcards for First Class, and assuming you don't want to ship your package stapled to a postcard, try this and let us know. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 11, 2014 Share Posted September 11, 2014 Here's a piece of a test order with only USPS, where the customer chose First Class Parcel. It has TWO entries with CLASSID="0" <Rate>5.75</Rate></Postage><Postage CLASSID="40"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Window Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Parcel</MailService><Rate>2.50</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards</MailService><Rate>0.34</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>2.69</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>2.56</Rate></Postage></Package></RateV4Response> I made your suggested edit to shipping.class.php and did NOT get the postcard choice, as hoped. Here's part of the response: <Postage CLASSID="42"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Small Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="40"><MailService>Priority Mail 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Window Flat Rate Envelope</MailService><Rate>5.75</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Parcel</MailService><Rate>2.50</Rate></Postage><Postage CLASSID="0"><MailService>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards</MailService><Rate>0.34</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>2.69</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>2.56</Rate></Postage></Package></RateV4Response> BUT the problem for me, at least, is that NO International shipping choices are available to the customer when only USPS module is in use. There's just a dash where there should be a price. So here's the response I get from an International customer attempt: Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=IntlRateV2&XML=<IntlRateV2Request USERID="521DIRTY0492"> <Package ID="0"> <Pounds>0</Pounds> <Ounces>4</Ounces> <Machinable>false</Machinable> <MailType>Package</MailType> <ValueOfContents>4.80</ValueOfContents> <Country>Great Britain</Country> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>10</Width> <Length>10</Length> <Height>10</Height> <Girth/> </Package> </IntlRateV2Request> Response received <?xml version="1.0" encoding="UTF-8"?> <IntlRateV2Response><Package ID="0"><Error><Number>-2147218043</Number><Source>;IntlRateV2.ProcessRequest</Source><Description>Unable to calculate international postage. No services available. Invalid Country Name</Description><HelpFile/><HelpContext/></Error></Package></IntlRateV2Response> Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 11, 2014 Share Posted September 11, 2014 Request: <Country>Great Britain</Country> Response: Unable to calculate international postage. No services available. Invalid Country Name Let's see if there is a USPS notice that says something about the name of GB. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 11, 2014 Share Posted September 11, 2014 I can get an International choice when I add the By Weight plugin. I hurredly put it together, so I'm not seeing International choices as I expected. but at least I get something! Here's the response from that with a UK address: Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=IntlRateV2&XML=<IntlRateV2Request USERID="521DIRTY0492"> <Package ID="0"> <Pounds>0</Pounds> <Ounces>11</Ounces> <Machinable>false</Machinable> <MailType>Package</MailType> <ValueOfContents>20.00</ValueOfContents> <Country>Great Britain</Country> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>10</Width> <Length>10</Length> <Height>10</Height> <Girth/> </Package> </IntlRateV2Request> Response received <?xml version="1.0" encoding="UTF-8"?> <IntlRateV2Response><Package ID="0"><Error><Number>-2147218043</Number><Source>;IntlRateV2.ProcessRequest</Source><Description>Unable to calculate international postage. No services available. Invalid Country Name</Description><HelpFile/><HelpContext/></Error></Package></IntlRateV2Response> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 11, 2014 Share Posted September 11, 2014 I tried another test address using Canada, and the USPS values worked properly. So the issue is with Great Britain and UK. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 11, 2014 Share Posted September 11, 2014 Looking at the USPS site, I do not find any reference to the UK as simply "Great Britain", but rather "Great Britain and Northern Ireland". So, on the off-chance that this is correct, in the shipping.class.php file, near line 35: Was: if($name == "United Kingdom") { return "Great Britain"; Now: if($name == "United Kingdom") { return "Great Britain and Northern Ireland"; Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 11, 2014 Share Posted September 11, 2014 That fixed it! Thank you SO much!! Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 12, 2014 Share Posted September 12, 2014 Thank you Dirty Butter for your diligence and assistance in helping us by providing needed data and making the experiments. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 12, 2014 Share Posted September 12, 2014 Glad to help, as USPS is normally our only shipping module. I've referenced this thread on my GitHub post, commenting that you had fixed it. I hope Sparky, Joshua, and who knows how many others find this thread. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 17, 2014 Share Posted October 17, 2014 Guys! .. Thank you! Massive help.. I'm sorry there was no official fix in time for this USPS change. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 17, 2014 Share Posted October 17, 2014 It's funny.. testing this now USPS returns mail services that don't exist in their documentation. Brian quoted; First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Letter From my testing the following is returned; First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Stamped Letter Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 17, 2014 Share Posted October 17, 2014 New code here: https://github.com/cubecart/CubeCart/commit/8bb84936577278a212e679cff1d1915335bdd0e5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.