Teacommerce event 'afterAddOrUpdateOrderLine' parameter model returns id as Zero After teacommerce update from 3.2.5 to 3.4
Hi Teacommerce team,
I've updated my tecommerce package from 3.2.5 to latest 3.4 .
After updating,Add a orderline to the cart and updating mini cart using TC JS events. 'afterAddOrUpdateOrderLine event returns model parameter model.id as 0 always. Please let us know why this is happening.
PFA :
It looks like this is a regression issue. In 3.4 we made a bunch of performance improvements as one of our clients was having issues with the site under load and as part of this, the FormPostHandler (which he JS API communicated with) was updated to hold off persisting an order till the very end so only one save request is called on the order.
Unfortunately looking into this, it appears this means for this method the order line is created and serialized to return, but because the order isn't saved yet, it is serialized in a state where it has no id.
I'll have to look into what we can do fix this and get back to you.
Teacommerce event 'afterAddOrUpdateOrderLine' parameter model returns id as Zero After teacommerce update from 3.2.5 to 3.4
Hi Teacommerce team,
I've updated my tecommerce package from 3.2.5 to latest 3.4 . After updating,Add a orderline to the cart and updating mini cart using TC JS events. 'afterAddOrUpdateOrderLine event returns model parameter model.id as 0 always. Please let us know why this is happening. PFA :
Hi Vineeth
It looks like this is a regression issue. In 3.4 we made a bunch of performance improvements as one of our clients was having issues with the site under load and as part of this, the
FormPostHandler
(which he JS API communicated with) was updated to hold off persisting an order till the very end so only one save request is called on the order.Unfortunately looking into this, it appears this means for this method the order line is created and serialized to return, but because the order isn't saved yet, it is serialized in a state where it has no id.
I'll have to look into what we can do fix this and get back to you.
Thanks Matt, It will be helpful we can do a fix on this.
Can we revert back to the old version for a quick fix? that is 3.2.5
Hi Vineeth,
Yes, this is a 3.4 thing so reverting back to a version before this should fix the issue for the time being.
I'll keep you updated on an actual fix
Matt
In fact, I think I might have a fix for you. If you want to download the following DLL and drop it in your bin folder it should fix the issue https://www.dropbox.com/s/ob0bv4505v0unht/TeaCommerce.Api.Web.zip?dl=0
If you want to give it a try and let me know if it works as expected I'll get an official release out as soon as I can.
Matt
Perfect, It worked finely. Thanks for the great support Matt. Kudos to you :)
No problem.
Thank you for reporting and testing it.
I'll get an official update out by the end of the week.
Matt
Hi Vineeth,
Just wanted to let you know I have released a 3.4.1 patch release containing a fix for this. Many thanks again for reporting it.
https://our.umbraco.com/packages/website-utilities/tea-commerce/
Matt
is working on a reply...