title: cookies in smarty tpl(probably syntax errors)
body: <p>I got this code:</p>
  
  <pre><code>...
  
  {assign var="name" value="some_value"}
  
  {if $smarty.cookies.$name eq 'joc' }
  
      {assign var="test" value="`$product.total - 20`"}
      {assign var="test2" value="`$product.total_wt - 20`"}
      {assign var="var2" value="$smarty.cookies.$name"}
  
  {else}
  
      {assign var="test" value="`$product.total`"}
      {assign var="test2" value="`$product.total_wt`"}
  {/if}
  
  ...
  </code></pre>
  
  <p>Please help me to fix all errors and make this code to work. 
  I'm newbie with smarty syntax.
   var2 is empty, the "if" condition always return false </p>