Adding an 'Order Placed By' field to AspDotNetStorefront Receipts and Emails

Since customers are frequently impersonated by Admins for the purposes of ordering (that is, reps are admins that placed orders for their customers through the use of impersonation), we need to capture with each order the ID of the user who placed the order for them. 

Receipts, customer, and distributor email also will show "Order Placed By" language.

1.  Add the PhoneOrderCustomerID column to the Orders table.
ALTER TABLE [dbo].[Orders]
ADD PhoneOrderCustomerID int

2. Add the code when the customer checks out that will update the new column with the admin’s CustomerID:
Updated Files:
ASPDNSFGateways\Gateway.vb
Shared Function MakeOrder()

3. Update the receipts and distributor xml files:
\XmlPackages\notification.receipt.xml.config
\XmlPackages\notification.distributor.xml.config
<xsl:if test="PhoneOrderCustomerID != ''">
  Order Placed By: <xsl:value-of select="PhoneOrderCustomerID" />
</xsl:if>


Article ID: 10, Created On: 4/12/2012, Modified: 4/12/2012