oriepl Posted March 19, 2011 Share Posted March 19, 2011 Hello,i have updated to 1.4 and have some customized PHP Code in some of my Theme Template Files - now in 1.4. in wont read this very simple PHP Code, and runs the page into even not displaying the site.f.e. this code below was correct before, now it even does not show the products page?!?!what is wrong with this??? what has change at smarty???anyone can help. > <!-- product's features --> </pre> <table cellpadding="0" cellspacing="0" width="100%"> {php} $name = $this->get_template_vars('NAME'); $value = $this->get_template_vars('VALUE'); $newprice = $this->get_template_vars('NEWPRICE'); echo ""; {/php} {php} if ($name == "qualitat") echo "Qualität: $value"; elseif ($name == "flugeigenschaften") echo "Flugeigenschaften: $value"; elseif ($name == "distance") echo "Weite: $value"; elseif ($name == "handicap") echo "Handicap: $value"; elseif ($name == "spin") echo "Spinrate: $value"; elseif ($name == "neupreis") { echo "Ersparnis zum Neupreis: "; $ersparnis = (($newprice * 100) / $value)-100; $ersparnis = $ersparnis * -1; echo ceil($ersparnis)." %"; } {/php} </table> <br><br> {/if Link to comment Share on other sites More sharing options...
Z115 Posted April 24, 2011 Share Posted April 24, 2011 Any Helps? Thanks Link to comment Share on other sites More sharing options...
Timothy Jarman Posted April 24, 2011 Share Posted April 24, 2011 im not tech man, so so sorry if this comment is stupid.I swear i remember reading somewhere (i maybe completely wrong so dont count me on it.) that before you update any files like tpl's etc you must turn 'Force Compile' to YES and 'Cache' to NO (Preferences tab then performance)Then when finished editing, turn it back.Sorry if this does not help. Link to comment Share on other sites More sharing options...
vanillafrog Posted May 12, 2011 Share Posted May 12, 2011 I need help on this too. The page breaks at the point I put {php} {/php} Link to comment Share on other sites More sharing options...
danmikkelsen Posted May 14, 2011 Share Posted May 14, 2011 Security settings is the issue find in you shop folder:tools -> smarty -> smarty.class.phpAnd:tools -> smarty -> sysplugins ->smarty_security.phpIn these two files there is a setting called:$allow_php_tags = falseThis should just be changed to:$allow_php_tags = trueAnd eveything should be flying Link to comment Share on other sites More sharing options...
vanillafrog Posted May 15, 2011 Share Posted May 15, 2011 Yay thank you!! It works!!For others who are CTRL+F-ing, I would like to point out it should be $allow_php_tag without the 's'. Thank you again!! Link to comment Share on other sites More sharing options...
danmikkelsen Posted May 15, 2011 Share Posted May 15, 2011 My bad.. It was in the middle of the night when i wrote this Yes it should be:$allow_php_tag = true ; :-) Link to comment Share on other sites More sharing options...
Recommended Posts