HTML Code:
<?xml version="1.0" encoding="utf-8" ?>
<!--
###################################################################################################
### -->
<!-- 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 displayname="Google Base RSS 2.0 Feed" version="2.1" debug="false"
includeentityhelper="false">
<query name="Products" rowElementName="Product">
<sql>
<![CDATA[
select
p.productid,
p.name,
isnull(pv.name, '') VariantName,
p.description,
p.sename,
p.ImageFileNameOverride,
p.SKU,
isnull(p.FroogleDescription, '') ProductFroogleDescription,
p.SEKeywords,
p.ManufacturerPartNumber,
pv.price,
isnull(pv.saleprice, 0) saleprice,
isnull(pv.FroogleDescription, '') VariantFroogleDescription,
isnull(pv.description, '') VariantDescr,
c.Name as MerchantCategory,
m.Name as Manufacturer,
pv.Weight
from
dbo.product p with (nolock)
join dbo.productvariant pv with (nolock) on p.productid =
pv.productid
join productcategory pc with (nolock) on p.ProductID = pc.ProductID
join category c with (nolock) on pc.CategoryID = c.CategoryID
left join ProductManufacturer pm with (nolock) on p.ProductID =
pm.ProductID
left join Manufacturer m with (nolock) on pm.ManufacturerID =
m.ManufacturerID
where
p.IsSystem=0
and p.deleted = 0
and p.published = 1
and p.ExcludeFromPriceFeeds = 0
and pv.isdefault = 1
]]>
</sql>
</query>
<PackageTransform>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:aspdnsf="urn:aspdnsf" xmlns:g="http://base.google.com/ns/1.0" exclude-result-
prefixes="aspdnsf">
<xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8"
indent="no" />
<xsl:param name="EntityName">
<xsl:value-of select="/root/QueryString/entity" />
</xsl:param>
<xsl:param name="ShowInGrid">true</xsl:param>
<xsl:param name="GridCols">4</xsl:param>
<xsl:param name="UseDescr" select="aspdnsf:AppConfig
('Froogle_UseDescriptionsIfFroogleDescEmpty')" />
<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
<xsl:param name="WebConfigLocaleSetting"
select="/root/Runtime/WebConfigLocaleSetting" />
<xsl:template match="/">
<rss version="2.0">
<channel>
<title><xsl:value-of select="aspdnsf:AppConfig('StoreName')" /></title>
<link><xsl:value-of select="/root/System/StoreUrl" /></link>
<description><xsl:value-of select="aspdnsf:AppConfig('RSSChannelDescr')"
/></description>
<language><xsl:value-of select="$WebConfigLocaleSetting" /></language>
<pubDate><xsl:value-of select="/root/System/CurrentDateTime" /></pubDate>
<lastBuildDate><xsl:value-of select="/root/System/CurrentDateTime"
/></lastBuildDate>
<xsl:apply-templates select="/root/Products/Product" />
</channel>
</rss>
</xsl:template>
<xsl:template match="Product">
<xsl:param name="SKU" select="aspdnsf:GetMLValue(SKU)"></xsl:param>
<xsl:param name="ProductID" select="aspdnsf:GetMLValue
(ProductID)"></xsl:param>
<xsl:param name="ProductName" select="aspdnsf:GetMLValue
(name)"></xsl:param>
<xsl:param name="ProductVariantName" select="aspdnsf:GetMLValue
(VariantName)"></xsl:param>
<xsl:param name="ProductDescr" select="aspdnsf:StripHtml(aspdnsf:GetMLValue
(description,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>
<xsl:param name="VariantDescr" select="aspdnsf:StripHtml(aspdnsf:GetMLValue
(variantdescr,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>
<xsl:param name="ProductFroogleDescription" select="aspdnsf:StripHtml
(aspdnsf:GetMLValue(ProductFroogleDescription,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>
<xsl:param name="VariantFroogleDescription" select="aspdnsf:StripHtml
(aspdnsf:GetMLValue(VariantFroogleDescription,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>
<xsl:param name="ItemImage" select="aspdnsf:ProductImageUrl(productid,
ImageFileNameOverride, SKU, 'medium', 1)"></xsl:param>
<xsl:param name="MerchantCategory" select="aspdnsf:GetMLValue
(MerchantCategory)"></xsl:param>
<xsl:param name="Keywords" select="aspdnsf:GetMLValue
(SEKeywords)"></xsl:param>
<xsl:param name="Manufacturer" select="aspdnsf:GetMLValue
(Manufacturer)"></xsl:param>
<xsl:param name="MPN" select="aspdnsf:GetMLValue
(ManufacturerPartNumber)"></xsl:param>
<xsl:param name="Weight" select="aspdnsf:GetMLValue
(Weight)"></xsl:param>
<item>
<g:id>
<xsl:value-of select="productid" />
</g:id>
<sku>
<xsl:value-of select="$SKU" />
</sku>
<title>
<xsl:value-of select="$ProductName" />
</title>
<link>
<xsl:value-of select="/root/System/StoreUrl"
/><xsl:value-of select="aspdnsf:ProductLink(productid, sename, 0, '')" />
</link>
<description>
<xsl:choose>
<xsl:when test="$VariantFroogleDescription!=''">
<xsl:value-of select="substring(aspdnsf:StripHtml($VariantFroogleDescription), 1,
500)" disable-output-escaping="yes" />
</xsl:when>
<xsl:when test="$ProductFroogleDescription!=''">
<xsl:value-of select="substring(aspdnsf:StripHtml($ProductFroogleDescription), 1,
500)" disable-output-escaping="yes" />
</xsl:when>
<xsl:when test="$VariantDescr!=''">
<xsl:value-of select="substring(aspdnsf:StripHtml($VariantDescr), 1, 500)"
disable-output-escaping="yes" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(aspdnsf:StripHtml($ProductDescr), 1, 500)"
disable-output-escaping="yes" />
</xsl:otherwise>
</xsl:choose>
</description>
<g:image_link>
<xsl:if test="not(contains($ItemImage, 'nopicture'))">
<xsl:value-of select="$ItemImage" />
</xsl:if>
</g:image_link>
<g:price>
<xsl:value-of select="format-number(price,
'###0.00')" />
</g:price>
<g:saleprice>
<xsl:value-of select="format-number(saleprice,
'###0.00')" />
</g:saleprice>
<g:id>
<xsl:value-of select="productid"/>
</g:id>
<merchantcategory>
<xsl:value-of select="$MerchantCategory" />
</merchantcategory>
<brand>
<xsl:value-of select="$Manufacturer" />
</brand>
<g:price>
<xsl:choose>
<xsl:when test="number(saleprice)=0">
<xsl:value-of select="format-number(price, '###0.00')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(saleprice, '###0.00')" />
</xsl:otherwise>
</xsl:choose>
</g:price>
<g:mpn>
<xsl:choose>
<xsl:when test="ManufacturerPartNumber!=''">
<xsl:value-of select="ManufacturerPartNumber" />
</xsl:when>
<xsl:when test="SKU!=''">
<xsl:value-of select="SKU" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="productid" />
</xsl:otherwise>
</xsl:choose>
</g:mpn>
<g:condition>New</g:condition>
</item>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>