This is a nice video, so much that some things I took from him. My structure is a little different from his.
It has a current page that shows the status of the order, but it does not show the details of the products purchased on this page, perhaps on the part of the administrator, which is not shown in the video.
the question is, how to insert a LIST OF LINES, that initially go to a TYPE CART (popup) and when the order is confirmed, throw these same LINES into a TYPE ORDER.
So when you open CURRENT PAGE ORDER, the list of LINES (products) can be seen
Order
Title (text)
Total dollar amount (number)
Line items (list of line items)
Product
Name (text)
Price (number)
Line item
Product (product)
Quantity (number)
Order (order)
Dollar amount (number)
Create an order
Create the line items assigning product and order
Add each line item as it is created to the order’s list of line items
In the rg of line items (let’s call it rg A) the user inserts the quantity in an input of type number and a flow (trigger when input value changes) calculates the line item amount
Below the rg in a group’s of type number populate its data source with an expression “rg A’s list of line items amount :sum” and use this group to load the total amount to the order’s total amount field.
possibly this can cause performance problems when the system has a lot of users, but I saw in a video these days that Bubble allows the privacy feature, allowing that even if I have a ‘DO A SEARCH FOR’, the bubble sends only the that is from the user.