I just tried to add the 'Only Displaying the First Ten Words of the Full Description' to one of our sites to test it to sea what it dose and it will not work I have PHP5 installed on my pc and all I get is the following error in the main actinic catalog..
Only Displaying the First Ten Words of the Full Description
I know a bit of PHP so I tried removed the line with the ProductDescription in and guess what it work...
I have a look at fxing the script but not holding out mutch hope!
<actinic:block php="true" >
$sShort = "";
$nCount = 0;
$sOriginal = "<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />";
foreach(explode(" ", $sOriginal) as $sWord)
{
if ($nCount > 10)
{
$sShort .= "...";
break;
}
$sShort .= $sWord . " ";
$nCount++;
}
echo $sShort;
</actinic:block>
Only Displaying the First Ten Words of the Full Description
I know a bit of PHP so I tried removed the line with the ProductDescription in and guess what it work...
I have a look at fxing the script but not holding out mutch hope!
<actinic:block php="true" >
$sShort = "";
$nCount = 0;
$sOriginal = "<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />";
foreach(explode(" ", $sOriginal) as $sWord)
{
if ($nCount > 10)
{
$sShort .= "...";
break;
}
$sShort .= $sWord . " ";
$nCount++;
}
echo $sShort;
</actinic:block>
Comment