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-10-2022 07:17 AM
@Saurav11 @Slava Savitsky I was able to bypass the Confirmation dialog, thank you! But this did involve quite a bit of work. Can you sanity check me on the following? Is all of this necessary??
WIDGET WORK
From Filter Navigator, under Service Portal Widgets - open the "SC Shopping Cart" widget and click "Clone Widget".
In the new Widget, add 2 new templates and copy the contents from the old templates
(...since there is apparently no way to reuse the old/existing templates...)
and in the Option schema section change the "default_value" to be the name of the newly created template.
PAGE WORK
Add item to shopping cart in Service Portal. Ctrl-Right-Click on cart and choose to edit the "Instance in Page Editor".
With the correct instance selected at the top of this page (the one that contains the "SC Shopping Cart")...
...change the Widget selection at the bottom of the screen to be my new widget...
and change the Additional options, JSON format section to point to the new template.
MORE WIDGET WORK
Make actual code changes in Client Controller field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 07:37 AM
Hello,
To me this looks good.
Point 1:- The widget needs to be cloned:- That is Done
Point 2:- Copy the templates:- That is Done
Point 3:- replace the widget on the Page:- That is Done
Point 4:- Edit the script(in your case remove the confirmation code):- That is Done.
You have checked all the boxes. Good job.
Please mark answer correct/helpful based on Impact.