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:
- Go to the product list or detail screen.
- Display product information via a form or data binding.
- Place an ‘Add to Cart’ button on each product card.
- Add the following action to this button:
- ADD ACTION → OnClick → Bag → Add to Bag
- 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}