I'm trying to create a basic cart system using symfony2
I have the following Entities:
Product
Cart
CartItem
I can create the cart and add the products as cartItems, but I'm a little unsure of how to display them in terms of the actual cart, i.e. a Cart, with the CartItems in terms of a form.
Am I right in thinking I'd need to embed them into the CartType form?
It seems a form collection is the correct solution for your need You can follow this doc: http://symfony.com/doc/current/cookbook/form/form_collections.html