Adding things to an order summary


My app is a marketplace where suppliers list products.

One of the things they can list with each product is accessories linked specifically to that product.

These items are from the Product database - the supplier is allowed to add up to 9 of them and are in the database as follows (all the way down to 9):

When the customer checks out they have the option to select as many or as few of them as they like and these show up fine at checkout and the price flows through to Stripe:

So far so good.

However, I then have an Order data type which saves this purchase as an order:

When the customer checks out this order is saved - but the problem I have is that it is only saving the main product and not adding the accessories which have also been purchased:

Here is the Create Order workflow:

Any ideas how I can have the selected accessories added to the Order?

Also, I’d like the email at the end of the workflow to confirm which accessories have been purchased and for how much, but as you’ll see from the screenshot below, I think the issue here is the same as the one above:

Any help would be greatly appreciated!!

Thanks in advance!

A little bump!

Accessories are just Products right? So why limit the number of accessories, and why make 9 separate fields? Instead, have a list type field on Product named “Accessory List” that is of type Product. Now, just push (:plus item) any Product you want as an Accessory to that list on any given Product.

There is a main product which has accessories associated with it - is that different to what you’re saying.

For example, the main product would be a car but then you can but separate accessories for it such as alloys etc which would form part of the overall order