Enable partial cancellation for Debit or Credit Direct sales

By default, inStore does not show the Cancel order in the Order placed page when the selected payment method is Debit Direct sale or Credit Direct sale. It only shows the Cancel total order button by default in these cases.

If you want to enable partial cancellation of orders — the ability to cancel individual packages — for these payment methods, you must edit the checkout-instore-custom.js file as described below. Check out the How to customize inStore guide for further information on how to access this file.

Prerequisites

To enable this functionality, make sure that you meet the following prerequisites:

Edit the checkout-instore-custom.js file

To enable partial cancellation for these payment methods, the payments object within window.INSTORE_CONFIG must contain the following property:

Property

Type

Description

partialCancellationEnabled

array

You should add payment conditions that will have partial cancellation enabled on inStore in this array

The indication of each payment condition is made by the payment condition ID. Check the section on Where to find the payment condition ID in the Define payment methods displayed on inStore guide for more details.

In the example code below, partial cancellation will be enabled for Debit Direct Sale (whose ID is 44) and Credit Direct Sale (whose ID is 45).

window.INSTORE_CONFIG = {
 payments: {
   partialCancellationEnabled: [
     '44', // Debit Direct Sale
     '45', // Credit Direct Sale
   ],
 }
}

Did this page help you?