Pop up message before checkout for cat items

sachins1
Tera Contributor

Hi All,

I have an issue where i need to display message before checkout for catalog items. I need to check if user is trying to submit two different kind of items i.e. Onboarding and offboarding together

1 ACCEPTED SOLUTION

Shopping cart is stored in [sc_cart] table with Name = DEFAULT and User = reference to the user record. Individual items placed in the shopping cart are in the related list that is based on [sc_cart_item] table. That's the table you need to query. In order to do it from a client script, you need to write your query as a function in a client-callable script include.

View solution in original post

4 REPLIES 4

Slava Savitsky
Giga Sage

You need to use an onSubmit client script in both catalog items to check if the other one is already in the cart.

Hi Slava,

Thanks for your comment, i am already working with OnSubmit client script and i am able to pick the value from the variable and display message however i am not able to pick the catalog item count or item name in the cart.

Can you please help me with this, if possible?

Shopping cart is stored in [sc_cart] table with Name = DEFAULT and User = reference to the user record. Individual items placed in the shopping cart are in the related list that is based on [sc_cart_item] table. That's the table you need to query. In order to do it from a client script, you need to write your query as a function in a client-callable script include.

Thanks for the suggestion. I was able to do this by creating a script include(by querying sc_cart_item table) and calling it through client script.