I am creating a food delivery app. I have added a quantity attribute to Food Entity to mention how many foods should be ordered. I have added to buttons to increase or decrease the value of the quantity attribute.
When I click on Order it is not storing the latest value of the Quantity Attribute. It dispalys the default value 1.
So can anyone help me with the client action flow to store and display the latest value of the attribute.
Thankyou!
Hi @Dinesh Kumar ,
I think in this case if you can share your .oml, it will be easier for community to help you.
Regards,
Khuong
Thankyou for replying quickly. Here it is...
Hi Dinesh,
I think for this you have to maintain a list to hold the values.
Like there is a list of 5 items added by customer in the cart. Now in this list there will be a variable to hold the value of quantity. Quantity input will be bind with the variable. Now when user change value it will be updated in that variable for that position.
regards
So, I need to create a different entity for Cart and add the quantity attribute over there. It will display the value.
But I need to make the attribute to return to its default value 1 after the particular order is completed. Do you have any idea for that?
I understand your doubt first you can assing the local variable in current id
I attached the oml file it will help you