Doc Error: Send a Purchase Confirmation by E-mail (261587)



The information in this article applies to:

  • Microsoft Site Server 3.0 Commerce Edition

This article was previously published under Q261587

SYMPTOMS

If you follow the procedure described in the Send a Purchase Confirmation by E-mail section in the Commerce 3.0 online documentation (specifically the Link to the Order Receipt Page section), the following error message displays in the browser when you attempt to complete an order:
Commerce.MtsTxPipeline error '80020101' [Volcano Coffee]Component Execution failed for component[0x5] hr: 0x80020101 ProgID: Commerce.Scriptor.1 MscsExecute() failed. Script invocation failed. Object required: 'mscsPage' Line: 7. /<storename>/include/util.asp, line 128

CAUSE

The procedure described in the Link to the Order Receipt Page section contains an error, in which the following code snippet (Email.vbs) makes a call to the mscspage object, which does not exist in the PipeContext dictionary.
Function mscsexecute(config, orderform, context, flags)
    Dim mscsMessageManager, mscsDataFunctions 
    Set mscsMessagemanager = context.MessageManager
    Set mscsDataFunctions = context.DataFunctions
        
    orderform.[_email_subject] = mscsMessagemanager.GetMessage("email_subject")
    orderform.[_email_body] = mscsMessagemanager.GetMessage("email_body") _
            & chr(10) & chr(13) & _
        mscsMessagemanager.GetMessage("email_tracking") & orderform.[order_id] _
            & chr(10) & chr(13) & _
        mscsMessagemanager.GetMessage("email_total") & _
            mscsDataFunctions.Money(CLng(orderform.[_total_total])) _
            & chr(10) & chr(13) & _
        MSCSMessageManager.GetMessage("email_receipt") & _
            mscsPage.URL("receipt_view.asp", "order_id", orderform.[order_id])
    mscsexecute = 1
End Function
				

RESOLUTION

For this sample code to work, you need to make the following modifications:

  • Add the following lines to the beginning of the UtilGetPipeContext function in the \Include\Util.asp or i_util.asp page:
    set mscspagePipe = server.CreateObject("Commerce.Page") 'instantiates a Commerce.Page object
    Set pipeContext("Page") = mscsPagePipe  'adds the Commerce.Page object to the pipecontext dictionary
    					
  • Modify Email.vbs to read as follows:
    Function mscsexecute(config, orderform, context, flags)
        Dim mscsMessageManager, mscsDataFunctions, mscsPagePipe  'initializes containers for pipecontext objects
        Set mscsMessagemanager = context.MessageManager
        Set mscsDataFunctions = context.DataFunctions
        Set mscsPagePipe = context.Page  'sets mscsPagePipe object equal to the Commerce.Page object from the pipecontext dictionary
            
        orderform.[_email_subject] = mscsMessagemanager.GetMessage("email_subject")
        orderform.[_email_body] = mscsMessagemanager.GetMessage("email_body") _
                & chr(10) & chr(13) & _
            mscsMessagemanager.GetMessage("email_tracking") & orderform.[order_id] _
                & chr(10) & chr(13) & _
            mscsMessagemanager.GetMessage("email_total") & _
                mscsDataFunctions.Money(CLng(orderform.[_total_total])) _
                & chr(10) & chr(13) & _
            MSCSMessageManager.GetMessage("email_receipt") & _
                mscsPagePipe.URL("receipt_view.asp", "order_id", orderform.[order_id])
        mscsexecute = 1
    End Function
    					

    The Email.vbs scriptor should now reference the Commerce.Page object through the mscsPagePipe variable added to the PipeContext dictionary.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Site Server version 3.0.

Modification Type:MinorLast Reviewed:7/15/2004
Keywords:kbfix kbinfo KB261587