How to Remove the Shopping Cart Delete Item Confirmation

Geoffrey Bishop
Tera Contributor

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!!

 

1.png

 

6 REPLIES 6

Geoffrey Bishop
Tera Contributor

@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".

1.png

 

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.

5.png

 

PAGE WORK
Add item to shopping cart in Service Portal.  Ctrl-Right-Click on cart and choose to edit the "Instance in Page Editor".

2.png
With the correct instance selected at the top of this page (the one that contains the "SC Shopping Cart")...

3.png
...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.

4.png

 

MORE WIDGET WORK
Make actual code changes in Client Controller field.

6.png

 

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.