Im not sure about the error checking...I just know my client was not happy with the $0 (Which showed up as $3 for her because she has a S&H charge) so I told my dev to put in error checking so if it happens again atleast it wont show that method as an option. I think my philosophy is to always check for errors and to not assume things will always go smoothly. I may be a bit anal though with that philosophy. Basically we handle every single possible return value in our work especially errors.
If not handling the error another thing you could do which is essentially the same thing is only proceed with a valid value. In this case $0 shipping is not valid.
If not handling the error another thing you could do which is essentially the same thing is only proceed with a valid value. In this case $0 shipping is not valid.
Henry Weismann
877.44.MY.WEB (877.446.9932)
We can help with your Opencart Site - Opencart Web Developer
hcamelion wrote:RE: Also, is anyone else running into an error involving the <CommercialFlag> or <CommercialPlusFlag> tag? It's popping as an invalid tag on my installation. Odd, since it's in the documentation.
Maybe you are not setting the right revision/api version? That is just off the cuff.
Just had the XML elements out of order. SMH.
Definitely try to follow that same philosophy, just pointing out to those reading that the error check code isn't necessary for the emergency fix. Some form of it will be put into the updated release that's forthcoming.hcamelion wrote:Im not sure about the error checking...I just know my client was not happy with the $0 (Which showed up as $3 for her because she has a S&H charge) so I told my dev to put in error checking so if it happens again atleast it wont show that method as an option. I think my philosophy is to always check for errors and to not assume things will always go smoothly. I may be a bit anal though with that philosophy. Basically we handle every single possible return value in our work especially errors.
If not handling the error another thing you could do which is essentially the same thing is only proceed with a valid value. In this case $0 shipping is not valid.
Looking at the problem a bit more, I think checking for both the value of $0 and the new <ServiceError> tag would be prudent. Perhaps an unrelated error could send the same result in the future.
@henkel @hcamelion:
Thank you for the detailed feedback (and code). Unfortunately I didn't see the responses until I had the primary problem solved, but I appreciate your willingness to help. And the beautiful formatting of the code.
In addition to the fixes posted here, I've added a conditional check in the XML query: The <AcceptanceDateTime> and <DestinationPostalCode> tags will only be added if a Destination Postal Code is submitted to OC. For actual shipments, I expect that every customer will enter their post code, but for the shipping quotes it's optional for many countries and the API will return an error if one is set without the other.
The update for 1.5.x is complete and has been tested. USPS API Update v1.5.0 will be available momentarily for download. I'll have a release of v1.5.0 available for OC 2.x shortly as well.
Apologies to all for the oversight.
Thank you for the detailed feedback (and code). Unfortunately I didn't see the responses until I had the primary problem solved, but I appreciate your willingness to help. And the beautiful formatting of the code.
In addition to the fixes posted here, I've added a conditional check in the XML query: The <AcceptanceDateTime> and <DestinationPostalCode> tags will only be added if a Destination Postal Code is submitted to OC. For actual shipments, I expect that every customer will enter their post code, but for the shipping quotes it's optional for many countries and the API will return an error if one is set without the other.
The update for 1.5.x is complete and has been tested. USPS API Update v1.5.0 will be available momentarily for download. I'll have a release of v1.5.0 available for OC 2.x shortly as well.
Apologies to all for the oversight.
Last edited by JeffroDH on Fri Jun 05, 2015 3:25 pm, edited 1 time in total.
No problem. In coding mistakes/bugs happen all the time. Its not about them not happening its about the response time getting the right fix in. I think you have done well on both counts. Have a great night/day!
Henry Weismann
877.44.MY.WEB (877.446.9932)
We can help with your Opencart Site - Opencart Web Developer
Hey there,
I just had a Canadian customer not be able to order so I read up about the postal code thing here. I downloaded and installed the new update and now I no longer get the cheaper postage prices as I did before and some people are only being shown a pick up at store option. This is not something I would be able to fix myself and I have a business I'm trying to run. Please help!
I just had a Canadian customer not be able to order so I read up about the postal code thing here. I downloaded and installed the new update and now I no longer get the cheaper postage prices as I did before and some people are only being shown a pick up at store option. This is not something I would be able to fix myself and I have a business I'm trying to run. Please help!
OC 1.5.5.1 customized OC default theme.
Vqmod 2.5.1
Hey, JeffroDH, rec'd the email notification and I downloaded your latest mod release to update the May 2015 USPS api.
It seems the new mod is causing my Estimate Shipping Quotes to hang.
Original version worked perfectly.
Dumb question, should I disable the first mod or do I run both?
Thanks,
Vqmod 2.5.1
Hey, JeffroDH, rec'd the email notification and I downloaded your latest mod release to update the May 2015 USPS api.
It seems the new mod is causing my Estimate Shipping Quotes to hang.
Original version worked perfectly.
Dumb question, should I disable the first mod or do I run both?
Thanks,
kimbo
The Chloelina All Natural Soap Co.
chloelina.com
I'm not sure what your Estimate Shipping Quotes mod does, or where the error is coming from. If it's a VQMod clash, then some clues should be in the vqmod error logs.
Only run one version of this mod at a time, and you might try disabling the either mod temporarily to see if your problem goes away. (change the extension to .xml.bak to easily disable it)
Post your vqmod error logs up here for more guidance.
Only run one version of this mod at a time, and you might try disabling the either mod temporarily to see if your problem goes away. (change the extension to .xml.bak to easily disable it)
Post your vqmod error logs up here for more guidance.
No, it is the View Cart screen to estimate the shipping charges before checking out.
I will re-install only the latest of your mod. If still not working, will post the vqmod error logs.
Thanks for the quick response!
Kim
I will re-install only the latest of your mod. If still not working, will post the vqmod error logs.
Thanks for the quick response!
Kim
kimbo
The Chloelina All Natural Soap Co.
chloelina.com
Hello - I've just installed OC Version 2.0.3.1 (latest) as well as this USPS API Update extension. It works great (with the exception of the "free" shipping from the US to Canada :-) ).
Can someone please take me through how I change the shipping rates to "Online" prices?
Thanks in advance!
Ross
Can someone please take me through how I change the shipping rates to "Online" prices?
Thanks in advance!
Ross
Are you having issues with shipping to Canada?ross_badger wrote:Hello - I've just installed OC Version 2.0.3.1 (latest) as well as this USPS API Update extension. It works great (with the exception of the "free" shipping from the US to Canada :-) ).
Can someone please take me through how I change the shipping rates to "Online" prices?
Thanks in advance!
Ross
Yes, I live in the US and when trying to ship to Canada, I get the rates shown below in the attachment.
Ross
Ross
Attachments
ScreenHunter_86 Jun. 16 21.25.jpg (23.38 KiB) Viewed 5114 times
Ross, if you've got the latest version of my VQMod, it is already pulling the online prices rather than the standard post office rates.ross_badger wrote:Hello - I've just installed OC Version 2.0.3.1 (latest) as well as this USPS API Update extension. It works great (with the exception of the "free" shipping from the US to Canada :-) ).
Can someone please take me through how I change the shipping rates to "Online" prices?
Thanks in advance!
Ross
I'm not able to replicate your issue with the stock 2.x install. I'll need some VQMod error logs to see what's going on with your install.
I think the reason for my error was this:
<code>$cost = 2 + $postage->getElementsByTagName('Rate')->item(0)->nodeValue;</code>
I was adding $2 above the shipping to charge automatic fees on shipping. When i removed the 2+ and reenabled the xml it worked
<code>$cost = 2 + $postage->getElementsByTagName('Rate')->item(0)->nodeValue;</code>
I was adding $2 above the shipping to charge automatic fees on shipping. When i removed the 2+ and reenabled the xml it worked
Who is online
Users browsing this forum: No registered users and 21 guests