You'll need to delete all the orders and then in the database, in the TeaCommerce_Store table you can reset the CurrentCartNumber and CurrentOrderNumbers back to 0
One doubt not related to this topic. When order is finalized and confirmation mail has been sent. But the orderline still persist in the cart.Not get cleared, Do you know why ? possible reasons for this ?
Sounds like you have some code that is running that is attempting to modify the order whilst payment processing is in progress. When you modify an order that is mid way through processing, it clones the order as an in progress order can't be modified.
I'd double check your code and make sure you aren't modifying the order when the payment status is set
Yeah got it. But now I need to add an extra property on the current order to skip the calculation written on the custom OrderlineCalculator.I'm using
TC.AddOrUpdateOrderProperties to update the extra property.
If the extra property persist on the order properties then it will skip the calculation done in the orderlineCalculator.
Here the yellow line of code used to update a new property to order.
If I change the place where the order property is updating can solve this issue ie, Clear the cart after order finalize
Yea, it's using the TC helper that is causing it to clone as it's this that does the check to see if PaymentState != null and if it doesn't, it clones.
You could get around this by not using the TC helper and instead set the properties on the order directly
Hi Matt, Regarding reset CurrentOrderNumber and CurrentCartNumber on Teacommerce_Store table. It doesn't get change when we manually update values to 0. When I do a checkout it still continues on the order number and cart number. Do you know why?
You'll need to restart your app pool as well as the stores get cached so if the value was cleared in the db but not in the cache, it would probably continue from the previous point.
Clear existing Cart numbers and Orders
How can we clear all the existing cart numbers and orders to initial like CART-1 and ORDER - 1 when we go live ?
Hi Vineeth,
You'll need to delete all the orders and then in the database, in the TeaCommerce_Store table you can reset the CurrentCartNumber and CurrentOrderNumbers back to 0
Hope this helps
Matt
One doubt not related to this topic. When order is finalized and confirmation mail has been sent. But the orderline still persist in the cart.Not get cleared, Do you know why ? possible reasons for this ?
Hi,
Sounds like you have some code that is running that is attempting to modify the order whilst payment processing is in progress. When you modify an order that is mid way through processing, it clones the order as an in progress order can't be modified.
I'd double check your code and make sure you aren't modifying the order when the payment status is set
Matt
Yeah got it. But now I need to add an extra property on the current order to skip the calculation written on the custom OrderlineCalculator.I'm using TC.AddOrUpdateOrderProperties to update the extra property. If the extra property persist on the order properties then it will skip the calculation done in the orderlineCalculator.
PFA :
Here the yellow line of code used to update a new property to order. If I change the place where the order property is updating can solve this issue ie, Clear the cart after order finalize
Yea, it's using the TC helper that is causing it to clone as it's this that does the check to see if PaymentState != null and if it doesn't, it clones.
You could get around this by not using the TC helper and instead set the properties on the order directly
Matt
That sounds perfect. Thanks, matt for always the quick response :)
Hi Matt, Regarding reset CurrentOrderNumber and CurrentCartNumber on Teacommerce_Store table. It doesn't get change when we manually update values to 0. When I do a checkout it still continues on the order number and cart number. Do you know why?
Hi Vineeth
You'll need to restart your app pool as well as the stores get cached so if the value was cleared in the db but not in the cache, it would probably continue from the previous point.
Sorry, I should have mentioned this before.
Matt
Ooops its Umbraco cloud. Only I can do is restart the environment. Is that will help?
The steps I did :
Anything i missed ?
Hmm, sounds correct, although I'm not sure what "Restarted the cloud environment" actually does so I'm not sure if it causes an app pool recycle.
The way I tend to do it, though it's a little tricky is to use clouds Kudu interface to "touch" the web.config forcing it to perform a recycle.
See here https://our.umbraco.com/documentation/Umbraco-Cloud/Set-up/Power-tools/ and here https://our.umbraco.com/documentation/Umbraco-Cloud/Set-up/Power-tools/File-structure-on-cloud/ for details on how to access Kudu and the file strucure on Azure. From the files view you can click an edit button next to web.config to edit it, adding a space somewhere should be enough, then re-saving it.
I can't fully recall if there is a shorter action somewhere to do this as I don't use cloud that often, but I know the above should work.
Hope it helps
Matt
Yeah, it worked. Thanks Matt :)
Awesome 👍
is working on a reply...