View Single Post
  #4  
Old 02-21-2011, 04:37 AM
 
spwestwood spwestwood is offline
 

Member
  
Join Date: Aug 2007
Posts: 17
 

Default Re: Smarty variable to {php}{/php} section

Thanks for all your help! With both your replies I managed to get it working.

What worked was:
Code:
{php}$variable=$this->_tpl_vars['products'][0]['extra_fields']['0']['value'];{/php}

Annoyingly it has to have a the cart id value [0], and ['product'] didn't work. I sorted it out by having a variable which I looped:

Code:
{php} $cartid=0; $variable=$this->_tpl_vars['products'][$cartid]['extra_fields']['0']['value']; $cartid=$cartid+1; {/php}

This is very ugly but it works. Thanks again.
__________________
spwestwood.
Version 4.1.9
Version 4.4
Reply With Quote