Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey Guys :)
We are just doing a super TC solution with a integration for C5 here we have an event being fired by Hangfire.
When an order has been handled we want to change its order status like this:
order.OrderStatusId = SkyConstants.OrderStatuses.Completed;
But it throws the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at TeaCommerce.Api.Web.Infrastructure.Licensing.TopLevelDomainLicense.IsFeatureLicensed(Feature feature)
at TeaCommerce.Api.Infrastructure.Licensing.LicenseService.ValidateLicenseFeatures(Feature features)
We have the license, im guessing its because there is no available httpcontext, but since the TeaCommerce.Api is not on Github i cannot check thi out. Do you have any other trick to change this order status? Old SQL? Or another way to save an order?
Yes, you are exactly right. We are depending on the HttpContext.Current, and it must be missing in your case.
Then how to do it...
what exactly do you mean by application-cache. Do you have a code-example on how to clear the TC cache?
That was actually a good question. Basically Tea Commerce caches all orders in the MemoryCache and is using a sliding expiration of a default 10 minutes. You can clear all orders by calling the Tea Commerce CacheService:
TeaCommerce.Api.Infrastructure.Caching.CacheService.Invalidate( string cacheKey );
The cache key for orders is: "Orders-[storeId]"
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted