This example uses the remove action to remove an option for a property. When you deploy this customization, the JSONPath query searches for the addToCartBehavior property’s enum array. This modification removes the showMiniCart option in the user interface.
Copy
{
"type": "object",
"modifications" : [
{
"target": "$.properties.addToCartBehavior.enum[?(@ == 'showMiniCart')]",
"action": "remove"
}
]
}
After deploying this modification, the code in the configurationManifest.json looks like this:
Copy
...
"properties": {
"addToCartBehavior": {
"group": "catalog",
"subtab": "cart",
"type": "string",
"title": "Add to cart behavior",
"description": "Choose the action that occurs when the user adds an item to the cart.",
"default": "showCartConfirmationModal",
"enum": [
"goToCart",
"showCartConfirmationModal"
],
"id": "addToCartBehavior"
},
...
After deploying this modification, the SuiteCommerce Configuration record looks like this:
