How to customize Cart button

Le Son
Tera Contributor

I want change cart button. When I click cart button, It will be link to anorther page, not display model

LeSon_0-1707118716395.png

 

1 REPLY 1

shloke04
Kilo Patron

Hi @Le Son ,

Cart option on the Header is controlled via OOTB widget named "Header Menu". Link below for the widget:

https://instance.service-now.com/sp_config?id=widget_editor&sys_id=5ef595c1cb12020000f8d856634c9c6e 

 

Replace "instance" with instance name.

You would have to refer code block from line number 54 to 67 which controls this behavior on click of what should happen.

shloke04_0-1707120826355.png

 

Note: This widget is by default not editable and is read only. In order to make changes to this widget you would have to clone this widget using the link below:

https://instance.service-now.com/nav_to.do?uri=sp_widget.do?sys_id=5ef595c1cb12020000f8d856634c9c6e 

 

Now once your changes are made you would have to add it to the SP Header Menu record as well for the changes to be made effective.

https://instance.service-now.com/nav_to.do?uri=sp_instance_menu.do?sys_id=d150fd31cb10020000f8d85663... 

 

Now, this SP Header menu record you will get it from your portal record, attached screenshot below:

shloke04_1-1707121184195.png

 

shloke04_2-1707121203128.png

 

  

Note: This would be a customization, would recommend to have a thorough thought if this customization is actually required or not, as you would have to maintain it moving forward and will be skipped during future upgrades.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke