This content has been marked as final. Show 6 replies
Store Credit refernce implementation is available as part of CRS. Please check CRS documentation for details.
These are some API details available.
Refer CancelOrderFormhandler.handleCancelOrder() method for cancelling an order.
I have read your documents. For CancelOrder and OrderCanceller class are deprecated .. Is there any other class for cancel order??CancelOrderFormHandler (class atg.commerce.order.purchase.CancelOrderFormHandler, /atg/commerce/order/purchase/CancelOrderFormHandler.) can be used for cancelling the current order.
As of now, ATG supports only cancelling the current order. If you want to cancel a submitted order you need to write custom code to cancel the order and update the shipping vendors (if they are external).
Check the below link.
Well, as you need to cancel an already submitted order, you need to write custom code considering the following scenarios.
1. The order is still in submitted state and within your application (not sent to fulfillment system).
2. The order is in process and in fulfillment system (Your order can be shipped by third party so you need t define the rules for cancelling).
3. The order is already shipped (better not to show cancel order option in this case).
For the first case, create a form handler to get the details for cancelling (order number, reason for cancelling etc.,). Validate the details and change the order status to cancelled (The assumption here is that the payment groups are not charged till this step). Also, if any promotions / loyalty points used to place this order, they have to be updated to reflect this cancellation.
Second case, as the order is with the fulfillment / shipping vendor, pass the order details for cancellation to their system. You need to handle any business logic in the integration layer.
These are not the only steps that need to be taken care of. You may have to take care of additional business rules as per your requirement.