Check Portal Cart before check out with OnSubmit client script

aneta_koleva
Tera Expert

I am having the following requirement: to have a portal with attached service catalog. I need to do prevalidate on the cart to check if the current user is having enough amount of money for the ordered cart total price.

I was planning to create an onSubmit client script for the sc_cart using GlideAjax in order to check the cart items and their price.

But it wasn't working.

I have read that client scripts are not working with portals and indeed I have added an onLoad client script on sc_cart table but nothing is happening on the portal but only on the table itself in a particular record: 

aneta_koleva_0-1679467141343.png

Portal: 

aneta_koleva_1-1679467201710.png

what can be done in my case? any ideas are welcome.

1 ACCEPTED SOLUTION

aneta_koleva
Tera Expert

I have cloned the Shopping cart page's widget 'SC Shopping cart' (sc-shopping-cart-v2)

and done the behavior there.

View solution in original post

5 REPLIES 5

Honestly I have no idea, you need to try. But I have the feeling that where you want to use it is not the same kind of element/component and may not be useful.

aneta_koleva_0-1683869403081.png

This Cart field is referencing the UI Macros.