Add Quantity to an Order guide

mallikabhupathi
Tera Expert

All,

 

I have an order guide but it does not display the Quantity field on the form. How can this be achieved?

 

Thanks,

Mallika

4 REPLIES 4

Paul Curwen
Giga Sage

Have you set the quantity attribute to 'true' on the cart layout?

 

Go to Catalog Definitions > Maintain Cart Layouts

 

Select 'Item Ordering Widget (Order Guide)' under Browser Widgets

 

 

111111.PNG

 

Open the record and set Quantity to true (It is False OOTB) 

 

 

222222.PNG

 

If helpful please mark as Helpful\Correct

 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

Hi @Paul Curwen ,

 

Thanks for the step-by-step analysis. 

 

However, there's one issue that I am running into. 

mallikabhupathi_0-1686330805574.png

 

I cannot edit the quantity of any device that I am ordering. It shows default of 1.

 

How can this be edited or achieved to add a different number.

 

Thanks,

Mallika

 



Have a look at this article, this may be your issue, OOTB the quantity of items defaults to the Order Guide Rule base and cannot be amended by the user: 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0659210

 

This post documents a customization workaround: 

 

https://www.servicenow.com/community/itsm-articles/sc-order-guide-widget-with-quantity-customization...

 

Interestingly the Rule Guide documentation states the Quantity can be altered: 

 

QuantityOption to select the default quantity of a catalog item for the order guide. When quantity is shown, this value can be modified during checkout.

 

 

https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/service-catalog-management/...

 

If helpful please mark as Helpful\Correct

 

 

 

 

 

 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

Riya Verma
Kilo Sage
Kilo Sage

Hi @mallikabhupathi ,

 

Hope you are doing great.

 

  1. Navigate to the "Order Guides", and open order guide you want to add quantity.
  2. On the order guide form, click on the "Form Design" tab, which allows you to customize the form layout and fields. Search for Quantity field to add in order guide.
  3. If the "Quantity" field is not present in the form, you need to add it. To add the field, you can use below code:

 

// Add the Quantity field to the form
var quantityField = g_form.addDecoration({
  name: 'quantity',
  type: 'field',
  tableName: 'sc_cart_item', // or the appropriate table name for your order guide
  mandatory: false, // adjust this as per your requirements
  label: 'Quantity'
});
​

 

  • After adding the code snippet, save the changes and close the form designer.
  • Now, when you navigate back to the order guide form, you should see the Quantity field displayed on the form.
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma