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
I am having an issue where, in the Tea Commerce section of the back office, the order number of each new order coming in is set to 21. It seems that the CurrentOrderNumber field in the Store table keeps resetting to 20.
I’ve tried updating this to 0, 1, 100, random number etc. with no effect, the database will update but every time a new order comes in it resets back to 20. Each time I’ve updated the database I’ve restarted the website. Can you provide any info?
Any help would be much appreciated, thanks.
The instance of Tea Commerce is fully licensed if that helps.
Do you have a DB trigger that resets it or maybe some custom code that runs in debug mode that resets it to 20?
When an order is finalized it does this:
OrderNumber = store.OrderSettings.OrderNumberPrefix + store.GetNextOrderNumber( true );
The GetNextOrderNumber method does this on a store object.
orderNumber = CurrentOrderNumber;
Do you do any load balacing or something more complex that could impact it?
I figured that was all that the Order Number generation was doing. There isn't any custom code or a DB trigger, but a load balancer is used to separate the cms instance from the site, but there is only one DB, so I'm not sure how it could impact.
TC has a caching layer that caches the objects when fetched from the DB. Maybe that is the problem when load balancing??
Could be an issue, how is best to clear the cache from this caching layer?
You can call TeaCommerce.Api.Infrastructure.Caching.CacheService.Instance.Invalidate("Stores")
The TC caching layer doesn't seem to be interfering with the load balancing. Make a call to the CacheService.Instance.Invalidate("Stores") didn't help.
One thing I have noticed is that the CurrentOrderNumber will reset without a finalized order having gone through. Unless there are methods on the order object that can reset the CurrentOrderNumber, I am stumped.
There is nothing in Tea Commerce that resets the CurrentOrderNumber. So the only thing is that one server finalizes the order and the CurrentOrderNumber is 20 at that shop where the shop where the order is created and where your add products to the cart runs with a different number. So somehow they things are not aligned correctly.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted