Announcement

Collapse
No announcement yet.

ProductImageFileName Problem

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

    ProductImageFileName Problem

    Hi,

    Just upgrading a site to v11 and have an issue with the variable:

    Code:
    <actinic:variable name="ProductImageFileName" />
    If an image starts with a number it does not display as Actinic is replacing the

    HTML Code:
    directory/image.jpg
    with

    HTML Code:
    directoryimage.jpg
    This only occurs for the ProductImageFileName variable, all other section and thumbnail tags work if the filename begins with a number and it was fine in v10.

    I am using the charset: iso-8859-1

    Is this a fixable bug in Actinic or could something else be causing this?

    Guy

    Lock Shop Warehouse - www.lockshop-warehouse.co.uk
    Regards,

    Guy

    Lead Developer - Lock Shop Warehouse
    Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

    #2
    This seems unlikely as it would be caught in testing and by the many existing V11 users.

    I've been unable to replicate it here.

    Details of where you're using this Variable, the Layout and code involved, particular sub-folder and file names that fails may help.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman,

      Thanks for the reply, I've tried the variable directly in my ProductPageProductLayout template (I'm using a modified version of Standard Layout using CSS), so within the template is the following tag:

      Code:
      <img src="<actinic:variable name="ProductImageFileName" />" alt="<actinic:variable name="ProductName" encoding="strip"/>" />
      Also tried it in the 'Standard Product Image' template, code is the same as above.

      The folder for our images is 'Images\' then a specific image name, for instance one that currently fails is as follows:

      Images\3193.jpg

      putting a letter within or after the numbers makes no odds, but starting it with one means the image will show as normal. i.e

      Images\A3193.jpg
      Regards,

      Guy

      Lead Developer - Lock Shop Warehouse
      Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

      Comment


        #4
        Tried this using identical folder and file names as above and still no problems. Both Preview and live site are OK.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          The issue seems to be all down to my customized layouts. When I change to a default layout the problem images display correctly.

          I'm going to work at tracking down what exactly has caused the problem and shall update the post when I find it.

          Guy
          Regards,

          Guy

          Lead Developer - Lock Shop Warehouse
          Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

          Comment


            #6
            Post the code you're using and I can quickly point out any problems.

            If you're using this variable within JavaScript or PHP you'll need some help as there are gotchas lurking.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              The Products were being bought in via PHP, by tweaking this I was able to get them working as expected.

              Thanks you for your help,

              Guy
              Regards,

              Guy

              Lead Developer - Lock Shop Warehouse
              Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

              Comment


                #8
                Hi,
                Looks like I've encountered the same issue but with image filenames starting with the letter "r". Tried various combination and every file works except those starting with "r".
                Code is detailed below & the one of the failing url is

                http://alnavi.co.uk/acatalog/Products_New_In_1098.html


                <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:variable name="ProductReference" />&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">
                <div class="floatblock">
                <div class="picblock" "height:180px;" >
                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" >
                <tr>
                <td width="100%" height="180px" align="center" valign="bottom" >
                <actinic:block if="%28%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22ProductThumbnailImageFileName%22%20%2f%3e%20%3d%3d%20%22%22%29" > <img class="displayed" src="<actinic:variable name="ProductThumbnailImageFileName" />" alt="<actinic:variable name="ProductName" />" align ="bottom" /> </actinic:block>
                <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductThumbnailImageFileName%22%20%2f%3e%20%21%3d%20%22%22" ><img class="displayed" src="<actinic:variable name="ProductImageFileName" />" alt="<actinic:variable name="ProductName" />" align ="bottom" /> </actinic:block>
                </td>
                </tr>
                </table>
                <div class="padding" >
                <div align="bottom">
                <BR CLEAR=all>
                </div>
                </div>
                </div>
                <div class="headerblock" align="center"> <actinic:variable name="ProductName" /> </div>
                <div class="footerblock">
                <div align= "center">
                <actinic:block if="%3cactinic%3avariable%20name%3d%22Alna%20Vi%20Sale%22%20%2f%3e%20%20%3d%3d%20TRUE" > <b>Was:</b> <s> £<actinic:variable name="RRP" /> </s> <br/>
                <font color="#FF0000">
                <actinic:block php="true" >
                $rrp = <actinic:variable name="RRP" selectable="false" />;
                $rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
                {
                $amountsaved = ($rrp - $rawprice);
                $savepercent = ((($rrp - $rawprice) / $rrp) * 100);
                echo "you save £$amountsaved";
                echo " (".number_format($savepercent,1);
                echo "%)";
                }
                </actinic:block>
                </font> <br/> <b>Now:</b>
                </actinic:block>
                <actinic:block type="PriceList" ><b><actinic:variable name="PriceLayout" /></b><br/></actinic:block>
                </div>
                <div align= "center">
                <actinic:variable name="ProductRelatedProductsList" />
                </div>

                </div>
                </div>
                </a>


                Thanks
                Nilesh


                BTW- The same images work elsewhere

                Comment


                  #9
                  First, try fixing the 2 occurrences of:

                  align ="bottom"

                  to be

                  align="bottom"

                  Then report the filename and path you're using for some of the faulty images on http://alnavi.co.uk/acatalog/Products_New_In_1098.html

                  And whether it's the Product Image or Thumbnail filename that's involved.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Thank you Norman.

                    I've changed the two occurances of align but makes no difference.
                    Played around & it looks like its the product image that is used & not thumbnails. Copied & renamed a couple of images with a prefix of "Z" and this works fine. I've looked at the source & it shows "\r" is been replaced with a space . i.e. "alnavi\img k-6082301.jpg" should be "alnavi\img\rk-6082301.jpg"

                    <img class="displayed" src="alnavi\img k-6082301.jpg" alt="Rieker - 60823 Regina in 01 Schwarz/SC" align="bottom" />
                    I've replaced the call to images such as the one below & still makes no difference.

                    <div class="image_product" style="height: 160px; width: 160px; max-height: 160px;" ><actinic:variable name="ProductImageLayout" /></div>
                    I'm now really stuck. Renaming all images is not really an option as I have a few brands starting with the letter r that needs to be brought in.

                    Any suggestion would be much apprecaited.
                    Many Thanks
                    Nilesh

                    Comment


                      #11
                      Are you importing these products? If so could you post a sample of the import file for a product containing such an image?

                      And a screenshot of the image filename in the Product Details would be useful too.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Hi Norman.

                        No products are been imported at the moment. What I have been doing recently is organising all products so that they reside within their own sections under a master section called brand.
                        Each product then has custom variables such as Brand, Style, Gender etc.
                        I then have fragments with custom variables such as FSTYLE, FBRAND etc. and display the relevant products using conditions within different sections such as Shop by Brand, Womens Sandal, etc. Sample script for Brand & Gender is as follows.

                        <actinic:block php="true">
                        $BrandToShow = '<actinic:variable name="FBrand" />';
                        $StyleToShow = '<actinic:variable name="FGender" />';
                        <actinic:block type="EntireSectionList">
                        <actinic:block type="ProductList">
                        if ( (<actinic:variable name="ProductType" selectable="false" /> == 0)
                        && ('<actinic:variable name="Brandname" encoding="perl" selectable="false" />' == $BrandToShow)
                        && ('<actinic:variable name="Alna Vi Gender" />' == $StyleToShow)
                        && ('<actinic:variable name="AlnaViSaleable" />' == True )
                        )
                        {
                        $productcode = <<<ENDOFLAYOUT
                        <actinic:variable name="Alna Vi Fragment List Selector" />
                        ENDOFLAYOUT;
                        echo $productcode;
                        }
                        </actinic:block>
                        </actinic:block>
                        </actinic:block>
                        The code of the layout "Alna Vi Fragment List Selector" is what is posted on earlier. Image showing product details of one of the products is attached but note that the filename is prefix with a "Z". Frustrating that it all work well except for Brands starting with "r".

                        Thanks, Nilesh
                        Attached Files

                        Comment


                          #13
                          I see what's happening but I cannot determine why. Your variable ProductImageFileName is having \r treated as if if means Return. Why this is happening is hard to say. Open the Layout that contains this variable and right-click the ProductImageFileName and choose Edit Appearance. Post a screenshot of that window.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            Hi Norman,

                            Believe attached is what you need.
                            Many Thanks,

                            Nilesh
                            Attached Files

                            Comment


                              #15
                              Hi,

                              Think you've hit the nail on the head. Just changed it to quoted Perl & the images are getting displayed. I'll do a bit more testing & get back in the next 10 mins.
                              rgds,
                              Nilesh

                              Comment

                              Working...
                              X