How to limit the total quantity of a shopping cart for a specific service catalog item in New York version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 07:17 AM
Hello SNow community,
I am looking to limit the total quantity of a shopping cart for a specific service catalog item only.
Requirements:
I would like a notification to appear, where it notifies the user that the cart is already full when they attempt to add another item.
For example, the maximum items you can have in the shopping cart is 5. So when they try to add a 6th item, it will notify them that the cart is full.
This will limit the amount so that the person processing one request with multiple ritms aren’t stuck doing 20 or 100 ritms in one request. We want to be able to spread out or delegate that workload.
Is there a way to do this to a specific service catalog item only in the New York version?
I appreciate any advice that can be provided.
Thank you!
Harriet
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 08:08 AM
Try adding a client script and script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 10:18 AM
Thanks! I will try this out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 02:29 PM
Hi
I'm getting this error:
onSubmit script error: ReferenceError: cartLimit is not defined:
function () { [native code] }
The Client callable is enabled in the script include so I don't know why the client script is not able to recognize the script include. How do you fix this error?
Thanks!
Harriet