I am basing this off 9.3.1.0 the notification.receipt.xml.config xmlpackage but previous versions should still be similar.
Before the example there is one issue I want to explain. The productid is not a stock run time parameter of the notification.receipt.xml.config xmlpackage. Mainly because the order uses a table of products. This table is called in a sql query called OrderItems. Therefore we want to make the OrderItems query be this:
Code:
<query name="OrderItems" rowElementName="Item">
<sql>
<![CDATA[
SELECT s.ShoppingCartRecID,
s.OrderNumber,
s.ProductID,
s.VariantID,
s.Quantity,
s.ChosenColor,
s.ChosenSize,
s.OrderedProductName,
s.OrderedProductVariantName,
s.OrderedProductSKU,
s.OrderedProductPrice,
s.OrderedProductRegularPrice,
s.OrderedProductSalePrice,
s.OrderedProductExtendedPrice,
s.OrderedProductQuantityDiscountName,
s.OrderedProductQuantityDiscountID,
s.OrderedProductQuantityDiscountPercent,
s.IsShipSeparately,
s.IsDownload,
s.FreeShipping,
s.TextOption,
s.ShippingMethod,
s.Notes,
s.ExtensionData,
s.CustomerEntersPrice,
s.GiftRegistryForCustomerID,
s.ShippingAddressID,
s.ShippingDetail,
s.SizeOptionPrompt,
s.ColorOptionPrompt,
s.TextOptionPrompt,
s.IsTaxable,
s.TaxClassID,
s.TaxRate,
ISNULL(s.IsAKit, 0) AS IsAKit,
ISNULL(s.IsAPack, 0) AS IsAPack,
ISNULL(s.IsSystem, 0) AS IsSystem,
ISNULL(p.UsageText, '') AS UsageText,
p2.misctext
FROM dbo.Orders_ShoppingCart s WITH (NOLOCK)
Join dbo.Product p2 On p2.ProductID = s.ProductID
Left Join dbo.PromotionLineItem pli On pli.ShoppingCartRecordId = s.ShoppingCartRecId
Left Join dbo.PromotionUsage pu On pu.Id = pli.PromotionUsageId
Left Join dbo.Promotions p On p.Id = pu.PromotionId
WHERE s.ordernumber = @ordernum
ORDER by s.ShippingAddressID
]]>
</sql>
<queryparam paramname="@ordernum" paramtype="runtime" requestparamname="ordernumber" defvalue="0" sqlDataType="int" validationpattern="^\d{1,9}$"/>
<queryparam paramname="@VatEnabled" paramtype="runtime" requestparamname="VAT.Enabled" defvalue="false" sqlDataType="bit" validationpattern=""/>
</query>
Next is to add the misctext to the html ouput. Do this by going to the Item template then add this code to the desired column:
Code:
<xsl:value-of select="misctext" />
Hope that helps.