Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Display Product Description within Order Receipt

  1. #1
    chamberinternet is offline Member
    Join Date
    Jul 2009
    Posts
    30

    Default Display Product Description within Order Receipt

    Hello ...

    Is it possible to add the product description within the order confirmation email?

    The product descriptions are really short (4 to 5 words maximum) so they should fit next to the SKU code.

    Can any one help on how I can achieve this?

    Thanks a lot

    Shafiq :sK
    Using AspDotNetStorefront ML 8.0.1.2

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Sure...simple enough. Note that this method requires no source or database modifications, however the receipt will always display the current product description (eg. if you change the description of a product that someone ordered, and that someone comes back in 2 months and re-views the receipt on your site they will see the changed description and not the original...saving the original will require modifications to the dbo.Orders_ShoppingCart table as well as source code and stored procedure mods to store the original description with the item).

    Open the XmlPackages/notification.receipt.xml.config xmlpackage and find the OrderItems query at the top
    Code:
    <query name="OrderItems" rowElementName="Item">
    Near the bottom you'll need to pull the description in the select statement and then join on the product table
    Code:
    s.TaxRate,
          ISNULL(s.IsAKit, 0) AS IsAKit, 
          ISNULL(s.IsAPack, 0) AS IsAPack, 
          ISNULL(s.IsSystem, 0) AS IsSystem,
          p.Description
    FROM dbo.Orders_ShoppingCart s WITH (NOLOCK)
    left join dbo.Product p WITH (NOLOCK) on s.ProductID = p.ProductID
    WHERE s.ordernumber = @ordernum
    ORDER by s.ShippingAddressID
    Then further down, you'll need to find the Item template
    Code:
    <xsl:template match="Item" >
    A few lines down from that you'll see where the name is rendered...I would put the description right under there
    Code:
    <!-- Product Name Column -->
    <td id="colProductName"  width="40%">
    	<span id="lblProductName">
    		<xsl:value-of select="aspdnsf:GetMLValue(OrderedProductName)" />
    		<xsl:if test="OrderedProductVariantName != ''">
    			<xsl:text>-</xsl:text>
    			<xsl:value-of select="aspdnsf:GetMLValue(OrderedProductVariantName)" />
    		</xsl:if>
    	</span>
    	<br/>
    	<span id="lblProductDescription">
    		<xsl:value-of select="aspdnsf:GetMLValue(Description)"/>
    	</span>
    and that's all there is to it
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    chamberinternet is offline Member
    Join Date
    Jul 2009
    Posts
    30

    Default

    Thanks again George... That worked great!

    Shafiq :sK
    Using AspDotNetStorefront ML 8.0.1.2

  4. #4
    servicedesk is offline Junior Member
    Join Date
    Sep 2009
    Posts
    2

    Default Variant description?

    Can this apply to the variant description?