Hi everyone, everything fine?
So, I’ve been in a situation for days and although I’ve been doing a lot of research I haven’t been able to find satisfactory answers that could clarify my ideas.
I need to create an order basket where the products have sub-items, like a pizza where the person marks the additional/side dishes.
Through this video lesson below I was able to create the cart itself and it works perfectly, but only when it’s one item at a time without having sub-items.
Video lesson link: AppGyver Tutorial: Developing Complete Food Delivery App with AppGyver and Firebase (Part 4). - YouTube
Basically, I need to create a list of orders where the orders have a list of add-ons/add-ons where each add-on selected by the App would have to adjust the final value of the product.
I would like to know if anyone has any material or tips on which I could base myself in order to be able to build this part?
Basically, what I need to do is this…
[
{
"id": 1,
"item_nome": "Açaí",
"item_preco_total": 10,
"item_qtde": 1,
"adicionais": [
{
"adicional_id": 11,
"adicional_nome": "Amendoim",
"adicional_preco": 2,
"produto_id": 1
},
{
"adicional_id": 12,
"adicional_nome": "Morango",
"adicional_preco": 3,
"produto_id": 1
}
]
},
{
"id": 2,
"item_nome": "Pizza",
"item_preco_total": 20,
"item_qtde": 2,
"adicionais": [
{
"adicional_id": 21,
"adicional_nome": "Queijo extra",
"adicional_preco": 5,
"produto_id": 2
},
{
"adicional_id": 22,
"adicional_nome": "Bacon",
"adicional_preco": 4,
"produto_id": 2
},
{
"adicional_id": 23,
"adicional_nome": "Azeitona",
"adicional_preco": 2,
"produto_id": 2
}
]
}
]
````Preformatted text`
If anyone can provide me with even some direction to go on as I'm totally at a loss for these lists with sublists issues.
I think one option would be to add checkboxes that appear based on the item(s) selected. Each checkbox could apply to a specific sub item. These values, when selected, would be a specific page or app variable. Then when the user clicks submit all of this is sent in an api call or however you prefer.
Here is a video I made on checkboxes if it helps:
Surface Level, I’ll check your suggestion, thanks a lot.
Hello community!
I want to let you know that I managed to solve my problem.
It took a bit of work because I’m new to AppGyver and don’t know the tool very well, but luckily I managed to do it.
The solution (at least for me) is a bit complex to explain, so I’ll take the time next weekend and be posting a step by step of the way I did it so that others who are going through this same problem can be aware of it. basing, if you so wish.