Microsoft KB Archive/832857

= A discount that has a profile-based Eligibility Requirement is not applied in the Retail2002 Solution site =

Article ID: 832857

Article Last Modified on 2/11/2004

-

APPLIES TO


 * Microsoft Commerce Server 2002 Standard Edition
 * Microsoft Commerce Server 2002 Service Pack 1
 * Microsoft Commerce Server 2002 Service Pack 2

-





SYMPTOMS
If a discount that was created in the Microsoft Commerce Server Retail2002 Solution site contains a profile-based Eligibility Requirement, the discount is not applied to an item in the shopping cart. If you remove the profile-based Eligibility Requirement, the discount is applied to the product as expected.



CAUSE
The pipelineinfo function in the Txcontext.vb file prevents discounts that have profile-based Eligibility Requirements from being applied.



RESOLUTION
To resolve this problem, modify the following function in the Txcontext.vb file. By default, the Txcontext.vb file is located in the :\Inetpub\Retail2002\Controls\Transactions folder.

Note  is a placeholder for the drive letter of the drive where this folder is installed. Private Function NewPipelineInfo(ByVal pipelineName As String) As PipelineInfo

Dim pipeInfo As PipelineInfo

pipeInfo = New PipelineInfo(pipelineName) pipeInfo.Item(&quot;catalog_language&quot;) = Thread.CurrentThread.CurrentUICulture.Name

NewPipelineInfo = pipeInfo End Function The modified code appears as follows. Private Function NewPipelineInfo(ByVal pipelineName As String) As PipelineInfo

Dim pipeInfo As PipelineInfo

pipeInfo = New PipelineInfo(pipelineName) pipeInfo.Item(&quot;catalog_language&quot;) = Thread.CurrentThread.CurrentUICulture.Name

‘ New code begins.

If Not (AccountManager.UserProfile Is Nothing) Then pipeInfo.Profiles.Add(&quot;User&quot;, AccountManager.UserProfile) End If

If Not (CommerceContext.Current.TargetingSystem.TargetingContextProfile Is Nothing) Then pipeInfo.Profiles.Add(&quot;TargetingContext&quot;, CommerceContext.Current.TargetingSystem.TargetingContextProfile) End If

‘ New code ends.

NewPipelineInfo = pipeInfo End Function After you modify the code in the Txcontext.vb file, rebuild the solution, and then restart Microsoft Internet Information Services (IIS).



STATUS
Microsoft has confirmed that this is a problem in the Retail2002 Solution site.



MORE INFORMATION
Eligibility Requirements specify which users the discount applies to. Eligibility Requirements are also known as target expressions. If the target expression evaluates to True, the discount is applied.

For more information about Eligibility Requirements, see the &quot;Discount Eligibility Requirements&quot; topic in the Commerce Server 2002 documentation.

Keywords: kblogin kbcodesnippet kbprb kbcode KB832857

-

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

© Microsoft Corporation. All rights reserved.