Add order line to order

Hi community,  I’m newbie in Mendix. I have domain model as below image. I have a page show all products with button “add to cart” next to each product. When user click to the button, I create an object order line and when user check out their order line, they click to the button “Shopping cart” and create an order object (open page edit order). In this page that show all selected items and I want to add all these items into the order. How can add list all selected order line to the order by microflow? 
1 answers

There are several ways to do this.

I would suggest creating the order object the first time a user selects the ‘add to cart’ button.
So the first time you create an order object and an orderline object and put the orderline object in the assocation Orderline_order. 
Then if a users adds another product to the cart just create a new orderline object and set the association to the existing order.

Then if the user goes to the ‘shopping cart’ you can show all orderlines over the assocation orderline_order. You can also retrieve this list in a microflow and process it every way you want.