Add Quantity to an Order guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 09:07 AM
All,
I have an order guide but it does not display the Quantity field on the form. How can this be achieved?
Thanks,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 09:21 AM
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
Open the record and set Quantity to true (It is False OOTB)
If helpful please mark as Helpful\Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 10:14 AM
Hi @Paul Curwen ,
Thanks for the step-by-step analysis.
However, there's one issue that I am running into.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2023 02:57 AM - edited 06-11-2023 03:07 AM
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:
Interestingly the Rule Guide documentation states the Quantity can be altered:
Quantity | Option to select the default quantity of a catalog item for the order guide. When quantity is shown, this value can be modified during checkout. |
If helpful please mark as Helpful\Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2023 06:47 AM
Hi @mallikabhupathi ,
Hope you are doing great.
- Navigate to the "Order Guides", and open order guide you want to add quantity.
- 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.
- 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.
Regards,
Riya Verma