[SOLVED]Add a list of lines on a order (next of shop cart)

Hi Bubble masters!

need an hand with my delivery application.

i want to add the same list of selected products to buy ( lines) on a shopping cart (list of lines) on a ORDER TYPE.

it turns out that the most obvious option I thought of (creating a field on TABLE ORDER also as LIST OF LINES) but didn’t work.

I tried someways to solve this and arrives on more two that would have an logical significate, but dont worked too

I separated some prints below to better illustrate the problem

Thank you so much for reading this far and I will be very grateful if you can help me.

regards,

Lucas




@lcristovam

Hi cmarchan, just to demystify , somenames were written in English just for create this topic, the system is in pt-BR.

Entao quizas este video de @renatoasse possa ser de ajuda:

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.
1 Like

The structure above is basically the same as mine, I need to check better, the question is that: I managed to solve it in another way :slight_smile:

in any case I thank you for your solution and I will write it down here in my favorites.

I would like to share my solution with you so that you can also add some knowledge.

on repeating group located on currentpage order, i do a search for lines where have any filters that shows only the order information products


image

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.