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

@Gemma4 

Let me know if you need further help, if your issue is resolved feel free to mark correct and close the thread so it can help others looking for the same problem.

 

 

Best Regards
Aman Kumar

John Johnson
Kilo Sage

Directions to add your modified widget to the order guide...

 

 

Once you have cloned the widget and saved with a new name, you will need to set your new widget as the one being used in your order guide.

Filter Navigator>Service Catalog>Catalog Definitions>Order Guides

Choose the order guide and open it in a new tab/window.

From here, you can click on ‘Try It’ to verify this is the one you are working with.

Now, go to the Service Portal and select this order guide.  Once it is open, ‘right click’ in the header to the right of the ‘bread crumbs’ and you will see options;

JohnJohnson_0-1709733506850.png

 

From this menu, select ‘Instance in Page Editor’. You will then see the order guide hierarchy. 

JohnJohnson_1-1709733506853.png

 

If you click on ‘Service Catalog’, and scroll all the way to the bottom of the page, you will see the Widget being used. Simply select the ‘down arrow’ and select the SC Order Guide that you cloned with the new name.

Save. 

If you commented out the 3 sections correctly, there will be no information about pricing.