I've got a matrix of 12 products, which can be added to the cart by users after selecting different term reference fields, which then select the appropriate product. This is shown on a product display.
However, I'd like to have multiple add-to-cart forms, each with a different line item selected on the product display field.
Basically, I've got a field collection, and I'd like to iterate through each of the field collection entities and display an add to cart form, with my full 12-product matrix of options, for each of these field collection items.
It would seem that I could get the add to cart field, all formatted, using
field_default_view($entity_type, $entity, $field, $instance, $langcode, $items, $display)
But I am currently on the node.tpl.php file, and I can't quite work out which entity objects are which to pass to this function. Nothing really resembles what I'm seeing passed to
Am I thinking about this wrong? Is there a better way to accomplish this?