Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Manufacturer images not displaying

  1. #1
    matrix_l8r is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Manufacturer images not displaying

    I am developing a manufactures side bar and want to display the manufactures images. I have used the rev.manufactures.xml.config code to display this information but it does not show the manufactures images as you can see here on the left column - http://119.161.34.68/manufacturers.aspx.

    Manufacturer Images have been loaded but they are not showing in the left hand column.

    Cheers

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    That XML package doesn't display images by default. What code have you added to try to get it to do so?

  3. #3
    matrix_l8r is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default code used to display images

    I have extracted some code from the entity.manufacturers.xml.config and applied this to the rev.manufacturers.xml.config file.

    Code:
    <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
    The code from the page is shown below where I have edited $EntityName and replaced with $eName. I am not sure shy this is not returning the image. Is it not the right path to the image?

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <!-- ###################################################################################################### -->
    <!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.					                -->
    <!-- http://www.aspdotnetstorefront.com														                -->
    <!-- For details on this license please visit  the product homepage at the URL above.		                -->
    <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
    <!-- ###################################################################################################### -->
    <package version="2.1" displayname="Manufacturers" debug="false" includeentityhelper="true">
        <PackageTransform>
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
                <xsl:output method="html" omit-xml-declaration="yes"/>
    			<xsl:param name="EntityName"><xsl:value-of select="/root/Runtime/entity" /></xsl:param>
                    
                    <xsl:param name="scName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    
    
                <xsl:param name="ManufacturerID">
                    <xsl:choose>
                        <xsl:when test="/root/System/PageName = 'showcategory.aspx' or /root/System/PageName = 'showsection.aspx' or /root/System/PageName = 'showdistributor.aspx' or /root/System/PageName = 'showvector.aspx' or /root/System/PageName = 'showgenre.aspx'">0</xsl:when>
                        <xsl:when test="/root/System/PageName = 'showmanufacturer.aspx' and boolean(/root/QueryString/manufacturerid)">
                            <xsl:value-of select="/root/QueryString/manufacturerid"/>
                        </xsl:when>
                        <xsl:when test="(/root/System/PageName = 'showmanufacturer.aspx' or /root/System/PageName = 'showproduct.aspx') and boolean(/root/Cookies/lastviewedentityinstanceid) and /root/Cookies/lastviewedentityname = 'Manufacturer'">
                            <xsl:value-of select="/root/Cookies/lastviewedentityinstanceid"/>
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
    
    
                <xsl:template match="/">
                    <xsl:element name="ul">
                        <xsl:attribute name="class">
                            BrandsList
                        </xsl:attribute>
    
                        <xsl:apply-templates select="/root/EntityHelpers/Manufacturer/Entity">
                            <xsl:with-param name="prefix" select="''"/>
                        </xsl:apply-templates>
    
                    </xsl:element>
                </xsl:template>
    
    			<xsl:template match="Entity">
                    <xsl:param name="prefix"></xsl:param>
                    <xsl:param name="eName" select="aspdnsf:GetMLValue(Name)" />
                    <li class="tame">
                        <xsl:value-of select="$prefix" />
                        <xsl:if test="number(ParentEntityID) != 0">
                            <span class="catMark">&gt;&gt;</span>*
                        </xsl:if>
                         <a href="{concat('m-',EntityID,'-',SEName,'.aspx')}"> 
                            <xsl:if test="EntityID = $ManufacturerID or descendant::Entity/EntityID = $ManufacturerID">
                                <xsl:attribute name="style">font-weight:bold</xsl:attribute>
                            </xsl:if>
    						<!--<xsl:value-of select="$eName"/>-->
    						<xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $eName, 'icon', 0, $eName)" disable-output-escaping="yes" /> 
                        </a>
                    <xsl:if test="count(child::Entity)&gt;0 and (EntityID = $ManufacturerID or descendant::Entity/EntityID = $ManufacturerID)">
                            <ul class="tame">
                                <xsl:apply-templates select="Entity">
                                    <xsl:with-param name="prefix" select="concat($prefix, '**')"/>
                                </xsl:apply-templates>
                            </ul>
                        </xsl:if>
                    </li>
                </xsl:template>
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>