How to remove 'Price and Quantity' from my Active Items widget on ESC portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 10:15 PM - edited 09-16-2024 10:16 PM
Hello everyone,
I need some assistance with removing the price and quantity from the "My Item" widget . I tried a method I found in the community that involved removing some lines from the HTML of the order guide widget, but I’m having trouble understanding how to apply it to the "My Item" widget. Can someone please help me with this?
@ccepts , @Saurav11 , @Gemma4 , @Aman Kumar S , @SagarT , @John Johnson
Thanks in Advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 10:48 PM
Hi @Shashank_sj10
Below Article will help you :-
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718567
Description
The quantity, price, recurring fields and totals can be removed from view by modifying the order guide widget.
Procedure
For the body HTML template field you can remove the following HTML elements that display the unwanted fields.
Quantity, Price and Recurring headers in the summary:
<th class="wrapper-sm col-md-1 col-lg-1 text-a-c hidden-xs hidden-sm" scope="col">${Quantity}</th>
<th class="wrapper-sm col-md-2 col-lg-2 text-a-c hidden-xs hidden-sm" scope="col">${Total Price}</th>
<th class="wrapper-sm col-md-2 col-lg-2 text-a-c hidden-xs hidden-sm" scope="col">${Recurring}</th>
Quantity, Price and Recurring values in the summary:
<td class="wrapper-sm v-middle text-a-c hidden-xs hidden-sm">
<span>{{::(data.sys_properties.sc_layouts || !item.no_quantity? item.quantity : '---')}}</span>
</td>
<td class="wrapper-sm v-middle text-a-c hidden-xs hidden-sm">
<span><strong>{{::(data.showPrices && item.price_subtotal ? item.price_subtotal : '---')}}</strong></span>
</td>
<td class="wrapper-sm v-middle text-a-c hidden-xs hidden-sm">
<span class="clearfix"><strong>{{::(data.showPrices && item.recurring_price_subtotal ? item.recurring_price_subtotal : '---')}}</strong></span>
<span ng-if="::(data.showPrices && item.recurring_price_frequency)" style="font-size:10px">{{::item.recurring_price_frequency}}</span>
</td>
The Total price display:
<div class="pull-right m-r-lg m-l wrapper-sm" ng-if="data.showPrices" style="top: -10px;position: relative;">
<div class="pull-left"><strong>${Total} : </strong>
</div>
<div class="pull-left m-l-xs">
<div><strong> {{price_display}}</strong>
</div>
<div ng-repeat="freq in ::frequencySequence">
<span class="clearfix" ng-if="frequencyMap.hasOwnProperty(freq)" style="font-size:13px"> + {{(frequencyMap[freq] + ' ' + freq)}}</span>
</div>
</div>
</div>
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 12:18 AM
Hello @Ravi Gaurav,
Thank you for the quick response.
I made changes to the "OrderGuide" widget by cloning it, as we cannot modify the out-of-the-box (OOB) widget directly. Do I need to add the cloned widget somewhere, as the price and quantity are still visible on the portal?