How to change in Service Catalog: Cart Item Quantity as Integer instead of select box choices

swapnil57
Mega Contributor

Hi All,

I'm looking for a way to change the item 'quantity' selection in shopping cart (at least in the cart widget when viewing items) so that it's not a drop-down but free-form / integer input type. also based on same integer value given, 'Subtotal' should be calculated.

The objective here is to be able to order high number of items that'd be specific one, so adding more down-down option is not the optimal way.

Please refer the below screenshot

find_real_file.png

Please suggest the convenient way to change the same.

12 REPLIES 12

Midhun1
Giga Guru

Hi Swapnil,



You i think we have an option called no quantity try to disable quantity if you want to hide it.


Hi Midhun,



But that doesnt fulfill my purpose..I don't want it to hide.. Its just I need to change the dropdown choice to text box where user can write the quantity in integer and as per the quantity subtotal should be calculated..


Niclas
Giga Guru

Are there any updates on this? Can't really believe that there is nothing oob for such a basic functionality.


If the Service Portal is being used to render the catalog item ~30 lines down in the "SC Catalog Item", there is a select input type that would need to be swapped out for an input field that would allow you to enter a numerical value of your choice.   You would first need to clone this widget in order to modify it and then replace the existing one on the portal page record.



                              <select ng-if="c.showQuantitySelector()"


                                              ng-disabled="submitted"


                                              class="form-control quantity-selector"


                                              ng-model="c.quantity"


                                              aria-label="${Quantity}"


                                              ng-options="num for num in [1,2,3,4,5,6,7,8,9,10]">


                              </select>



Regards,


Nate Aiken