What will be my function name in template.php for particular .tpl.php
You need to use theme_preprocess_node function in template to add variables..

/**
 * Override or insert variables into the node templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("node" in this case.)
 */

function YOURTHEME_preprocess_node(&amp;$variables, $hook) {


  // define $node object, so it's be easier to use it
  $node = $variables['node'];

  // add variables to node--nameofnodetype.tpl.php file
  if ($node-&gt;type == 'product'){

      // $variables: an array with variables
      // you need to add one, so just define it
      $variables['my_variable'] = 'whatever';


  }
}


In your node--product.tpl.php file:

// check if your new variable exist
print $my_variable;