How to Remove the Shopping Cart Delete Item Confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 10:04 AM
In the Service Catalog Shopping Cart, if the user clicks the X button next to one of the items, a Popup Dialog magically appears. We would like to remove this confirmation step, and have the cart just go ahead and delete the item. Could someone with good Service Portal skills possibly show me how to go about doing that? Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 10:41 AM
Hello,
there is a widget named "SC Shopping Cart" which gives this message.
You will have to clone this widget and modify the server script to get rid of this confirmation step:-
Please mark answer correct/helpful based on Impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2022 02:20 PM
Thanks @Saurav11 , I did see that widget earlier. But what line of code is actually invoking the confirmation dialog? Line 2 in your screenshot is only setting a message variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2022 03:44 PM
The dialog is invoked either by confirm(dialogMsg) on line 215 or by spModal.confirm(dialogMsg) on line 227 inside the "c.removeItem" function defined in the "Client controller" script.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2022 10:53 PM
Hello,
Yes as mentioned by Slava the line 206 has a function named c.removeItem() which had the control of the dialog box.
Just make sure when you remove the dialog boxes you still need to have the code which triggers the removal of the items. So you just need to remove the dialog part only rest of the code is still needed.
Please mark answer correct/helpful based on Impact.