Posted on 06/10/2020 16:59:17
Hi Anders,
I think I understand what you mean, but just to be sure, let me recap. You need a user to be able to navigate "Back" in the browser and change the order, but this is currently not possible because changes are not applied due to IsProcessingCheckout. I'll assume this is the case, otherwise please correct me.
It's a tricky one. IsProcessingCheckout is doing exactly what it's meant to do: prevent the order from being manipulated either intentionally in bad faith or unintentionally. We want to prevent a user from sending an order to checkout, then going back and adding more orderlines and then processing the cheaper order. Or in the unintentional case where a user doesn't want to pay a certain amount and has the order open in a different tab, then removes some orderlines and processes the order. This would all result in unwanted situations and additional load on the customer service department.
However, I do see the need to be able to change the order intentionally and in good faith, so let me propose a solution. We change the flow so that if the order changes a value that is related to price, then order is downgraded to a cart. This makes it editable and calculations resume as with a normal cart. The user is then able to add or remove orderlines, change shipping or payment, add vouchers, anything basically. Due to the downgrade, the order would get a new ID so the previous checkout flow will not be able to complete because of ID mismatch. This prevents situations where the user acts in bad faith or unintentionally, and allows the user, intentionally and in good faith, to edit the order.
Would this be acceptable to you?
- Jeppe