portal settings

venkat venky
Tera Contributor

i try to hide the fields in catalog items of portal settings like hide "add to cart", hide quantity, hide delivery time etc but  they are not hidden , still visible in out put. In my condition i am raising request here.

10 REPLIES 10

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @venkat venky 

 

Try cache.do and then logout and login back. also create e new request.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@venkat venky 

those are portal settings and will get applied on portal only and not in self service/native view.

AnkurBawiskar_1-1741694056224.png

 

Refer below image

AnkurBawiskar_0-1741693805491.png

 

To hide those you need to write onLoad catalog client script which applies to Desktop

Refer this link where I shared solution and enhance it. I made the "Delivery time, Add to Cart hidden" using DOM, you please enhance it further

How to add submit button in catalog item internally 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@venkat venky 

this worked for me in native view

Ensure Isolate Script = False to allow DOM manipulation

Note: DOM manipulation is not recommended

AnkurBawiskar_3-1741694521419.png

AnkurBawiskar_4-1741694548735.png

 

function onLoad() {
		gel('sc_cart_item_list').style.display = 'none';
        //Type appropriate comment here, and begin script below
        gel('quantity_span').style.display = 'none';
        gel('oi_add_to_cart_button').style.display = 'none';
        gel('sc_delivery_time_label_cell').style.display = 'none';
        gel('sc_delivery_time_cell').style.display = 'none';
        gel('sc_attachment_button').style.display = 'none';
        gel("quantity_label_span").style.display = 'none';
}

Output:

AnkurBawiskar_2-1741694499792.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@venkat venky 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader