Results 1 to 3 of 3

Thread: Newbie... need product images to appear

  1. #1
    Join Date
    Mar 2007
    Posts
    24

    Default Newbie... need product images to appear

    ML 7.0

    Can someone show me how to include my product images, i have tried but no luck, keep getting xslt parsing errors invalid character..

    http://thegrapevin.web137.discountas....default1.aspx

    C#/VB.NET Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Default Home Page" debug="true" allowengine="true">

        <!-- ###################################################################################################### -->
        <!-- Copyright AspDotNetStorefront.com, 1995-2006.  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.                                                                   -->
        <!-- $Header: /v6.1/Web/XmlPackages/page.default.xml.config 1     12/30/05 2:33p Administrator $            -->
        <!--                                                                                                        -->
        <!-- ###################################################################################################### -->

        <query name="WinesOfTheMonth" rowElementName="row">
            <![CDATA[
                SELECT TOP 20
                    a.Name, a.Description, a.SKU, a.ProductID, 
                    b.CategoryID,
                    d.Name as Manufacturer,
                    e.Price, e.SalePrice,
                    f.Name as CategoryDesc
                    FROM Product a, ProductCategory b, ProductManufacturer c, Manufacturer d, ProductVariant e, Category f
                where    
                    a.ProductID = b.ProductID 
                    and b.CategoryID = f.CategoryID
                    and a.ProductID = c.ProductID
                    and c.ManufacturerID = d.ManufacturerID
                    and a.ProductID = e.ProductID
                    and b.CategoryID !=1
                    --and b.CategoryID = 434
            ]]>
            <queryparam paramname="@CatID" paramtype="runtime" requestparamname="CatID" sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
        
        <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="ShowWineofMonth" select="aspdnsf:AppConfigBool('ShowWineofMonth')" />
                <xsl:template match="/">
                    <xsl:value-of select="aspdnsf:Topic('HomeTopIntro')" disable-output-escaping="yes"/>
                    <xsl:choose>
                        <xsl:when test="$ShowWineofMonth='true'">
                            
                                <xsl:for-each select="/root/WinesOfTheMonth/row">
                                    <table cellpading="3" cellspacing="1" border="1" width="75%" >
                                    <tr>
                                        <td colspan="3">
                                        <strong><xsl:value-of select="Name"/></strong> - <xsl:value-of select="CategoryDesc"/>
                                        </td>
                                        <td>
                                        <xsl:value-of select="SKU" />
                                        </td>
                                    </tr>
                                    <tr>
                                    <td colspan="2"><xsl:value-of select="ProductID"/>
                                    
                                    </td>
                                    <td><xsl:value-of select="Description"/></td>
                                    <td>$<xsl:value-of select="format-number(Price,'0.00')"/></td>
                                    </tr>
                                    </table>
                                    <br/>
                                </xsl:for-each>
                            
                         </xsl:when>
                         <xsl:otherwise>
                           <xsl:value-of select="aspdnsf:SearchBox()" disable-output-escaping="yes"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
            </xsl:stylesheet>
        </PackageTransform>
    </package>

  2. #2
    Join Date
    May 2006
    Posts
    178

    Default

    Try to use the aspdnsf:LookupImage functions. You can find some usage examples in the xml packages that come with the cart.

    You should use the ANSI SQL 92 syntax in you SQL scripts. For example:

    Code:
    SELECT a.[Name] AS ProductName, b.CategoryID, c.[Name] AS CategoryName
    FROM Product a INNER JOIN ProductCategory b ON a.ProductID = b.ProductID 
    			    INNER JOIN Category c ON b.CategoryID = c.CategoryID
    .......
    * Read about the ANSI SQL 92 syntax in "Inside SQL Server 2000" by Kalen Delaney.

  3. #3
    Join Date
    Mar 2007
    Posts
    24

    Default

    Thanks for the info will change it right away and look into the function.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •