Defining the Action in UI Design
- Log in to the Kuika platform.
- Select your project from the Apps screen.
- Go to the UI Design module.
- Open the screen where you want to display the cart contents.
- For example: ‘My Cart’, ‘Favourite Products’ or ‘Previous Selections’ screen.
- Add the Table element from the Elements panel on the left side.
- To ensure that the data is retrieved when the screen loads, add the
- + ADD ACTION → appropriate trigger (Initial Actions, OnClick, etc.) → Bag → Get From Bag action from the Properties panel of the screen.
Configure Action Parameters
- Bag Key (Required): The value that identifies the cart. This parameter is entered as a constant. Examples:
- ‘default’ (default cart)
- ‘wishlist’ (favourites cart)
- “user_” + currentUser.id + ‘_cart’ (user-specific cart)
Connect the Data to the Table Element
- Display the products to the user by binding the action's output to the Items or Data property of the listing component.
- For example: TableView.Items → Action Result > Get From Bag
With this structure, the user can automatically see the products in the relevant cart when the screen loads.