DigitalEnigma Posted March 18, 2010 Share Posted March 18, 2010 Hi, I have been trying to add some code that replaces the text entry for the expiry year on cards with a drop down for the client to select from. When I add the code the creditcard.php page fails to load, with error display enabled I get the following error: Fatal error: Smarty error: [in /home/********/public_html/development/templates/portal/creditcard.tpl line 113]: syntax error: unrecognized tag 'html_options' (Smarty_Compiler.class.php, line 590) in /home/********/public_html/development/includes/smarty/Smarty.class.php on line 1093 Any one any idea why smarty is not liking the html_option tag? 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted March 18, 2010 Share Posted March 18, 2010 It would be handy if you post the code. 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted March 18, 2010 Author Share Posted March 18, 2010 Hi, As a test I removed my code and put in code from the smarty manual, results in the same error. The code from there I had entered in the template was as follows:- {php} $smarty->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown') ); $smarty->assign('mySelect', 9904); {/php} {html_options name=foo options=$myOptions selected=$mySelect} 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted March 18, 2010 Share Posted March 18, 2010 I see that the function.html_options.php file isn't included in the default WHMCS installation. You can just get it from the original Smarty package and place it in the /includes/smarty/plugins/ folder. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted March 18, 2010 Share Posted March 18, 2010 (edited) look closer at the error unrecognized tag 'html_options' check in the includes/smarty/plugins directory for function.html_options.phpIt's attached here if its missing (rename it by removing the .txt) also change $smarty to $this or add global $smarty; just under the {php} EDIT: Looks like I took too long to post function.html_options.php.txt Edited March 18, 2010 by sparky 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted March 18, 2010 Author Share Posted March 18, 2010 Hi, Thanks guys, I'll give this a try later this evening. 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted March 19, 2010 Author Share Posted March 19, 2010 Hi, All working great now, thanks guys. 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.