Dirty Butter Posted June 12, 2015 Share Posted June 12, 2015 (edited) One of my test shipping addresses is to Canada. Just noticed that there us an extra s/h price choice on Checkout that only shows my handling charge. It has NO shipping choice name by it.Here's part of the Request Log:All</ExpressMail><AreasServed>Please reference Express Mail for Areas Served.</AreasServed><AdditionalRestrictions>No Additional Restrictions Data found.</AdditionalRestrictions><Service ID="12"><Pounds>1</Pounds><Ounces>0</Ounces><Machinable>true</Machinable><MailType>Package</MailType><Container>VARIABLE</Container><Size>REGULAR</Size><Width>10</Width><Length>10</Length><Height>10</Height><Girth>0.0</Girth><Country>CANADA</Country><Postage>65.75</Postage><ExtraServices><ExtraService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><Price>0.00</Price></ExtraService></ExtraServices><ValueOfContents>100.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></Service><Service ID="1"><Pounds>1</Pounds><Ounces>0</Ounces><Machinable>true</Machinable><MailType>Package</MailType><Container>VARIABLE</Container><Size>REGULAR</Size><Width>10</Width><Length>10</Length><Height>10</Height><Girth>0.0</Girth><Country>CANADA</Country><Postage>41.75</Postage><ExtraServices><ExtraService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>True</Available><Price>0.00</Price></ExtraService></ExtraServices><ValueOfContents>100.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 42", max. length plus girth combined 79"</MaxDimensions><MaxWeight>66</MaxWeight></Service><Service ID="15"><Pounds>1</Pounds><Ounces>0</Ounces><Machinable>true</Machinable><MailType>Package</MailType><Container>VARIABLE</Container><Size>REGULAR</Size><Width>10</Width><Length>10</Length><Height>10</Height><Girth>0.0</Girth><Country>CANADA</Country><Postage>11.75</Postage><ExtraServices/><ValueOfContents>100.00</ValueOfContents><InsComment>SERVICE</InsComment><SvcCommitments>Varies by destination</SvcCommitments><SvcDescription>First-Class Package International Service&lt;sup&gt;&#8482;&lt;/sup&gt;</SvcDescription><MaxDimensions>Other than rolls: Max. length 24", max length, height and depth (thickness) combined 36"<br>Rolls: Max. length 36". Max length and twice the diameter combined 42"</MaxDimensions><MaxWeight>4</MaxWeight></Service><Service ID="2"><Pounds>1</Pounds><Ounces>0</Ounces><MailType>Package</MailType><Container>VARIABLE</Container><Size>REGULAR</Size><Width>10</Width><Length>10</Length><Height>10</Height><Girth>0.0</Girth><Country>CANADA</Country><Postage>0.00</Postage><ExtraServices><ExtraService><ServiceID/><ServiceName/><Available>False</Available><Price/></ExtraService></ExtraServices><ServiceErrors><ServiceError><Id>50050</Id><Description>The Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada.</Description></ServiceError></ServiceErrors></Service></Package></IntlRateV2Response> I know USPS has changed to Zone charges for US to CA. I tried the same address on the Calculate a Price page of usps.com, and it asks for the From and To Zip codes for Canada now.Here's the screenshot of this odd Checkout: Edited June 13, 2015 by Dirty Butter Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 12, 2015 Share Posted June 12, 2015 I would ask that, temporarily, untick "Disable Shipping Groups" in Store Settings, Features tab. We can verify this rate is coming from USPS. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 12, 2015 Share Posted June 12, 2015 Ok, so we have:Service ID=1: Priority Mail Express InternationalService ID=2: <Error>Service ID=12: USPS GXG EnvelopesService ID=15: First-Class Package InternationalThe Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 Unchecked, cleared all cache, emptied basket, and logged out of customer I was in store as. Tried same thing, used Shipping Estimate this time for same Canada address - got same results. When I use another country address I do not get this issue. So it has to be something to do with this recent postal change to Zone charges for Canada.The Parcel rate is there, but it's AFTER this weird handling choice. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 (edited) Thought I'd try re-downloading the USPS plugin. There was a new version. Will test again. Nope, that did not fix it. Edited June 12, 2015 by Dirty Butter Finished testing again Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 This is the Developer link to info about the API changes for the May 2015 upgrade that didn't actually go into affect until just recently.https://www.usps.com/business/web-tools-apis/2015-may-webtools-release-notes.rtf Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 12, 2015 Share Posted June 12, 2015 In the USPS module's shipping.class.php file, make the following edit near the middle of the file:/* NEW */ $xml->writeElement('OriginZip',$this->_settings['ziporigin']); /* NEW */ // $xml->writeElement('DestinationPostalCode',trim($delivery['postcode'])); } $xml->endElement(); ## End Package $xml->endElement(); ## End RateV4Request ## Send request $request = new Request($this->_url, $this->_path); Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 That gave the no suitable shipping choices error message. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 12, 2015 Share Posted June 12, 2015 And what does the USPS response in the Response Log have to say for this latest rate request? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 Did you mean to comment out the second new line? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 12, 2015 Share Posted June 12, 2015 Yes. It is there for informational purposes -- the USPS document mentions the "DestinationPostalCode" element may become required at some future date. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2015 Author Share Posted June 12, 2015 When I went through the online Calculate Postage for the same Canadian address I had to input the destination zip. Of course at that point they give you ALL the shipping choices, so for Priority it would have been needed. So I tried uncommenting your line, but it still throws the error message. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 Copied from my reply above:"And what does the USPS response in the Response Log have to say for this latest rate request?" Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 Sorry. I missed seeing that. Will try it all again and post from the Response log Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=RateV4&XML=<RateV4Request USERID="521DIRTY0492"> <Package ID="0"> <Service>ALL</Service> <ZipOrigination>35178</ZipOrigination> <ZipDestination>35178</ZipDestination> <Pounds>1</Pounds> <Ounces>0</Ounces> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Machinable>True</Machinable> <ReturnLocations>TRUE</ReturnLocations> </Package> </RateV4Request>Response received <?xml version="1.0" encoding="UTF-8"?> <RateV4Response><Package ID="0"><ZipOrigination>35178</ZipOrigination><ZipDestination>35178</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Size>REGULAR</Size><Machinable>TRUE</Machinable><Zone>1</Zone><Postage CLASSID="3"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt;</MailService><Rate>17.95</Rate></Postage><Postage CLASSID="2"><MailService>Priority Mail Express 1-Day&lt;sup&gt;&#8482;&lt;/sup&gt; Hold For Pickup</MailService><Rate>17.95</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.75</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="6"><MailService>Media Mail Parcel</MailService><Rate>2.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>2.59</Rate></Postage></Package></RateV4Response>It's using RateV4. Shouldn't it be using RateV2? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 Tried it again, WITH your NEW edit, and it had the same error. But at least it did try to use RateV2. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 It should use IntlRateV2.Our testing is focused on shipping to Canada.What you posted above is a rate request from 35178 to 35178. Please try again. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=IntlRateV2&XML=<IntlRateV2Request USERID="521DIRTY0492"> <Package ID="0"> <Pounds>1</Pounds> <Ounces>0</Ounces> <Machinable>true</Machinable> <MailType>Package</MailType> <ValueOfContents>100.00</ValueOfContents> <Country>Canada</Country> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>10</Width> <Length>10</Length> <Height>10</Height> <Girth/> <OriginZip>35178</OriginZip> </Package> </IntlRateV2Request>Response received <?xml version="1.0" encoding="UTF-8"?> <IntlRateV2Response><Package ID="0"><Error><Number>-2147219045</Number><Source>;IntlRateV2.UnpackIntlRateV2Node</Source><Description>Invalid options requested for this revision of International Rate V2.</Description><HelpFile/><HelpContext/></Error></Package></IntlRateV2Response> Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 Invalid Options....Very strange.I'll be back. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 (edited) I know it says some don't need destination zip, but I'm thinking it does, so it can show all possible shipping options I have checked. What if I took the Priority Internationals off to see if that worked?NO - that didn't work, either. But here's the log entry:Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=IntlRateV2&XML=<IntlRateV2Request USERID="521DIRTY0492"> <Package ID="0"> <Pounds>1</Pounds> <Ounces>0</Ounces> <Machinable>true</Machinable> <MailType>Package</MailType> <ValueOfContents>100.00</ValueOfContents> <Country>Canada</Country> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>10</Width> <Length>10</Length> <Height>10</Height> <Girth/> <OriginZip>35178</OriginZip> </Package> </IntlRateV2Request>Response received <?xml version="1.0" encoding="UTF-8"?> <IntlRateV2Response><Package ID="0"><Error><Number>-2147219045</Number><Source>;IntlRateV2.UnpackIntlRateV2Node</Source><Description>Invalid options requested for this revision of International Rate V2.</Description><HelpFile/><HelpContext/></Error></Package></IntlRateV2Response> Edited June 13, 2015 by Dirty Butter Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 Please leave your settings as they are.We need to make a few more code edits. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 Leave it WITH Priority choices? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 First, make this edit:From: /* IMPORTANT NOTE - USPS XML Parser is so totally shitty you have to send the XML elements in the correct order!!??!?! */ $xml->startElement($this->_api.'Request'); $xml->writeAttribute('USERID',$this->_settings['username']); $xml->startElement('Package'); $xml->writeAttribute('ID',0); ## Calculate Lbs/Oz $this->weightLbsOz(); // the following should be 'country_id' NOT 'country'! If you think otherwise, talk to Bill! if($delivery['country_id']==$GLOBALS['config']->get('config','store_country')) { // National "RateV4Request" $xml->writeElement('Service',"ALL"); $xml->writeElement('ZipOrigination',$this->_settings['ziporigin']); To: /* IMPORTANT NOTE - USPS XML Parser is so totally shitty you have to send the XML elements in the correct order!!??!?! */ $xml->startElement($this->_api.'Request'); $xml->writeAttribute('USERID',$this->_settings['username']); ## Calculate Lbs/Oz $this->weightLbsOz(); // the following should be 'country_id' NOT 'country'! If you think otherwise, talk to Bill! if($delivery['country_id']==$GLOBALS['config']->get('config','store_country')) { // National "RateV4Request" $xml->startElement('Package'); $xml->writeAttribute('ID',0); $xml->writeElement('Service',"ALL"); $xml->writeElement('ZipOrigination',$this->_settings['ziporigin']); Then, make this edit:From: } else { // International Rates $xml->writeElement('Pounds',$this->_lbs); $xml->writeElement('Ounces',$this->_oz); To: } else { // International Rates $xml->startElement('Package'); $xml->writeAttribute('ID',0); $xml->writeElement('Pounds',$this->_lbs); $xml->writeElement('Ounces',$this->_oz); We have just moved two common statements from the comman area to each of the specific API areas.Please leave your settings as they were. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 13, 2015 Share Posted June 13, 2015 (edited) It seems that even though 'OriginZip' is now required, it is still only understood when IntlRateV2 is of Revision 2.So, make this next edit:From: } else { // International Rates $xml->startElement('Package'); $xml->writeAttribute('ID',0); $xml->writeElement('Pounds',$this->_lbs); $xml->writeElement('Ounces',$this->_oz); To: } else { // International Rates $xml->writeElement('Revision',2); $xml->startElement('Package'); $xml->writeAttribute('ID',0); $xml->writeElement('Pounds',$this->_lbs); $xml->writeElement('Ounces',$this->_oz); Edited June 13, 2015 by bsmither Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2015 Author Share Posted June 13, 2015 I put the International Priority choices back, made the edits, and tried again. Still error message.Request Sent - http://production.shippingapis.com/ShippingAPI.dll API=IntlRateV2&XML=<IntlRateV2Request USERID="521DIRTY0492"> <Package ID="0"> <Pounds>1</Pounds> <Ounces>0</Ounces> <Machinable>true</Machinable> <MailType>Package</MailType> <ValueOfContents>100.00</ValueOfContents> <Country>Canada</Country> <Container>VARIABLE</Container> <Size>REGULAR</Size> <Width>10</Width> <Length>10</Length> <Height>10</Height> <Girth/> <OriginZip>35178</OriginZip> </Package> </IntlRateV2Request>Response received <?xml version="1.0" encoding="UTF-8"?> <IntlRateV2Response><Package ID="0"><Error><Number>-2147219045</Number><Source>;IntlRateV2.UnpackIntlRateV2Node</Source><Description>Invalid options requested for this revision of International Rate V2.</Description><HelpFile/><HelpContext/></Error></Package></IntlRateV2Response> 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.