Add new field to Service Portal Shopping Cart Widget

Matthew Glenn
Kilo Sage

I'm trying to add a new check box field to the Istanbul Service Portal Shopping Cart, with the ultimate goal of the true/false value making its way to the Request, but, I'm stuck.

What I've done so far:

  • I've created the appropriate column on sc_request
  • I've modified the 'large_shopping_cart.html' Angular ng-template to get the appropriate field on the Portal page
  • I've modified the 'SC Shopping Cart' Widget Server Script and Client Controller so that everything is processed properly. I've logged what is being returned on submit, so I know we're working up until this point.

This is where things get a little fuzzy for me. From what I can tell, the 'SPCart' Script Include is called from the widget and all the appropriate data is sent on it's way.   But I don't know what to do from here?

Has anyone done something similar on the Portal Shopping Cart that can point me in the right direction?

1 ACCEPTED SOLUTION

I just completed adding a few fields to the Service Portal shopping cart. From what I can tell that is part of the backend process that we do not have access to. I ended up creating a new Script Includes with my logic and inherited the SPCart script.



One thing I was held up on, I have minimal knowledge of the shopping cart structure, you must add whatever fields you are wanting to both the sc_request and the sc_cart tables. Then I just used this article for the cartpop since I was adding more than one new field.



There may be an easier/new way to do it with the Service Portal but I haven't seen any documentation.


View solution in original post

37 REPLIES 37

Matthew Glenn
Kilo Sage

Anyone?



If not an answer to this, does anyone know where I can find some docs on GlideappCart.getCartForRhino(). This function in the SPCart Script Include is where I'm stuck.



Working OOB example of it's usage


Screen Shot 2017-03-24 at 11.21.28 AM.png


I just completed adding a few fields to the Service Portal shopping cart. From what I can tell that is part of the backend process that we do not have access to. I ended up creating a new Script Includes with my logic and inherited the SPCart script.



One thing I was held up on, I have minimal knowledge of the shopping cart structure, you must add whatever fields you are wanting to both the sc_request and the sc_cart tables. Then I just used this article for the cartpop since I was adding more than one new field.



There may be an easier/new way to do it with the Service Portal but I haven't seen any documentation.


I was so caught up with trying to figure out how the OOB Script Include functioned that I didn't even think of adding my own. Great idea!!



I actually reached out to HI regarding this and they confirmed there is no applicable documentation, but wouldn't confirm if it was something available to us as customers to fully modify 😕



I'll give your suggestion here a try!



Thanks!


HI



Could you please share the details what you have done to achieve this , i was not able to pass new value from cart to Request table:(



thanks for the support