Microsoft KB Archive/261587

= Doc Error: Send a Purchase Confirmation by E-mail =

Article ID: 261587

Article Last Modified on 7/15/2004

-

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. / /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(&quot;email_subject&quot;) orderform.[_email_body] = mscsMessagemanager.GetMessage(&quot;email_body&quot;) _ & chr(10) & chr(13) & _ mscsMessagemanager.GetMessage(&quot;email_tracking&quot;) & orderform.[order_id] _ & chr(10) & chr(13) & _ mscsMessagemanager.GetMessage(&quot;email_total&quot;) & _ mscsDataFunctions.Money(CLng(orderform.[_total_total])) _ & chr(10) & chr(13) & _ MSCSMessageManager.GetMessage(&quot;email_receipt&quot;) & _ mscsPage.URL(&quot;receipt_view.asp&quot;, &quot;order_id&quot;, 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(&quot;Commerce.Page&quot;) 'instantiates a Commerce.Page object Set pipeContext(&quot;Page&quot;) = 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(&quot;email_subject&quot;) orderform.[_email_body] = mscsMessagemanager.GetMessage(&quot;email_body&quot;) _ & chr(10) & chr(13) & _ mscsMessagemanager.GetMessage(&quot;email_tracking&quot;) & orderform.[order_id] _ & chr(10) & chr(13) & _ mscsMessagemanager.GetMessage(&quot;email_total&quot;) & _ mscsDataFunctions.Money(CLng(orderform.[_total_total])) _ & chr(10) & chr(13) & _ MSCSMessageManager.GetMessage(&quot;email_receipt&quot;) & _ mscsPagePipe.URL(&quot;receipt_view.asp&quot;, &quot;order_id&quot;, 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.

Keywords: kbinfo kbfix KB261587

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.