I won't go into how to configure your Aspdotnetstorefront website to handle when items are out of stock, you can refer to the manual for that: http://manual.aspdotnetstorefront.com/p-417-inventory-control.aspx.
What the manual doesn't tell you is that if someone finds that product page link on Google and clicks through and you have your store set to not show products that are out of stock, they come to an empty page. This is especially bad if you've paid for that click!
What you should do is add a few lines of code to the product page xml display package that renders a page that has a user friendly message and displays the related products assigned to that product or featured store products.
Code:
<xsl:template match="/">
<xsl:comment>Copyright 1995-2009 AspDotNetStorefront.com</xsl:comment>
<xsl:choose>
<xsl:when test="count(root/Products/Product) > 1">
<xsl:for-each select="/root/Products/Product[position()=1]">
<xsl:call-template name="MultiVariant"/>
</xsl:for-each>
</xsl:when>
<xsl:when test="count(root/Products/Product) = 0">
<!-- call a custom xmlpackage -->
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="/root/Products/Product" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Comments
Post has no comments.