- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2014 02:49 AM
Hello Everyone,
I want to add some new value to the quantity field in Shopping cart of catalog item.
I tried using the sys_choice table to enter new values but this new values reflect for every catalog item present.
To increase or reduce the quantities that a customer can select for catalog items:
- Navigate to System Definition > Choice Lists.
- Filter the list for records with Table set to sc_cart_item and the Element set to quantity. The existing quantity choices appear.
Is there any way to restrict the new choices only to a particular catalog item ??
Regards,
Sachin
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2014 06:48 AM
Well at the end catalog client script helped.
Wrote a small onLoad script for the catalog item.
function onLoad() {
document.getElementById("quantity").innerHTML ='<option value="1" SELECTED="SELECTED">1</option><option value="4">4</option><option value="8">8</option><option value="12">12</option><option value="16">16</option><option value="20">20</option>';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2015 09:18 AM
Hi Sachin,
Thanks for your reply..
But for me It did not worked with the same script in IE8.
Finally It worked after changing the code like this
$('quantity').update('<option value="1" SELECTED="SELECTED">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option>');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 12:56 PM
The original thread was from 5 years ago. Was hoping someone has figured it out for the Service Portal world since NOW is using AngularJS. I hope some smart HTML/CSS/AngularJS guru can assist. It looks like we just need to modify the SC Catalog Item widget. And this is the line of code:
<select id="catItemQuantity"
ng-if="c.showQuantitySelector()"
ng-disabled="submitting || submitted"
class="m-b sn-select-basic"
ng-model="c.quantity"
aria-label="${Quantity}">
<option ng-repeat="num in data.choiceListQuantity" value={{::num.value}}>{{::num.label}}</option>
</select>
Any ideas on how to turn that code into a key in field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2019 11:04 AM
The quantity in cart comes from choices defined for quantity in sc_cart_item.
Thanks
Shouvik