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:
Shared Function MakeOrder()

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

Add Feedback