Clear Bag

Clear Bag

The Clear Bag action is the basic action used to completely clear the contents of a bag defined on the Kuika platform. It quickly removes all items added to the bag by users, allowing them to start with a clean slate. It is frequently used to enhance user experience in e-commerce, reservation, or selection-based applications.

Technical Features

  • Cart Clearing: All items in the cart are permanently deleted.
  • Parameterless: The Clear Bag action does not take any parameters.
  • Default Cart: Performs the action on the active cart associated with the session.
  • Web and Mobile Compatibility: Works seamlessly on both web and mobile applications.
Clear Bag Action Application Steps
  1. Select your project from the Apps screen.
  2. Go to the UI Design module.
  3. Open the screen where you want to clear the basket.
  4. Place a button such as ‘Clear Basket’ or ‘Delete All’.
  1. Select the button, add the:
  • + ADD ACTION → appropriate trigger (Initial Actions, OnClick, etc.) → Bag → Clear Bag action from the Properties panel.

The Clear Bag action does not take any parameters and works directly.

Use Case: Clearing the Cart in an E-Commerce Application

On an e-commerce platform, when a user accidentally adds many products or wants to reset their selection, they click the ‘Clear Cart’ button. The Clear Bag action completely empties the active cart. To inform the user that the operation was successful, the Notify action can be used to display the message ‘Your cart has been cleared.’

Configuration Steps:

  • Add a ‘Clear Cart’ button to the screen where products are listed or appear in the cart.
  • Add the following action to the button:
  • + ADD ACTION → OnClick → Bag → Clear Bag
  • Optionally, feedback can be provided with the Notify action on the same button or after the Clear Bag action.

This allows the user to remove all products from the cart with a single click and enjoy a clean shopping experience.

Clear Bag Action Advanced Customisations
  • Confirmation Dialogue Integration: To prevent the user from accidentally clearing the cart, a confirmation modal or pop-up window can be displayed before the Clear Bag action is triggered. The action is then carried out after the user responds to the ‘Are you sure?’ question.
  • Multiple Bag Management: If your application uses multiple bags (e.g., favourites, temporary cart, order list, etc.), the Clear Bag action can be adapted to different scenarios. By creating separate Clear Bag actions for each bag, only the targeted bag is cleared.
  • Conditional Clearing: It may be possible to clear the basket based on certain conditions. For example, the Clear Bag action can be automatically triggered if the total basket amount is zero or if the order has not been completed within a certain period of time.
  • Notification and Logging: After the Clear Bag action is completed, the message ‘Your basket has been cleared’ can be displayed to the user with the Notify action. In addition, transaction logging can be performed for system administrators so that they can track which user cleared their basket and when.

Technical Risks and Precautions

  • Confirmation Dialogue: A confirmation window can be used before the button to prevent accidental deletion.
  • Irreversible Transaction: Basket data cannot be recovered after Clear Bag is applied.
  • Multiple Bag Management: If multiple bags are in use, ensure that the correct bag is being operated on.

The Clear Bag action is an effective tool that simplifies cart management and optimises the user experience on the Kuika platform. By quickly clearing the cart contents, it ensures a smooth shopping process in your application.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar