View Issue Details

IDProjectCategoryView StatusLast Update
0000760OXID eShop (all versions)2. ----- eShop backend (admin) -----public2009-04-15 10:28
ReporterSpritje Assigned To 
Status resolvedResolutionfixed 
Product Version4.0.1.0 revision 15990 
Fixed in Version4.1.1 revision 18442 
Summary0000760: PHP code ist not executed in the templates, but in the backend the option "Execute PHP Code" is set.
DescriptionIn the Backend if the setting is set to
Stammdaten -> Grundeinstellungen -> System -> Weitere Einstellungen -> Execute PHP Code (Wie soll man mit PHP-Code innerhalb von Smarty Templates umgehen)
the Code will not be executed.

In the details template i put the following PHP code on line one
<?php echo("Hallo Welt")?>
You can see the result in the attached jpg.
Additional InformationLooks like the option "How to handle PHP code embedded in Smarty templates" in Stammdaten -> Grundeinstellungen -> System -> Weitere Einstellungen not works at all.
No matter, what value is selected in this option, it always gives the same result in frontend:
echo("Hallo Welt")
TagsNo tags attached.
Attached Files
php_code.JPG (81,770 bytes)   
php_code.JPG (81,770 bytes)   
PHP Version5.2.6
Database Version5.0.33


related to 0000963 resolvedarvydas_vapsva How to handle PHP code embedded in Smarty templates 



2009-04-15 10:28

reporter   ~0000759

Problem was in oxUtilsView::_fillCommonSmartyProperties() method, where by default was set:

    $oSmarty->php_handling = SMARTY_PHP_REMOVE;
    $oSmarty->security = true;

after fix it looks like:

    if ( !$myConfig->isDemoShop() ) {
        $oSmarty->php_handling = (int) $myConfig->getConfigParam( 'iSmartyPhpHandling' );
        $oSmarty->security = false;
    } else {
        $oSmarty->php_handling = SMARTY_PHP_REMOVE;
        $oSmarty->security = true;