Using a 'quantity' variable on items - needing this value to be in the cart

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2011 06:39 AM
I am using a variable called 'quantity' on all of my catalog items. I would like this value to be used from the point of "add to cart" or "order now" being clicked when an item is being ordered. I have successfully created a catalog client script to update the final value, but I would like the user to always see the value they have entered. At this point, the new value is not seen until "Submit Order" is clicked on the cart page and I get to the order status page. I can't help to think that I'm not the only one with this issue since the OOB quantity only goes to 5.
Thanks for any help.
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2011 08:46 AM
Jason,
I would try to use the quantity for this, rather than a separate variable, there are two things you could do here:
- The Easy Way: If you want to allow the user to select more than 5 in the quantity field, add additional choice values to
sc_cart_item.quantity - The Not So Easy Way: If you need to allow for extremely large quantities, the select box is probably not the best option, you can use a custom cart to capture the quantity using a text input instead. This will need to be built out in Jelly.
Let me know if you need to use the second option, I'll see if I can put something together to get you started.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2011 08:55 AM
Thank you! The large quantities are my issue. We have a print department, and they need quantities up to whatever - I've seen up to 10k on one order. This is the main reason why we decided to use a custom quantity field, but we didn't realize at the time that the end users were seeing the quantity from the select box (usually 1 since they weren't even using it). We just introduced ESS last month, so the quantities not matching is now becoming an issue because people are not positive that they entered the correct quantity when they see '1'.
Thank you very much for the help.
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2011 12:54 PM
I've attached an Update Set containing two new UI Macros:
- The complete cart, including both the top pricing section and the bottom section with the buttons (Based on
u_catalog_cart_text_field_quantity
).
catalog_cart_default
- The top section of the cart, containing the price, quantity, subtotal and estimated delivery time (Based on
u_sc_cart_main_text_field_quantity
)
sc_cart_main
You can use the new Cart (once the Update Set has been applied) by selecting
in the Cart field of the relevant Catalog Item/s. You can rename this to whatever you like, however it's considered good practice to leave the
u_catalog_cart_text_field_quantity
prefix on the name to prevent collisions with UI Macros provided by ServiceNow development.
u_
Please Note: The UI Macros are provided as is, by loading them into your instance, you are taking on the responsibility of maintaining them in the event that they affected by future System Upgrades.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2011 01:32 PM
Unless I'm missing something, This gets me the same result. I've attached screenshots to better explain what I see/need. "Quantity Ordered" pic is my input into the variable. "Cart Quantity" is what I see as the quantity before checking out, and "Order Status Quantity" is what I see when checking out. I need the cart quantity to be what I input into the variable, or (if possible) the old quantity field is a text field that I can type into. Also, my math is not correct on the Order Status" pic. I ordered 50 at .04 each. Hopefully these pics explain better.
Thanks again for the help on this.
Jason