I use the following php code to calculate a 15% plus to a buy price of a hotel room:
<?php ($rest = round (({price_tripple_luxury_03}*1.15), 2); echo $rest; ?>
where {price_tripple_luxury_03} is the short name of a custom entry field.
If {price_tripple_luxury_03} is not empty, the php renders fine.
However if {price_tripple_luxury_03} is empty, i get the following error:
Parse error: parse error, unexpected ‘*’ in /kunden/xxxxxxxxxxx/toursys/eeengine/core/core.functions.php(569) : eval()‘d code on line 262
In EE 1.3.2 everything was fine. No parse error.
I’m getting this error since i upgraded to EE 1.4.
The (test)template:
<html>
<body>
{exp:weblog:entries cache="yes" refresh="30" weblog="hotels" rdf="off"}
<?php ($rest = round (({price_tripple_luxury_03}*1.15), 2); echo $rest; ?>
{/exp:weblog:entries}
</body>
</html>
Php is allowed in this template and “PHP Parsing Stage” is set to “Output”.
