Feature Pack 7 or laterDB2Oracle

Enabling interim fix JR54507

Interim fix JR54507 resolves an issue where promotion codes that are created in a workspace task cannot be applied to a shopping cart to complete a shopping flow in workspace preview. By applying the interim fix, you can enable the use of promotion codes during a shopping flow in workspace preview.

Before you apply this fix, when a user is working on approved content in an authoring environment and applies a promotion code to an order when the user is previewing the store, the promotion code is redeemed and can no longer be used. When the content and data from the authoring environment is propagated to the production environment, the promotion code is considered redeemed. If a shopper has provided the code and the redemption limit for the code is reached, the shopper is unable to apply the code to an order. If users preview the shopping flow in a workspace, ensure that the users do not submit an order when they are working on approved content and previewing the store.

With this fix enabled, unique promotion codes can be used within workspace preview without affecting the use of the same promotion code outside of the workspace. When a code is applied to an order while a user is previewing a store in a workspace, the code is applied within only that workspace. When the corresponding task group is approved, the promotion code is still available for redemption when the user is working on approved content or when a shopper is submitting an order in the actual store. If a promotion code is created by a user when the user is working on approved content and is not redeemed outside of workspaces, the code can be used in multiple workspaces when users preview the store.

Notes:
  • A unique promotion code that is generated in a workspace cannot be used in a shopping flow outside of that workspace until the task group that the code was generated within is approved. When a user is previewing content within the workspace, a unique code can be used to test the shopping flow for how a promotion is applied. When the task group is approved, the code is available for a shopper to use in the storefront.
  • When a promotion code that was created by a user working on approved content is modified within a workspace, the code that was created outside of the workspace can still be used in the storefront and in the workspace. The modified promotion code can also be used within the workspace until the changes to the code are approved. After the changes are approved, only the changed code can be used.
  • If a user redeems a promotion code when the user is previewing approved content, the code is redeemed and cannot be used by a shopper on the storefront.

If you require this interim fix, complete the following procedure to enable the fix on your environment.

Before you begin

Ensure that you complete the following tasks:
  • Ensure that you enable shopping flow preview for workspaces. For more information, see Enabling shopping flow preview for workspaces.
  • Install and enable the interim fix for JR53979. For more information about downloading and installing this fix, see JR53979. For more information about enabling this fix, see Enabling interim fix JR53979.
  • Install the interim fix for JR54507. For more information about downloading and installing this fix, see JR54507.
Note: This fix is not supported for Apache Derby databases.

Procedure

  1. Update the wc-order-resource-managers.xml file to add the ORDPROMOCD database table as a managed asset in workspaces.
    This table stores information about promotion code usage in orders. For more information about these assets, see Workspace managed assets.
    1. Go to the following directory.
      • WC_eardir/xml/content-management
      • workspace_dir\wc\xml\content-management
    2. Open the wc-order-resource-managers.xml file for editing.
    3. Add the following code within the wc:OperationalResources section of the file:
      <wc:OperationalResource name="ORDPROMOCD" resourceClassName="" managed="true" resource="ORDPROMOCD" />
      Your updated file can resemble the following code snippet:
      
      <wc:ResourceContainer xsi:schemaLocation="http://www.ibm.com/xmlns/prod/WebSphereCommerce xsd/wc-resource-managers.xsd">
        <wc:ManagedResources>
          ...
        </wc:ManagedResources>
        <wc:OperationalResources>
          ...
          <wc:OperationalResource name="ORDPROMOCD" resourceClassName="" managed="true" resource="ORDPROMOCD"/>
        </wc:OperationalResources>
        <wc:PublishRequest uniqueTransaction="false"/>
      </wc:ResourceContainer>
    4. Save and close the file.
  2. Run the update workspace schema script to update the workspace schema to include the changes for the ORDPROMOCD table.
    For more information, see Ant target: CM_updateWorkspacesSchema.
    For the value fo the DresourceXMLLocation parameter, use the path to the WC_eardir\xml directory. Do not include the content-management directory in the filepath.
  3. Review the log information to ensure that the script completed successfully to update the ORDPROMOCD table in the base schema.
    By default, the logging information displays in the console when you run the Any script. However, you can include the logfile parameter when you run the script to generate a log file.