We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Editing shopping card on ESC

SylwiaK
Tera Contributor

Hello Colleagues,

I was asked to add "Requested for" field on Shopping card. I manage only to find proper (I guess) script "servicecatalog_cart_template" and articles I found seem to be outdated, as non scripting admin I need some support.

 

SylwiaK_1-1783930465272.png

I would appreciate your help 🙂

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@SylwiaK 

when does this page come?

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

Thank you for responding in short notice. Here are steps to get view I presented.

 

1) I fulfilled catalog item

2) Pressed Add to Cart

3) Went to a Shopping Basket and view card

SylwiaK_0-1783934148443.png

 

@SylwiaK 

you will have to clone the OOTB widget, add logic in there, then add this new widget again on your portal page

Lot of technical debt, I will recommend not doing tihs and inform your customer about the implications

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Bhavya11
Kilo Patron

Hi @SylwiaK ,

 

You cannot get the name directly from the template. you need to 

1. Clone the SC Shopping cart widget 

2. in cloned widget's server script , update the cart item logic to use getDisplayValue() for Requested for 

3. Update the angular template (large_shopping_cart_v2.html) to add the new column reference it. 

If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK