How do I calculate the total quantity of the products in my cart

Hi team, I am creating a food ordering app. I have created the add food item functionality and once the customer add a food item, the items gets stored in orderLine entity. Now I want a functionality for suppose a customer adds the pizza twice so the total quantity should show as 2 in a single line beside pizza. I have also attached the ss of my domain model and pages and how its currently working for me.   Domain model ss:   Add product in my cart microlfow: Above microfow triggers when click on add to cart button:      
1 answers