Adding items to the shopping cart

The most straightforward implementation of a shopping cart involves the following steps:

  1. Create a "Product" page that showcases a product and has an "Add to cart" button

  2. Create a workflow on the "Add to cart" button that:

    • Creates a new "Cart Item"

    • Adds this "Cart Item" to the current user's shopping cart

      • I recommend putting on a conditional statement so that the workflow only runs when the current user is logged in

You can see an example of this in action in my demo app.

Example of Product Page

You'll then need to create a "Checkout" page where the current user's cart items are listed. (demo app example).

Example of Checkout Page

In the above example I'm using a Repeating Group with the Type of contet set to "Cart Item" and the Data source to "Current User's shopping cart" (which is itself a list of cart items).

Last updated