Vulnerability in EPiServer.Forms
When our customers cancels orders in the CommerceManager, all lineitems are cleared. Is there anyway I can change this behaviour?
Thank you in advance.
I couldn't reproduce this problem in my local with v12.5.0. I still see the line items of cancelled order. Any missing steps?
Anw, you can change the behaviour by creating a class inherits from DefaultPurchaseOrderProcessor class, an override the CancelOrder() method. Or even create a new class that implements IPurchaseOrderProcessor interface and implement your custom business there. Don't forget to register your custom implementation. However, please note that, the DefaultPurchaseOrderProcessor is marked as internal, do it at your own risk. My suggestion is not to do it if it's really needed, I couldn't reproduce this behavior.
Not sure what you meant CommerceManager v12.5.0 and Commerce v10.8.0, the version should match each other.
Do you have any custom code to handle the cancel process?
You're right, my CommerceManager is also v10.8.0.
Futhermore, I can't any code that implements custom behaviour for order cancellation.
Here's an example of the line items before cancellation:
That sounds like a bug that was fixed in a later version. Can you try to upgrade to latest version and try again ? (assuming your commerce manager does not have any customization)
Thanks for the answer.
Was it fixed within the 10 version branch? Or do I have to go all the way up to Commerce 12 in order to get the fix?
I am ... not sure. It sounds like a bug to me, but I can't remember which one and which version :). I know upgrading is not an easy task but you are recommended to do it anyway.
If upgrading to latest 12.5 version is not an option for you, you would have to contact developer support service for further assistance.
I've taken this issue to the developer support. Thank you for your time.
I was able to look into your site and here's my finding (basically what I sent to developer support)
There was no inventory information attached to the SKU corresponding to the lineitem. When the shipment is cancelled, it is invalidated (so the system can revert reservations made to the the inventory), and the workflow sees that, "ok, no inventory, let's remove the item".
If they want to prevent that behavior you would have too
It seems if we just add an inventory of 1 to all products, the CommerceManager keeps the order lines for cancelled orders. We're gonna continue with this. Thanks your time and answers!