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

So on Jakarta, it works the same as it does on the IT view?


RavindranKeshav
Giga Expert

I looked the the SC Catalog Item widget.



I think you need to delete the below strikedout part in the cloned widget to prevent it from getting disabled:


EDIT Sorry this is for the attachment.



Probably some change in the c.showAddCartBtn() or triggerAddToCart() method



<label ng-if="!submitted" style="float:right;font-weight:normal;cursor:pointer;"><sp-attachment-button></sp-attachment-button><span style="padding-left:4px;">${Add attachments}</span></label>


                              <button ng-if="::c.showOrderNowButton()" tabindex="0" name="submit" ng-disabled="submitted" ng-click="triggerOnSubmit()" class="btn btn-primary">{{submitButtonMsg}}</button>


                              <button tabindex="0" ng-if="c.showAddCartBtn()" name="submit" ng-disabled="submitted" ng-click="triggerAddToCart()" class="btn btn-default">${Add to Cart}</button>


       


Not totally sure (since this is from jakarta). Play with it on a Dev instance and let us know


Hi Ravindran,



I will play with this in our dev instance and let you know. Appreciate your help!


Yes.. Atleast one the Dev ones we use (which are upgraded from helsinki). I will recheck my presonal Dev instance to be sure.


Yes confirmed. Tried some sample catalog items


find_real_file.png