BUG: Expressions That Are Created by Using the Discount Product Picker May Not Be Saved (314124)



The information in this article applies to:

  • Microsoft Commerce Server 2000

This article was previously published under Q314124

SYMPTOMS

When you use Product Picker to create a catalog expression in a discount to define the Product that the discount applies to (and optionally later for the award product), Product Picker tries to save this new expression by using the Product title in Expression Name. If the expression name already exist (one that you created manually from Catalog expressions in Campaign Expressions, and that you saved with the same expression name), the new expression does not save, and Product Picker uses the existing expression (which may be a different product) the discount. There is no indicator that this behavior has occurred.

Also (a secondary problem), when Product Picker saves the catalog expression, it takes only the first 30 characters of the Product title to use for the Expression name. If the Product title is longer than 30 characters, this expression name is saved truncated. When you open the discount again, it uses the full product title in the search expression when it searches for its associated catalog expressions. If the product title is longer than 30 characters, the discount defaults to [Any Product].

CAUSE

This problem occurs because the solution Business Desk (BizDesk) cannot handle this duplication senario.

The 30 character expression name limit is by design.

RESOLUTION

To resolve this problem, use the new pages that Microsoft provides to fix this issue.

The fix consists of sample Pages for the Retail Sample Site Business Desk. If the Expression Name already exists, the new pages prompt you to type a new Expression Name. If you have not changed the BizDesk, use these files. Put these files in the Marketing folder that is in the Business Desk folder.
  • Discitem.asp
  • Dlg_ExpressionName1.asp
  • Dlg_ExpressionName2.asp
  • Response_campitem.asp
  • Targetexpr.asp
If you have changed the Business Desk, examine these fix files to understand the changes that were made, and then include these changes in your Business Desk environment. The following is a list of these changes:
  • OpenProductPicker in discitem.asp
  • Line 1098 of inline code in discitem.asp (ExpressionName = Left(Trim(aReturnValues1(1)), 30))
  • aSetExpressions in response_campitem.asp
  • Line 61 of inline code in targetexpr.asp
  • Line 388 of inline code in targetexpr.asp (ExpressionName = Left(Trim(aExprBody(1)), 30))
  • ProductPickerSaving in targetexpr.asp
  • ShowProductPickerdlg in targetexpr.asp
The following is a list of the new functionality that is included:
  • Added new function: bIsExpressionNameUnique in targetexpr.asp.
  • Added a hidden input to the ProdPickForm definition.
  • Added the following two files: Dlg_ExpressionName1.asp and Dlg_ExpressionName2.asp.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

NOTE: This procedure uses the Booksfull.xml sample catalog that is included with Commerce Server 2000.
  1. Import the Booksfull.xml sample catalog.
  2. Open BizDesk, click Campaigns, click Campaign Expressions, and then click Catalog expressions.
  3. Create a new catalog expression that has the following settings:
    • In Name, type Code.
    • In Target conditions, type Title, is equal to, and Writing Solid Code.
  4. Save the expression.
  5. Click Campaigns, and then click Campaign Manager.
  6. Create a new Customer.
  7. Create a new Campaign.
  8. Create a new discount.
  9. In discount Definition, Buy, in the drop-down list, click Product Picker.
  10. In Categories, click Development tools.
  11. In the Products in Catagory list, click Code.
  12. Click OK.
  13. Save the discount.
  14. Click Campaigns, click Campaign Expressions, and then click Catalog expressions.
  15. Open the expression named Code.
  16. Note that the Target conditions for this expression are Title, is equal to, and Writing Solid Code, and not Code, which you specified in Product Picker. Your discount uses the wrong catalog expression.

Steps to Reproduce the Secondary Problem

NOTE: This procedure uses the Booksfull.xml sample catalog that is included with Commerce Server 2000.
  1. Import the Booksfull.xml sample catalog.
  2. Click Campaigns, and then click Campaign Manager.
  3. Create a new Customer.
  4. Create a new Campaign.
  5. Create a new discount.
  6. In discount Definition, Buy, in the drop-down list, click Product Picker.
  7. In Categories, click Development tools.
  8. In the Products in Catagory list, click Microsoft Mastering: Microsoft Visual Basic 6.0 Fundamentals.
  9. Click OK.
  10. Save and then close the discount.
  11. Reopen the discount, and the view the discount Definition, Buy area. Note that [Any Product] is set, instead of the book that you selected by using Product Picker. (The discount cannot locate the expression Microsoft Mastering: Microsoft Visual Basic 6.0 Fundamentals.)
  12. Click Campaigns, click Campaign Expressions, and then click Catalog expressions.
  13. Note that Product Picker has created and then saved a new Catalog Expression named Microsoft Mastering: Microsoft, which is the first 30 character of the product title.

Modification Type:MinorLast Reviewed:9/26/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix KB314124