- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2024 04:14 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2024 08:57 AM
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.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2024 05:58 AM
You need to use an onSubmit client script in both catalog items to check if the other one is already in the cart.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2024 06:04 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2024 08:57 AM
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.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2024 03:33 AM
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.