Usage Scenario: Adding to Cart from Product Card

When the ‘Add to Cart’ button in a product list is clicked, the relevant product information should be added to the default cart.

Configuration Steps:

  1. Go to the product list or detail screen.
  2. Display product information via a form or data binding.
  3. Place an ‘Add to Cart’ button on each product card.
  4. Add the following action to this button:
    • ADD ACTION → OnClick → Bag → Add to Bag
  5. Link the parameters as follows:
    • Bag Key: ‘default’ (or dynamic, such as currentUser.id + ‘_bag’)
    • Bag Item:
{‘id’: product.id,‘name’: product.name,“price”: product.price,‘quantity’: 1}