Hello Mathijs.
You can find multiple examples of Order / Orderline constructions on the forum. (and on many other sites as well. since it's one of the key examples to learn object oriented programming
This question that i answered some time ago might help you out with the domain model and how to add an article to an ‘order’ which could be your ‘shopping cart’.
https://forum.mendix.com/link/questions/96750