Announcement

Collapse
No announcement yet.

PHP errors in V10 custom code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP errors in V10 custom code

    I made the mistake of switching on "recently viewed products" earlier on, I now have a site full of PHP errors, mainly around the product description which is coded thus (although there are others) - this is the modification that limits to 25 words - and the price format. I have now lost all the product descriptions from my products on the web site (they are still in Actinic), even though I have now turned recently viewed products off. Any ideas?

    <actinic:block php="true" >
    $sShort = "";
    $nCount = 0;
    $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';
    foreach(explode(" ", $sOriginal) as $sWord)
    {
    if ($nCount > 25)
    {
    $sShort .= "...";
    break;
    }
    $sShort .= $sWord . " ";
    $nCount++;
    }
    echo $sShort;
    </actinic:block>

    and

    <actinic:block php="true" > priceformat("<actinic:variable name="SecondCurrencyFormat" selectable="false" />","<actinic:variable formatting="font(Size|14),bold" name="TaxInclusivePrice" />", "<actinic:variable name="TaxInclusivePriceAlt" selectable="false" />"); </actinic:block>
    Martin
    Modelmotorracing.com : Web services : Twitter

    #2
    OK panic over, I closed and re-opened V10 and it's all OK. Recently Viewed Products certainly doesn't seem to like these product layouts, any ideas why?
    Martin
    Modelmotorracing.com : Web services : Twitter

    Comment


      #3
      The code you've highlighted in red is spurious. Delete it and that should improve things.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment

      Working...
      X