Announcement

Collapse
No announcement yet.

Recent Products Code Error

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

    Recent Products Code Error

    Hello i am experiencing an issue where i am getting an error in the design tab stating

    "a php error has been found on the page ('Parse error: parse error on main on line 1'). The error is coming from "Save Recent Product Details - Product Image' layout click here to go to code.

    clicking the link takes me to the layout and highlights the the first actinic block in either condition.

    I have check the code and it is the same as another sd16 site i am running so am unsure as to what is causing this error.

    code below.

    HTML Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductVisible%22%20%2f%3e%20%26%26%20%28%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22%29" >
    	<script type="text/javascript">
    	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsDuplicateIndexed%22%20%2f%3e" >
    		SaveRecentProduct('<actinic:variable name="ProductID" encoding="perl" selectable="false" />', '<actinic:variable name="ProductName" selectable="false" />', '<actinic:block php="true" encoding="perl" selectable="false">echo trim('<actinic:block type="PriceList"><actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201"><actinic:block if="%3cactinic%3avariable%20name%3d%22RecentProductsShowIncTax%22%20%2f%3e"><actinic:variable name="PreFormattedPrice" value="Product Price Including Tax" /></actinic:block><actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22RecentProductsShowIncTax%22%20%2f%3e" ><actinic:variable name="PreFormattedPrice" value="Product Price Excluding Tax" /></actinic:block></actinic:block></actinic:block>');</actinic:block>', '<actinic:block php="true" encoding="perl" selectable="false">echo str_replace('\\', '/', '<actinic:variable encoding="perl" name="ProductImageFileName" selectable="false" />');</actinic:block>');
    	</actinic:block>	
    	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsDuplicateIndexed%22%20%2f%3e%20%3d%3d%20false" >
    		SaveRecentProduct('<actinic:variable name="ProductReference" />', '<actinic:variable name="ProductName" selectable="false" />', '<actinic:block php="true" encoding="perl" selectable="false">echo trim('<actinic:block type="PriceList"><actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201"><actinic:block if="%3cactinic%3avariable%20name%3d%22RecentProductsShowIncTax%22%20%2f%3e"><actinic:variable name="PreFormattedPrice" value="Product Price Including Tax" /></actinic:block><actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22RecentProductsShowIncTax%22%20%2f%3e" ><actinic:variable name="PreFormattedPrice" value="Product Price Excluding Tax" /></actinic:block></actinic:block></actinic:block>');</actinic:block>', '<actinic:block php="true" encoding="perl" selectable="false">echo str_replace('\\', '/', '<actinic:variable encoding="perl" name="ProductImageFileName" selectable="false" />');</actinic:block>');	
    	</actinic:block>	
    	</script>
    </actinic:block>
    www.flytesofancy.co.uk, www.electricfencingkits.co.uk, www.dorsetlogstores.co.uk, www.framebow.co.uk

    #2
    Is this on all products?

    If only on some products, do you have any unusual characters in their Product References or Product Names?

    A link to such a product on your live site would be useful.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Given by the number of instances it picks up i would suggest it is on every page/ product. the site is

      www.dorsetlogstores.co.uk

      http://www.dorsetlogstores.co.uk/log...S.html#SID=845
      www.flytesofancy.co.uk, www.electricfencingkits.co.uk, www.dorsetlogstores.co.uk, www.framebow.co.uk

      Comment


        #4
        You seem to be getting an error from SD's internal PHP interpreter when the price is being put into the save recent products code.

        Try going to Design / Library / Layouts / Prices and right-click Product Price Including Tax and choose Compare With Previous Version. Report if it shows as changed or not.

        If changed, you could right-click and choose Revert To Factory Settings.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Norman,

          You star!!!

          It was a price layout that had supposedly changed. I have reverted them and all is hunky-dory.

          Only a relative newby to code and php is a bit advanced atm.
          www.flytesofancy.co.uk, www.electricfencingkits.co.uk, www.dorsetlogstores.co.uk, www.framebow.co.uk

          Comment

          Working...
          X