A discount that has a profile-based Eligibility Requirement is not applied in the Retail2002 Solution site (832857)
The information in this article applies to:
- Microsoft Commerce Server 2002
- Microsoft Commerce Server 2002 SP1
- Microsoft Commerce Server 2002 SP2
SYMPTOMSIf 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.CAUSEThe pipelineinfo function in the Txcontext.vb file prevents discounts that have profile-based Eligibility Requirements from being applied.RESOLUTIONTo resolve this problem, modify the following function in the Txcontext.vb file. By default, the Txcontext.vb file is located in the Drive:\Inetpub\Retail2002\Controls\Transactions folder. Note Drive 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("catalog_language") = 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("catalog_language") = Thread.CurrentThread.CurrentUICulture.Name
' New code begins.
If Not (AccountManager.UserProfile Is Nothing) Then
pipeInfo.Profiles.Add("User", AccountManager.UserProfile)
End If
If Not (CommerceContext.Current.TargetingSystem.TargetingContextProfile Is Nothing) Then
pipeInfo.Profiles.Add("TargetingContext", 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 INFORMATIONEligibility 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 "Discount Eligibility Requirements" topic in the Commerce Server 2002 documentation.
Modification Type: | Major | Last Reviewed: | 2/11/2004 |
---|
Keywords: | kbprb kbCodeSnippet kbcode kblogin KB832857 kbAudDeveloper kbAudITPRO |
---|
|