- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 10:44 AM
Hello,
In the Checking - Out Shopping Cart of SERVICE PORTAL , only the User's Name comes by default in Requested For field , so it's confusing if we have 2 - 3 users of same name. Also, we cannot browse like in standard service catalog to check user's details or hover on i icon to know the same in SERVICE PORTAL.
Is there ANY way in which we can add User ID / User Email there for proper identification ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 12:09 PM
We had the same scenario and to fix this you need to do this
Note: the OOTB widget has a bug unfortunately that doesn't allow you to simply create a new template, I tried. I'll put in a ticket for this since it probably effects more people. The overall issue is that the widget expects the option carttemplate but the widget option is cartTemplate. This appears to be case sensitive, so you can't just create a new template and i don't want to edit the OOTB widgets in case we need to revert some time.
Clone the widget and fix a bug
- Clone the SC Shopping Cart widget to My SC Shopping Cart
- Click the hamburger menu (the 3 horizontal lines in the top right)
- Click Edit option schema
- Change Name
- From: cartTemplate
- To: carttemplate
Copy the template
- Go to the Widget list in the platform (not the widget editor)
- Open the SC Shopping Cart widget (not the cloned one)
- Scroll to the bottom to the Angular ng-templates tab
- Open large_shopping_cart.html
- Change these properties
- ID: my_large_shopping_cart.html
- Widget: My SC Shopping Cart
- Right click the header and choose Insert and Stay to copy this to your cloned widget.
Update the template
Inside the Template code of your now copied template, scroll down until you find this code
<label>${Requested For}</label>
<sn-record-picker field="c.requestedFor" table="'sys_user'" display-field="'name'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
Change the sn-record-picker to this to show the name and their user name.
<sn-record-picker field="c.requestedFor" table="'sys_user'" display-field="'name'" display-fields="'user_name'" value-field="'sys_id'" search-fields="'name,user_name'" page-size="100" ></sn-record-picker>
In particular you can play with display-fields, this will show the values below the name in the list as you type. You can try to mess with the values, it will hold more than one options If I recall.
Update the cart page
- Open the Page designer
- Choose the Shopping Cart [sc_cart] page
- Delete the SC Shopping Cart widget
- Add your newly created My SC Shopping Cart widget
- Click the Pencil icon to edit the options
- Under Cart Template, enter my_large_shopping_cart.html
This will use your new shopping cart template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 03:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 03:35 PM
Below is template modified
<label>${Requested For}</label>
<sn-record-picker field="c.requestedFor" table="'sys_user'" display-field="'name'" display-fields="'user_name'" value-field="'sys_id'" search-fields="'name,user_name'" page-size="100" ></sn-record-picker>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 03:37 PM
Its Done, Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 04:47 PM
Sorry, just got back to a computer. Glad you got it working. Let me know if something is amiss

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2017 06:32 AM