Estimate Shipping


https://forum.kartris.com/Topic6622.aspx
Print Topic | Close Window

By shulemj - Tue 12 Jul 2016
For every shipping destination chosen withing the Basket, I get the following error:Oops .. There is a problem in estimating the shipping cost for your address, please make sure your shipping address details are correct, then try again.



No error is logged in the log
By Tiggywiggler - Wed 13 Jul 2016
Does this happen in the vanilla build (What you download from the Kartris website) or does this only happen on your website?

Does it happen for all addresses or only one?

Does it happen for all payment gateways or only one?
By shulemj - Wed 13 Jul 2016
It happens on the Kartris website that I installed on a shared environment with no customization. The website is http://www.malchutjudaica.com/
The only changes made are through the backend. I will list my settings as I think it might be wrong (I have other errors all throughout the checkout process)

Core Setting:

Integrated shipping set to calculate by : weight


Only Activated UPS:
http://forum.kartris.com/Uploads/Images/f35ed70c-6f8e-4fa6-ae87-f0ae.png

Basic settings for UPS:
http://forum.kartris.com/Uploads/Images/ccce7af5-61a6-4657-a8f3-1669.png

UPS Rates Settings:
http://forum.kartris.com/Uploads/Images/1ec5130b-2994-4c64-b013-68e9.png

The UPS Gateway is set:
http://forum.kartris.com/Uploads/Images/ddad7684-09a6-4ed7-b974-f11b.png
Note: All xxxx are really filled with working settings (currently used on the Cactushop site)

My destinations are set for the US states like this:
http://forum.kartris.com/Uploads/Images/e79c2ef5-8c98-4773-954e-c41c.png

Now, to the rest of your questions:

It happens only on my site. Where else should it happen?

It happens at no address. It supposed to calculate shipping cost at Basket.aspx, before even logging in.

No payment gateway is selected at this point.

P.S. No trace in the Error Logs.
By Tiggywiggler - Wed 13 Jul 2016
The error is generated if Kartris has requested shipping methods and nothing has been returned. I have had a look at the website you pointed to and it all works there so I assume you are talking about a development or staging server you are using elsewhere.

I suspect that the problem is being generated when Kartris tries to reach out to the UPS service.

Package Type is normally 02, are you sure you should use 01?

Beyond that I do not know and would have to test with live data.

Good luck hunting.
By shulemj - Wed 13 Jul 2016
In Cactushop they had it as "01". Anyway, I changed it to "02" with no improvement.
By shulemj - Sun 31 Jul 2016
Anyone with any help?
By Tiggywiggler - Tue 2 Aug 2016
To resolve this problem I think we would need to replicate it and see what the error message was that we were getting back.

If you have looked at your error logs and you get nothing, then there is not much more I could do from here. I am Sorry mate.
By shulemj - Thu 4 Aug 2016
Finally got some errors logged! (never been so happy for an error message...)

-----------------------------------------------------------------------------
>> Version:2.9005
>> URL:http://www.malchutjudaica.com/Basket.aspx
>> Page:
-----------------------------------------------------------------------------
>> 8/3/2016 6:16:50 PM
>> 00.00.000.000 (masked by me here)
>> DESCRIPTION:
Message: Object reference not set to an instance of an object.
Exception Type: System.NullReferenceException
Source: App_Code.o-ekavid
StrackTrace: at Payment.Serialize(Object strObject)


==================================================


-----------------------------------------------------------------------------
>> Version:2.9005
>> URL:http://www.malchutjudaica.com/Basket.aspx
>> Page:
-----------------------------------------------------------------------------
>> 8/3/2016 6:16:50 PM
>> 00.00.000.000 (masked by me here)
>> DESCRIPTION:
Value cannot be null.
Parameter name: s

==================================================



All this, just for loading Basket.aspx. No user events.

Selecting a different state, both errors reoccur.
By shulemj - Wed 10 Aug 2016
Now, with the error message posted, can anyone please help me? Should I upload the ASPX & VB pages again?
By Tiggywiggler - Thu 11 Aug 2016
Thank you for this. It would appear that a blank object is being passed into payment.serialise, however, this is called from many places and with different types of objects so in this case it is not specific enough to tell me what is going on.

If the stack trace showed the complete call hierarchy it might help, but it appears that whatever is generating the error message is not getting this.

Sorry mate.
By shulemj - Thu 11 Aug 2016
First off thanks for helping out here.

BTW, I am not that familiar with all the terminology.

I just want to remind you that this occurs in /Basket.aspx, and it seems that the "Estimate Shipping" triggers the error. See the first message of this topic.

In any event, does it make sense to completely redo the code (download again from Kartris site and upload), or this won't help?
By Tiggywiggler - Thu 11 Aug 2016
It looks to me like your problem is being generated at line 80 of the module ShippingMethodsEstimate.ascx.vb.

If you were here in the office we would put your code on a machine running Visual Studio and breakpoint the code to see where the error is coming up.

Do you have VisualStudio or are you just installing and running the Kartris application?
By shulemj - Fri 12 Aug 2016
I just uploaded Kartris on the server environment but I'm logged in live via Visual Studio (Community). helps?

Would you be so kind and login if I give you the FTP credentials?
By shulemj - Fri 12 Aug 2016
I just uploaded Kartris on the server environment but I'm logged in live via Visual Studio (Community). helps?

Would you be so kind and login if I give you the FTP credentials?
By Tiggywiggler - Sat 13 Aug 2016
Visual Studio Community should do what you need really. If you breakpoint at the line of code mentioned, and then step through the software you should see which parameters are not being populated.

From what I have seen, the shipping provider is involved in this process, and so any issues with the shipping provider will create an issue for you at this line of code.

We could try to reproduce the issue here but we would need to know what the variables are set at, at the point that you get this issue.

If you want, we can look at your shipping provider instance and see if that is the cause of your issue. I am happy to take a quick peek at this if you need. You can send me FTP credentials if you want, or you can send me the files in Plugins/UPS and Plugins/USPS (depending on which one you are using). Just be aware that your passwords etc. for your shipping provider are going to be in those files, so don't share that information publicly Smile
By Tiggywiggler - Mon 15 Aug 2016
I have now received your FTP details, I have downloaded your files, and I am getting the same fault.

This is good news, we can reproduce the error. Leave it with me, I will come back with a solution.
By Tiggywiggler - Mon 15 Aug 2016
I have now received your FTP details, I have downloaded your files, and I am getting the same fault.

This is good news, we can reproduce the error. Leave it with me, I will come back with a solution.
By Tiggywiggler - Mon 15 Aug 2016
Try it now. Please report back.
By Tiggywiggler - Mon 15 Aug 2016
This thread has been marked as Answered so I think it is safe to say that the last modification I made did the trick. For anyone coming back here at a later date with the same problem:

In BasketView.ascx.vb at line 326 I have populated the Shipping Details. To achieve this I inserted this code:

UC_ShippingMethodsEstimate.ShippingDetails = ShippingDetails



So that it is now:


 If KartSettingsManager.GetKartConfig("frontend.basket.shippingestimate") = "y" AndAlso BasketItems.Count > 0 Then
UC_ShippingMethodsEstimate.Visible = True
UC_ShippingMethodsEstimate.Boundary = ShippingBoundary
UC_ShippingMethodsEstimate.ShippingDetails = ShippingDetails
UC_ShippingMethodsEstimate.Refresh()
Else



This is because the shipping details were not being populated and as a result the shipping provider was returning an error (objshippingdetails=nothing).
By shulemj - Mon 15 Aug 2016
Thank you so much for helping out here, but the exact same error still persists.

I also noticed that certain destinations (UAE, Uganda, Uruguay & more) doesn't show the error. I think that all not showing the error are under "Rest of the World", which is not set under UPS, so it's not trying to calculate anything and is just offering "Customer Pickup".
By Tiggywiggler - Tue 16 Aug 2016
That's a shame, thank you for the update.

Yes, you will only see this fault when it is trying to use the UPS shipping provider. I am concerned that you are getting this problem even after the change as the change was tested in a development machine.

I am going to try a couple of other things, but we may end up having to take a copy of your DB as well (as some settings are in the DB and not the files). I will see what I can do without this and come back to you.
By Tiggywiggler - Tue 16 Aug 2016
Please check your application now mate.
By shulemj - Tue 16 Aug 2016
Unfortunately still throwing that same error.
By Tiggywiggler - Tue 16 Aug 2016
The UPS shipping API is throwing an unhandled error 111500.

We will need the UPS developer ADI guide to know what that error means and I don't have one.

I have asked someone else, who may have the API documentation, to have a look.
By shulemj - Tue 16 Aug 2016
Thank you so much. Can't wait.
By Tiggywiggler - Wed 17 Aug 2016
111500 Hard Special rates are unavailable for the selected service using requested containers
By shulemj - Wed 17 Aug 2016
I see the error mentioned in UPS' Developer's Guide, but don't know what it means
By Tiggywiggler - Wed 17 Aug 2016
Okay, so I have worked out the problem. I have no idea what the solution will be though.

Everything is fine with the UPS handler when selecting countries outside of the USA. I accept that at the moment it doesn't work for you, but that is because of something more fundamental in the user control, which is that the selection from the drop down box is not being sent to the shipping object before we ask the UPS handler to give us an estimate. Ignore that for now, the thing I cannot work out is that if you select the US, the UPS handler wants the postal code. It will not accept any input for the US without post code.

The drop down does not give you the post code, so I am a bit lost. I think that we could produce a lookup table that had an example post code for each state in the US, but this is going to be a bit of work.
By shulemj - Wed 17 Aug 2016
The error doesn't show anymore, but the whole function (Estimate Shipping) doesn't work, as it only shows now the "pickup" option, regardless of the destination (US, or abroad)
By Tiggywiggler - Fri 19 Aug 2016
You can replace the EstimateShipping control with the code from the download so that it is replaced, however, the original problem will still remain.
By Tiggywiggler - Sun 21 Aug 2016
Okay try that.

At the moment it will only work for all areas outside of the US, and inside the US it will only work for Alabama. DO NOT try to use it for states other than Alabama as it will not work a the moment (I haven't written the code for it).

If you open the basket and it is showing nothing, try selecting a different shipping location and then come back to whatever you had selected.

Let me know if this is working the way you are expecting before we go any further.

Thank you.
By shulemj - Mon 22 Aug 2016
Would it make sense to start anew, with a new database, and then use the datatool to import all my product data from the current database?
By shulemj - Mon 22 Aug 2016
Would it make sense to start anew, with a new database, and then use the datatool to import all my product data from the current database?
By Tiggywiggler - Mon 22 Aug 2016
It will not make any difference to the shipping problem. We have been discussing this and it looks like a real error with the original code. We do not provide UPS with the information that it wants, so we are trying to create a fix.

If you were to scrap it all and start again, you would have the same issue.

Can you try the recent modification and tell me if you are seeing the desired output? if it works for Alabama then we know we are on the right path.
By shulemj - Mon 22 Aug 2016
Thank you for clarifying that the issue is in the original code.

I'm sorry for not getting back sooner about Alabama. I just tried it and it works somewhat, as it shows all express options, but not the Ground service. Is that another type of error?
By Tiggywiggler - Tue 23 Aug 2016
Hello,

I have looked at your old website and for sure, you get 2 extra options for ground travel.

I have also put all number of different values into your new website and I cannot get the ground travel to show up, only the air travel shows.

At this point I don't really have any idea what is causing this issue, and honestly, I have haemorrhaged time on this problem so I am sorry to say that I am going to have to park this problem for now.

If you get in touch with your people at UPS and they can shine some light on why this would be happening I am happy to give it another go, but for now I have simply run out of 'free' time and I need to focus on other things.

Sorry mate, I don't like leaving anyone in the lurch.
By Tiggywiggler - Mon 29 Aug 2016
Hello,

Quick update. So I have managed to obtain the old Cactushop ASP file that did the work of getting the UPS Shipping options (UPS Shipping Handler). I have converted the old ASP code into ASP.Net code and placed it within the source code for your site and it retrieves all 5 shipping options.

When I put the same information into the new UPS Shipping Hander and it only gives me the three options you are seeing on your site. This says to me that there is an issue inside the new UPS handler, but, as this is not open source (it is a compiled DLL) I cannot dig any further into it.

I am going to reach out to the central Kartris development team and see if they are willing to release the code for the UPS DLL and see if we can find the issue in there.

I will keep you up to date.
By shulemj - Mon 29 Aug 2016
Thank you so much.
By shulemj - Tue 30 Aug 2016
Tiggywiggler (19/08/2016)
You can replace the EstimateShipping control with the code from the download so that it is replaced, however, the original problem will still remain.


I'd like to bring you up to speed. Thanks to the advice from Paul (Kartris), I recreated the database, and many issues resolved.

The shipping issue (both at estimate in the basket, and at the choice list in checkout) are still ongoing. I wonder if you can help me reverse your modifications (I will download a backup of your work before any reversing), to see if this was also resolved.

Can you confirm where you made your changes? Was it "ShippingMethodsDropdown" or "ShippingMethodsEstimate"?