Okay...So, I'm going to post the XML Package code, and the Debug output below. If you don't mind, take a peek and see if you spot anything obvious. There is no <productid /> parameter in the debug output, and in the SQL statement, the default value for the parameter "productid" is 0. I tried hardcoding the defvalue to a valid product id (4), and got nothing.
First, the XML Package rev.recentlyviewed.xml.config
Code:
<?xml version="1.0" standalone="yes" ?>
<package version="2.1" displayname="Recently Viewed Products" debug="true" includeentityhelper="false">
<!-- ###################################################################################################### -->
<!-- Copyright AspDotNetStorefront.com, 1995-2010. 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. -->
<!-- -->
<!-- ###################################################################################################### -->
<query name="RecentlyViewedProducts" rowElementName="Item">
<sql>
<![CDATA[
exec dbo.aspdnsf_GetRecentlyViewedProducts
@productID,
@customerGUID,
@invFilter,
@recentlyViewedProductsNumToDisplay,
@storeID,
@FilterProduct
]]>
</sql>
<queryparam paramname="@productid" paramtype="runtime" requestparamname="productid" sqlDataType="int" defvalue="4" validationpattern="" />
<queryparam paramname="@customerGUID" paramtype="runtime" requestparamname="custGuid" sqlDataType="nvarchar" defvalue="" validationpattern="" />
<queryparam paramname="@invFilter" paramtype="appconfig" requestparamname="HideProductsWithLessThanThisInventoryLevel" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@recentlyViewedProductsNumToDisplay" paramtype="appconfig" requestparamname="RecentlyViewedProducts.NumberDisplayed" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterProduct" paramtype="runtime" requestparamname="FilterProduct" sqlDataType="bit" 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="RecentlyViewedProducts.NumberDisplayed" select="aspdnsf:AppConfig('RecentlyViewedProducts.NumberDisplayed')"></xsl:param>
<xsl:param name="RecentlyViewedProductsGridColWidth" select="aspdnsf:AppConfig('RecentlyViewedProductsGridColWidth')"></xsl:param>
<xsl:template match="/">
<xsl:param name="encloseInTab" select="aspdnsf:EvalBool(/root/Runtime/EncloseInTab)" />
<xsl:choose>
<xsl:when test="count(/root/RecentlyViewedProducts/Item) > 0">
<div id="it-recently-viewed">
<h3>Recently Viewed</h3>
<ul>
<xsl:choose>
<xsl:when test="aspdnsf:StrToLower(aspdnsf:AppConfig('RecentlyViewedProducts.ProductsFormat')) = 'grid'">
<xsl:apply-templates select="/root/RecentlyViewedProducts/Item" />
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="/root/RecentlyViewedProducts/Item">
<xsl:variable name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:variable>
<xsl:variable name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:variable>
<xsl:variable name="AltText">
<xsl:choose>
<xsl:when test="$pSEAltText=''">
<xsl:value-of select="$pName" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$pSEAltText" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<li>
<xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'icon', 0, SEAltText)" disable-output-escaping="yes"/>
<a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="aspdnsf:Ellipses(aspdnsf:GetMLValue(Name),48,true)" disable-output-escaping="yes" />
</a>
</li>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</ul>
</div>
<div class="it-hr"></div>
</xsl:when>
<xsl:otherwise>
<!--
<xsl:value-of select="aspdnsf:StringResource('showproduct.aspx.42')" disable-output-escaping="yes" />
-->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Item">
<xsl:variable name="delta">
<xsl:choose>
<xsl:when test="(count(/root/RecentlyViewedProducts/Item) mod number($RecentlyViewedProductsGridColWidth)) = 0">0</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number($RecentlyViewedProductsGridColWidth)-(count(/root/RecentlyViewedProducts/Item) mod number($RecentlyViewedProductsGridColWidth))"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="rows" select="ceiling(count(/root/RecentlyViewedProducts/Item) div number($RecentlyViewedProductsGridColWidth))" />
<xsl:if test="$RecentlyViewedProductsGridColWidth = 1">
<tr>
<xsl:call-template name="ProductCell"></xsl:call-template>
<xsl:if test="ceiling(position() div number($RecentlyViewedProductsGridColWidth)) = $rows and $delta > 0">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$delta" />
</xsl:call-template>
</xsl:if>
</tr>
</xsl:if>
<xsl:if test="position() mod $RecentlyViewedProductsGridColWidth = 1 and $RecentlyViewedProductsGridColWidth > 1">
<tr>
<xsl:for-each select=". | following-sibling::*[position() < $RecentlyViewedProductsGridColWidth]">
<xsl:call-template name="ProductCell"></xsl:call-template>
</xsl:for-each>
<xsl:if test="ceiling(position() div number($RecentlyViewedProductsGridColWidth)) = $rows and $delta > 0">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$delta" />
</xsl:call-template>
</xsl:if>
</tr>
</xsl:if>
</xsl:template>
<xsl:template name="ProductCell">
<xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
<xsl:param name="AltText">
<xsl:choose>
<xsl:when test="aspdnsf:GetMLValue(SEAltText)=''">
<xsl:value-of select="aspdnsf:GetMLValue(Name)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="aspdnsf:GetMLValue(SEAltText)" />
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<td align="center" valign="top">
<a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'icon', 0, $AltText)" disable-output-escaping="yes"/>
</a>
<br/>
<a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="$pName" disable-output-escaping="yes"/>
</a>
<xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
<xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID,'Product')" disable-output-escaping="yes" />
</xsl:if>
</td>
</xsl:template>
<xsl:template name="FillerCells">
<xsl:param name="cellCount"/>
<xsl:param name="CellWidth" select="100 div $RecentlyViewedProductsGridColWidth" />
<td width="{$CellWidth}%"> </td>
<xsl:if test="$cellCount > 1">
<xsl:call-template name="FillerCells">
<xsl:with-param name="cellCount" select="$cellCount - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>
Next, the rev.recentlyviewed.xml.config_store.runtime.xml
Code:
<root>
<System>
<IsAdminSite>False</IsAdminSite>
<IsAdminSiteInt>0</IsAdminSiteInt>
<CustomerID>58644</CustomerID>
<DefaultVATSetting>1</DefaultVATSetting>
<CustomerVATSetting>1</CustomerVATSetting>
<UseVATSetting>1</UseVATSetting>
<CustomerLevelID>0</CustomerLevelID>
<CustomerLevelName>
</CustomerLevelName>
<CustomerFirstName>
</CustomerFirstName>
<CustomerLastName>
</CustomerLastName>
<CustomerFullName>
</CustomerFullName>
<SubscriptionExpiresOn>
</SubscriptionExpiresOn>
<CustomerRoles>NoSubscription,NotRegistered</CustomerRoles>
<IsAdminUser>False</IsAdminUser>
<IsSuperUser>False</IsSuperUser>
<VAT.Enabled>false</VAT.Enabled>
<VAT.AllowCustomerToChooseSetting>true</VAT.AllowCustomerToChooseSetting>
<LocaleSetting>en-US</LocaleSetting>
<CurrencySetting>USD</CurrencySetting>
<CurrencyDisplayLocaleFormat>
</CurrencyDisplayLocaleFormat>
<WebConfigLocaleSetting>en-US</WebConfigLocaleSetting>
<SqlServerLocaleSetting>en-US</SqlServerLocaleSetting>
<PrimaryCurrency>USD</PrimaryCurrency>
<PrimaryCurrencyDisplayLocaleFormat>
</PrimaryCurrencyDisplayLocaleFormat>
<Date>6/10/2010</Date>
<Time>3:03 PM</Time>
<SkinID>1</SkinID>
<AffiliateID>0</AffiliateID>
<IPAddress>24.172.30.82</IPAddress>
<QueryStringRAW>
</QueryStringRAW>
<UseStaticLinks>
</UseStaticLinks>
<PageName>p-2-avaya-5402-2-line-digital-phone.aspx</PageName>
<FullPageName>/p-2-avaya-5402-2-line-digital-phone.aspx</FullPageName>
<XmlPackageName>rev.recentlyviewed.xml.config</XmlPackageName>
<StoreUrl>http://216.27.94.45/</StoreUrl>
<CurrentDateTime>Thu, 10 Jun 2010 19:03:05 GMT</CurrentDateTime>
<CustomerIsRegistered>false</CustomerIsRegistered>
<StoreID>1</StoreID>
<FilterProduct>False</FilterProduct>
<FilterEntity>False</FilterEntity>
<FilterTopic>False</FilterTopic>
<FilterNews>False</FilterNews>
<RequestedPage>p-2-avaya-5402-2-line-digital-phone.aspx</RequestedPage>
<RequestedQuerystring>
</RequestedQuerystring>
</System>
<QueryString />
<Form />
<Session>
<catid>17</catid>
</Session>
<Cookies>
<Referrer>http://216.27.94.45/</Referrer>
<ASPDNSFGUID>85275CE8905FDC30658094E5934DA8A3775AEBA4BF927E8649989A437BED90F695E803CD2B097ADBB4EF3A253BFBD46FB9E2E556950C638275F0906C1594FBE18890E08384D5F77D749C8CCCBBC639E9CEFEDA5CE04B0607AFB1D620CE4BF6CE0EAF0DBE6A4B527BE91829595525B63F2F69B9FA7F5C31396DFCE0963B183886</ASPDNSFGUID>
</Cookies>
<ServerVariables>
<HTTP_HOST>216.27.94.45</HTTP_HOST>
<HTTP_USER_AGENT>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729)</HTTP_USER_AGENT>
<AUTH_TYPE>Forms</AUTH_TYPE>
<AUTH_USER>d97784bd-b17a-43b0-a9d1-2115eef718c7</AUTH_USER>
<AUTH_PASSWORD>
</AUTH_PASSWORD>
<HTTPS>off</HTTPS>
<LOCAL_ADDR>216.27.94.45</LOCAL_ADDR>
<PATH_INFO>/p-2-avaya-5402-2-line-digital-phone.aspx</PATH_INFO>
<PATH_TRANSLATED>C:\websites\IHaveIT\wwwroot\p-2-avaya-5402-2-line-digital-phone.aspx</PATH_TRANSLATED>
<SCRIPT_NAME>/p-2-avaya-5402-2-line-digital-phone.aspx</SCRIPT_NAME>
<SERVER_NAME>216.27.94.45</SERVER_NAME>
<SERVER_PORT_SECURE>0</SERVER_PORT_SECURE>
<HTTP_CLUSTER_HTTPS>
</HTTP_CLUSTER_HTTPS>
</ServerVariables>
<Runtime>
<IPAddress>24.172.30.82</IPAddress>
<FilterProduct>False</FilterProduct>
<IsAdminSite>False</IsAdminSite>
<StoreUrl>http://216.27.94.45/</StoreUrl>
<FilterNews>False</FilterNews>
<CurrencySetting>USD</CurrencySetting>
<FilterEntity>False</FilterEntity>
<IsSuperUser>False</IsSuperUser>
<StoreID>1</StoreID>
<CustomerLastName>
</CustomerLastName>
<PrimaryCurrency>USD</PrimaryCurrency>
<WebConfigLocaleSetting>en-US</WebConfigLocaleSetting>
<CurrencyDisplayLocaleFormat>
</CurrencyDisplayLocaleFormat>
<XmlPackageName>rev.recentlyviewed.xml.config</XmlPackageName>
<VAT.AllowCustomerToChooseSetting>True</VAT.AllowCustomerToChooseSetting>
<AffiliateID>0</AffiliateID>
<CustomerIsRegistered>false</CustomerIsRegistered>
<SkinID>1</SkinID>
<FilterTopic>False</FilterTopic>
<QueryStringRAW>
</QueryStringRAW>
<LocaleSetting>en-US</LocaleSetting>
<CustomerLevelName>
</CustomerLevelName>
<FullPageName>/p-2-avaya-5402-2-line-digital-phone.aspx</FullPageName>
<CustomerLevelID>0</CustomerLevelID>
<DefaultVATSetting>1</DefaultVATSetting>
<SqlServerLocaleSetting>en-US</SqlServerLocaleSetting>
<CustomerVATSetting>1</CustomerVATSetting>
<IsAdminUser>False</IsAdminUser>
<Date>6/10/2010</Date>
<CustomerRoles>NoSubscription,NotRegistered</CustomerRoles>
<VAT.Enabled>False</VAT.Enabled>
<UseStaticLinks>False</UseStaticLinks>
<Time>3:03 PM</Time>
<SubscriptionExpiresOn>
</SubscriptionExpiresOn>
<CustomerFirstName>
</CustomerFirstName>
<PageName>p-2-avaya-5402-2-line-digital-phone.aspx</PageName>
<UseVATSetting>1</UseVATSetting>
<CustomerFullName>
</CustomerFullName>
<PrimaryCurrencyDisplayLocaleFormat>
</PrimaryCurrencyDisplayLocaleFormat>
<IsAdminSiteInt>0</IsAdminSiteInt>
</Runtime>
<RecentlyViewedProducts />
</root>
Lastly, the rev.recentlyviewed.xml.config_store.runtime.sql
Code:
************************************ SQL Statement and parameters for query RecentlyViewedProducts ************************************
declare @productid Int
declare @customerGUID NVarChar
declare @invFilter Int
declare @recentlyViewedProductsNumToDisplay Int
declare @StoreID Int
declare @FilterProduct Bit
set @productid = 4
set @customerGUID = ''
set @invFilter = -1
set @recentlyViewedProductsNumToDisplay = 5
set @StoreID = 1
set @FilterProduct = False
exec dbo.aspdnsf_GetRecentlyViewedProducts
@productID,
@customerGUID,
@invFilter,
@recentlyViewedProductsNumToDisplay,
@storeID,
@FilterProduct
The rev.recentlyviewed.xml.config_store.xfrm.xml contains no debug output. Also, including the entity helpers appears to have no effect.