How to get field values from products in product display nodes?
I'd like to add some variables to some product display nodes to be used later in custom node templates. I'm currently doing this in hook_preprocess_node () **
The field values that are associated with the node displays are easy to get using something like:
<?php
$node_wrapper = entity_metadata_wrapper('node', $vars['node']);
$field_val = $node_wrapper->field_name->value();
?>
or
<?php
field_get_items('node', $vars['node'], 'field_name')
?>
However, I'm not sure how to go about getting values from fields in the referenced products (i.e. price, sku, etc).
Any pointers or sample code greatly appreciated!
** Not sure if this is the best approach. If anyone has a better way to do this, I'm interested!