Service Portal Add to Cart Issue

Blair5
Tera Guru

We are on Helsinki Patch 11 and have the cart showing on our service portal. When a user fills out the fields on a cat item and adds to cart, the ability to change some of those fields and add again isn't working. I saw a mention in another post - Add to Cart functionality for Service Portal - where you can disable this, but I don't see how. Any help? This featured is used pretty regularly by our users.

1 ACCEPTED SOLUTION

Hi Blair,



Now that we know it the same code and disabled in all.. I thought let me figure this   and found it



Some steps



  • Clone the sc catalog item widget (else it is read only)
  • Attache the cloned widget the the Service catalog page
  • Look for the ng-disabled="submitted" on the line containing Add to cart and DELETE the   ng-disabled="submitted"


find_real_file.png


  • You also need to make changes to the client script highlighted below (EDIT Updated code to fix submit greyed out after add)
  • find_real_file.png

I didnt test for other side effects but add to cart works and does not get disabled after adding


Let us know how it goes. breinhart


Mine...


find_real_file.png


View solution in original post

27 REPLIES 27

Hi Ravindran,



I've been able to test out your idea and the 'Add to cart' doesn't get disabled after adding the item to the cart however the form remains as read only -- the fields can't be filled out. So it's close!



EDIT: Nevermind, I missed adding a parameter of true to the one function. Once that was added, it looks like it works Great job! Thank you again!


Pease check the client code changes. It should work..



On Wed, Oct 11, 2017 at 7:25 AM breinhart <community-no-reply@servicenow.com>


Yes - it worked! Thank you. marked your answer as correct. Thanks again for all your help! This is a big issue resolved before even going to UAT.


Glad it worked ! Pls test it well for any gotchas



Sorry I'm still learning so took some back and forth ..


Hi Ravindran,



Found one issue - if a user chooses to submit the request instead of add to their cart, the form is disabled, the submit button is disabled, but the Add to Cart button is still enabled. How can I disable to Add to cart button if they choose to submit?