<?xml version="1.0" encoding="utf-8" ?>
<!-- ################################################## ################################################## ## -->
<!-- PriceGrabber / Yahoo Feed -->
<!-- Copyright Dave Negusse of Mainstreethost.com, 1995-2010. All Rights Reserved. -->
<!--
http://www.mainstreethost.com -->
<!-- For details on this license please visit the product homepage at the URL above. -->
<!-- THE ABOVE NOTICE MUST REMAIN INTACT. -->
<!-- ################################################## ################################################## ## -->
<package displayname="PriceGrabber/Yahoo Feed" version="2.1" debug="false" includeentityhelper="false">
<query name="Products" rowElementName="Product">
<sql>
<![CDATA[
select
p.productid,
p.name,
p.description,
p.sename,
p.sku,
p.ImageFileNameOverride,
p.ManufacturerPartNumber,
isnull(p.FroogleDescription, '') ProductFroogleDescription,
isnull(pv.Weight, 0) Weight,
pv.price,
isnull(pv.MSRP, pv.price) MSRP,
pv.inventory,
isnull(pv.saleprice, 0) saleprice,
isnull(pv.FroogleDescription, '') VariantFroogleDescription,
isnull(pv.description, '') VariantDescr,
m.Name AS ManName,
p.ExtensionData ProductFeedData,
pv.ExtensionData VariantFeedData
from product p with (NOLOCK)
INNER JOIN ProductManufacturer pm with (NOLOCK) ON p.ProductID = pm.ProductID
INNER JOIN Manufacturer m with (NOLOCK) ON pm.ManufacturerID = m.ManufacturerID
INNER JOIN ProductVariant pv with (NOLOCK) ON p.ProductID = pv.ProductID
left join (select variantid, sum(quan) inventory from dbo.inventory with (NOLOCK) group by variantid) i on pv.variantid = i.variantid
where
p.Published = 1
and p.IsSystem=0
and p.Deleted = 0
and p.ExcludeFromPriceFeeds = 0
and p.IsAKit = 0
and p.IsAPack = 0
and p.ShowBuyButton = 1
and p.RequiresRegistration = 0
and p.HidePriceUntilCart = 0
and (p.AvailableStartDate IS NULL or p.AvailableStartDate <= getdate())
and (p.AvailableStopDate IS NULL or p.AvailableStopDate >= getdate())
and case p.TrackInventoryBySizeAndColor when 1 then isnull(i.inventory, 0) else pv.inventory end >= @HideProductsWithLessThanThisInventoryLevel
and pv.isdefault = 1
and pv.published = 1
and pv.deleted=0
and p.ProductID not in (select ProductID from ProductCustomerLevel with (NOLOCK))
and p.ProductID not in (select ProductID from ProductAffiliate with (NOLOCK))
and p.SKU is not null
]]>
</sql>
<queryparam paramname="@HideProductsWithLessThanThisInventoryL evel" paramtype="appconfig" requestparamname="HideProductsWithLessThanThisInve ntoryLevel" 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

utput method="text" omit-xml-declaration="yes" />
<xsl:template match="/">Unique Retailer SKU Manufacturer Name Manufacturer Part Number Product Title Categorization Product URL Image URL Detailed Description Selling Price Condition Availability Weight

<xsl:apply-templates select="/root/Products/Product" />
</xsl:template>
<xsl:template match="Product">
<xsl

aram name="ProductName" select="aspdnsf:GetMLValue(name)"></xsl

aram>
<xsl

aram name="ProductVariantName" select="aspdnsf:GetMLValue(VariantName)"></xsl

aram>
<xsl

aram name="ProductDescr" select="aspdnsf:GetMLValue(description)"></xsl

aram>
<xsl

aram name="VariantDescr" select="aspdnsf:GetMLValue(VariantDescr)"></xsl

aram>
<xsl

aram name="ProductFroogleDescription" select="aspdnsf:GetMLValue(ProductFroogleDescripti on)"></xsl

aram>
<xsl

aram name="VariantFroogleDescription" select="aspdnsf:GetMLValue(VariantFroogleDescripti on)"></xsl

aram>
<xsl

aram name="ItemImage" select="aspdnsf:ProductImageUrl(productid, ImageFileNameOverride, SKU, 'medium', 1)"></xsl

aram>
<xsl

aram name="ManufacturerPartNumber" select="aspdnsf:GetMLValue(ManufacturerPartNumber) "></xsl

aram>
<xsl

aram name="StoreURL" select="/root/System/StoreUrl"></xsl

aram>
<xsl:value-of select="SKU"/><xsl:text> </xsl:text><xsl:value-of select="ManName"/><xsl:text> </xsl:text><xsl:value-of select="SKU"/><xsl:text> </xsl:text><xsl:value-of select="$ProductName" /><xsl:text> </xsl:text><xsl:text>Auto Parts</xsl:text><xsl:text> </xsl:text><link><xsl:value-of select="$StoreURL" /><xsl:value-of select="aspdnsf:ProductLink(productid, sename, 0, '')" /></link><xsl:text> </xsl:text><xsl:if test="not(contains($ItemImage,'nopicture'))"><xsl: value-of select="$ItemImage" /></xsl:if><xsl:text> </xsl:text><xsl:value-of select="$ProductFroogleDescription" /><xsl:text> </xsl:text><xsl:choose><xsl:when test="number(saleprice)=0"><xsl:value-of select="format-number(price, '###0.00')" disable-output-escaping="yes" /></xsl:when><xsl

therwise><xsl:value-of select="format-number(saleprice, '###0.00')" disable-output-escaping="yes" /></xsl

therwise></xsl:choose><xsl:text> </xsl:text><xsl:text>New</xsl:text><xsl:text> </xsl:text><xsl:text>Yes</xsl:text><xsl:text> </xsl:text><xsl:value-of select="Weight"/><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>