How can I hide and print a field in my tpl.php? I'm using kickstart 2. I have product variation types and a content type for each product. field_desc under the content type manage fields, I have managed to hide and print render successfully in my node--product--type.tpl.php. 

However, I have another field called field_spec which is a variation type field rather than a content type field. when I use the following codes in my tpl.php to hide and print the field_spec, this field is not hidden or printed where I want.

I use the following codes to hide and print both field_spec and field_desc however field_spec isn't hiding whereas field_desc is:

  &lt;?php
    hide($content['field_desc']);
  ?&gt;

 &lt;?php
 print render($content['field_desc']);
 ?&gt;


I have checked that field_spec is spelled correctly, I have cleared caches etc. however I cannot hide and print field_spec.

Is this something to do with the fact field_desc is a content type field whereas field_spec is a variation type field?

Thank you
I think you need to use $content['product:field_NAME'] for this

See this answer for more info: Print out a Drupal Commerce field only if it has a value