TC.GetCurrentOrder(storeId, false) always returns an object
Hi there.
We are running TC version 2.2.3 and there is a problem with TC.GetCurrentOrder(storeId, false) always returns an object instead of null when the basket is empty.
I understand there was a bug with this in 2.2.0, so we have ensured all our dll files are up to date.
Basically we clear the session cookie and the first time we hit the method we dont get null but an order object.
I have just walked through the code and tested it and it works in 2.2.1+. So could you check that you have got the right files at your environment and it has been installed correctly?
Could I persuade you to do a MD5 hash of the teacommerce dll files? with something like http://www.slavasoft.com/hashcalc/ That way we can be 100% sure the files are similar.
What ways can the Order be created?
With that knowledge I can try and investigate if the order is set from somewhere strange.
The order is created if you use TC.GetCurrentOrder but don't specify false as the parameter. Or if you add or update an order line or anything the involves the order.
Try and total vanilla Umbraco install with TC 2.2.3 and try the code I used. That should work.
TC.GetCurrentOrder(storeId, false) always returns an object
Hi there.
We are running TC version 2.2.3 and there is a problem with TC.GetCurrentOrder(storeId, false) always returns an object instead of null when the basket is empty.
I understand there was a bug with this in 2.2.0, so we have ensured all our dll files are up to date.
Basically we clear the session cookie and the first time we hit the method we dont get null but an order object.
Any suggestions?
Hi Kristian
I have just walked through the code and tested it and it works in 2.2.1+. So could you check that you have got the right files at your environment and it has been installed correctly?
Kind regards
Anders
Hej Anders.
I tried to reinstall the package and also verify the dll files. I took the 2.2.3 zip from the project page.
Still no luck though.
I tried to boil it down to nothing but the basics:
Clear the Session cookie and it still returns an order.
How can I help debug this?
Best regards
Kristian
I have this simple test and everything works.
So it must be some dll files or something that is not updated or something like that.
Kind regards
Anders
Hi Anders.
Could I persuade you to do a MD5 hash of the teacommerce dll files? with something like http://www.slavasoft.com/hashcalc/ That way we can be 100% sure the files are similar.
What ways can the Order be created?
With that knowledge I can try and investigate if the order is set from somewhere strange.
Best regards
Kristian
The order is created if you use TC.GetCurrentOrder but don't specify false as the parameter. Or if you add or update an order line or anything the involves the order.
Try and total vanilla Umbraco install with TC 2.2.3 and try the code I used. That should work.
Kind regards
Anders
It turnes out that it was a .dll file. For some reason the TeaCommerce.Umbraco.Web.dll did not get overwritten when installing the package again.
is working on a reply...