To exclude a command or view from running within preview:
- 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>
- Open the preview exclusion file in a text editor.
- 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>
- Save the preview exclusion file.
- Open the WebSphere Commerce Administration Console.
- Click Configuration > Registry.
- Select the box to the left of Preview Command Exclusion and click Refresh. You do not need to restart the WebSphere Commerce server.