LordV Posted December 31, 2008 Share Posted December 31, 2008 Hi, I'm doing a template for a friend running WHMCS and have never worked with it or Smarty before. Basically I need to be able to get the subvariable name from {$product} (so {$product.name} from the product page). From here i will be putting the value through my own PHP script, but i need to know how to allow the use of the {$product.name} variable within a {PHP} block. 0 Quote Link to comment Share on other sites More sharing options...
Bounce Posted January 3, 2009 Share Posted January 3, 2009 {literal}{$product.name}{/literal} 0 Quote Link to comment Share on other sites More sharing options...
rmccny Posted January 4, 2009 Share Posted January 4, 2009 While this is the long way, it will work. {php} global $smarty; ... $product = $smarty->get_template_vars('product'); echo $product['name']; {/php} 0 Quote Link to comment Share on other sites More sharing options...
LordV Posted January 4, 2009 Author Share Posted January 4, 2009 While this is the long way, it will work. {php} global $smarty; ... $product = $smarty->get_template_vars('product'); echo $product['name']; {/php} Thanks i might have to try this. The other option i guess would be to use all smarty commands, but this would put me more in home field. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.