Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need order guide help removing price, quantity..

Gemma4
Mega Sage

Hello everyone, Can I get some help in removing price, quantity and reoccuring (each). I have tried removing options under Maintain Cart Layout > Order Status screen, but they are still visible. I would even be ok with removing the summary page. I've attempted to clone the widge ctrl -right click page-widget in editor Cloned scorder guide with new name I reviewed the html but there is so much I'm not sure what to comment out. For example "price" is located 111 times. If there are no options other than cloning, can I get help with the code to comment out? Also after I comment it out, how do I apply the new cloned widget as the default for everyone? thanks so much for all the help!!

4 ACCEPTED SOLUTIONS

Aman Kumar S
Kilo Patron

Hi @Gemma4 

You can follow below support article:

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>

 

Best Regards
Aman Kumar

View solution in original post

Hi @Gemma4,

 

You need to replace the cloned widgets via widget instance options.

Control + Right click on widgets and select "Instance in Page Editor" option and

 

Screenshot 2023-07-27 at 9.46.03 PM.png

 

Update the field Widget with cloned widget name and save it.

 

Screenshot 2023-07-27 at 9.48.25 PM.png

 

Refresh and verify the changes.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

Hi @Gemma4,

 

I would not recommend for this. Its order guide page and once you select the required options. then you can order it.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

The code you are changing is HTML.  You can not comment out HTML with //.

You will need to use <!-- comment --> to comment out a single line of HTML

View solution in original post

11 REPLIES 11

The code you are changing is HTML.  You can not comment out HTML with //.

You will need to use <!-- comment --> to comment out a single line of HTML

Thank you @Sagar Pagar Sorry for the confusion I got things worked out by adding <!-- before and --> after. Last question, instead of removing the text, is it possible to just remove the entire summary page and move "order now" to the choose options page? 

Thanks

 

Hi @Gemma4,

 

I would not recommend for this. Its order guide page and once you select the required options. then you can order it.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar

The world works with ServiceNow

Hi @Gemma4,

 

Have you look into it? Let me know if you stuck and need any help.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar

The world works with ServiceNow

Thank you for all the feedback! I got this working correct