I have external service that checks whether customer paid in 6 months. To check it, i use TC.GetAllFinalizedOrdersForCustomer(1, customer) and then get last payment date i find. But sometimes (way too often) GetAllFinalizedOrdersForCustomer throws NullReferenceException. I have no idea what is it. Can anyone help?
Ok, I realised that function GetAllFinalizedOrdersForCustomer works only if I am logged on another tab with same account as in function. Question change:
How to get all finalized orders for member when not logged in?
I get some strange results using this method. I am testing with a member who has two finialized orders. My definition of finialized, if correct, is the orders table indicates an OrderNumber and finalized date? There in total the member has 12 orders of which only two are finalized.
I have a razor script which loops through the orders and orderlines. On some occasions it displays just two orders and their lines correctly but most of the time it displays 8 orders of the same two orders. Any idea what is happening here? The script is:
Came back to it just now, logged in and saw two orders and then reloaded the page and get 8. Is this a familar issue with 2.1.1? I will check the biniaries have been updated if so.
No it shouldn't be a problem anymore. Could you try and verify the dll's has been updated. And that the xml order cache is refreshed - just delete the file from the App_Data/tea-commerce folder.
Multiple repeated orders listed when I use GetAllFinalizedOrdersForCustomer in razor, I upgraded to latest tea commerce a few days ago - and the problem disapeared - sadly its come back!
Deleting the cache solves the probelm - but I'm not sure if this is a perminent fix?
The GetAllFinalizedOrdersForCustomer method never adds orders to the cache. I will look into if there is a bug when changing a finalized order and the xml needs to save.
So you found a bug. In Tea Commerce 2.1.2- everytime a finalized order was saved it would add a new entry into the finalized orders xml file. I have fixed this in the current build and it will be released in 2.1.3.
GetAllFinalizedOrdersForCustomer throws null reference exception
I have external service that checks whether customer paid in 6 months. To check it, i use TC.GetAllFinalizedOrdersForCustomer(1, customer) and then get last payment date i find. But sometimes (way too often) GetAllFinalizedOrdersForCustomer throws NullReferenceException. I have no idea what is it. Can anyone help?
Ok, I realised that function GetAllFinalizedOrdersForCustomer works only if I am logged on another tab with same account as in function. Question change:
How to get all finalized orders for member when not logged in?
Hi Marius
The GetAllFinalizedOrdersForCustomertakes a customer id so that is just the one you need to send along. No need to be logged in to use this method.
Kind regards
Anders
I get some strange results using this method. I am testing with a member who has two finialized orders. My definition of finialized, if correct, is the orders table indicates an OrderNumber and finalized date? There in total the member has 12 orders of which only two are finalized.
I have a razor script which loops through the orders and orderlines. On some occasions it displays just two orders and their lines correctly but most of the time it displays 8 orders of the same two orders. Any idea what is happening here? The script is:
Hi Paul
Are you running the latest Tea Commerce? I know there was a bug that was fixed in 2.1.1. Try update to the latest version.
Kind regards
Anders
Hi Anders,
Yeah I am running 2.1.2, upgraded from 2.1.1.
Came back to it just now, logged in and saw two orders and then reloaded the page and get 8. Is this a familar issue with 2.1.1? I will check the biniaries have been updated if so.
Cheers
No it shouldn't be a problem anymore. Could you try and verify the dll's has been updated. And that the xml order cache is refreshed - just delete the file from the App_Data/tea-commerce folder.
Kind regards
Anders
Ah ha deleting the cache did the trick.
Great thanks,
Paul
Multiple repeated orders listed when I use GetAllFinalizedOrdersForCustomer in razor, I upgraded to latest tea commerce a few days ago - and the problem disapeared - sadly its come back!
Deleting the cache solves the probelm - but I'm not sure if this is a perminent fix?
Thanks
Hash
The GetAllFinalizedOrdersForCustomer method never adds orders to the cache. I will look into if there is a bug when changing a finalized order and the xml needs to save.
Kind regards
Anders
So you found a bug. In Tea Commerce 2.1.2- everytime a finalized order was saved it would add a new entry into the finalized orders xml file. I have fixed this in the current build and it will be released in 2.1.3.
THANKS for finding this bug!
Kind regards
Anders
is working on a reply...