Disabling commands and views in preview

To exclude a command or view from running within preview:

  1. Determine the name and location of the preview exclusion file. The location and name of the file that lists which commands cannot run within preview is listed in WC_instancename.xml in the PreviewExclusion tag. The example below shows the default file name and location. The name of the file is previewExclusion.xml and it is stored in WC_installdir/xml/config:

    <PreviewExclusion Enabled="true" PreviewExclusionConfigFile="config/previewExclusion.xml" display="false"> </PreviewExclusion>

  2. Open the preview exclusion file in a text editor.
  3. Add the command in a RestrictedCommand tag. For example, to restrict OrderItemUpdate from running within preview, add the following text:<RestrictedCommand>OrderItemUpdate</RestrictedCommand> The resulting file might look similar to the following:<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?> <RestrictedCommands xmlns="http://www.ibm.com/WebSphereCommerce" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/WebSphereCommerce previewExclusion.xsd"> <RestrictedCommand>OrderItemUpdate</RestrictedCommand> </RestrictedCommands>
  4. Save the preview exclusion file.
  5. Open the WebSphere Commerce Administration Console.
  6. Click Configuration > Registry.
  7. Select the box to the left of Preview Command Exclusion and click Refresh. You do not need to restart the WebSphere Commerce server.

Feedback