Deleting Commerce Composer objects
If you no longer need a specific Commerce Composer object, such as a widget, layout template, layout, or page, you can remove the object from your store and delete the object.
About this task
- To delete a layout or layout assignment, a business user can delete the object within the Commerce Composer tool to remove the object from store pages and Management Center. When a user deletes a layout assignment, the assignment deletes from your system. When a user deletes a layout, the layout is removed from Management Center and marked for delete within the database. As an administrator or developer, you can physically delete the layout from your system by running a scheduled job that invokes the CleanPageLayoutsCmd command. Alternatively you can use the Data Load utility to delete a layout, however this option can take time when multiple layouts are to be deleted. For more information, see Remove marked for delete Commerce Composer layouts.
- To delete a page, an administrator can use the Data Load utility to delete the page. If the page is configured to allow business users to delete the page, a business user can delete the page in the Commerce Composer tool. Within the PLPAGE database table, the DELETABLE column indicates whether a business user can delete a page with the Commerce Composer tool. If the value for this column is 1, then the Data Load utility must be used to either delete the page or update the page to allow a business user to delete the page. If the value for the column is 0, then a business user can delete the page. The default value for this column when a page is created is 1.
- To delete a widget or a layout template from your system, the widget or layout template must be
removed from any layout that uses the object. When the object is no longer used on store pages, the
object registration can be removed and the widget or layout template can be deleted.
Since a widget or layout template can be used on multiple pages and removing the object from all layouts that use it can be difficult, consider phasing out use of the object. As an administrator, you can begin phasing out the use of a widget or layout template by removing the store subscription to the object. Then, when a business user is creating a layout, the user cannot view the object in the Commerce Composer tool to select the template or widget. Existing layouts that use the widget or template however continue to function.
To remove the widget or template from store pages, the registration of the object must be removed. Removing the registration of the object can affect the display of the store pages that used the object. If the widget or layout template must be deleted instead of removed for use in a store, the object registration must first be deleted for all stores. With the object registration removed, the actual source code for the object can be deleted. You must use the Data Load utility to remove the subscriptions and registration of a widget or layout template.Note: Do not remove the registration of any widget or layout template that are provided by default with WebSphere Commerce. Do not delete or change the source code for any Commerce Composer object that is provided by default with WebSphere Commerce.If a widget uses an e-Marketing Spot that is created and Managed with the Marketing tool, removing the subscription or registration of the widget, or deleting the widget, does not affect the e-Marketing Spot.
Procedure
- Open the Commerce Composer tool..
-
Ensure that the object that you want to remove is not in use on a store page.
- If you are deleting a page, ensure that the layout assignment is removed for the page and any links from other pages to the page are removed.
- If you are deleting a layout template, ensure that business users delete any layouts that are based on the layout template. Alternatively, as an administrator, you can use the Data Load utility to delete the layouts. Ensure that any layout assignments for pages that use the layout are deleted before the layout is deleted.
- If you are deleting a widget, ensure that the widget is removed from any layouts that include the widget.
-
Use the Data Load utility to remove the Commerce Composer object from Management Center for
your store.
-
Configure the Data Load utility.
You can reuse the configuration files that you were used to create the Commerce Composer objects. If you do not have the configuration files, WebSphere Commerce provides sample files that you can copy, edit, and use to run the Data Load utility. The sample environment and business object configuration files are in the following directory. The load order configuration files are in the appropriate subfolder:
- WC_installdir/components/foundation/samples/DataLoad/CommerceComposer
- WC_installdir\components\foundation\samples\DataLoad\CommerceComposer
- WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer
- Run the Data Load utility.
- Verify the results of the data load. Ensure that the object you deleted no longer displays in Management Center for the store.
- Optional:
If you are deleting, a widget or layout template, locate the files that define the storefront
and Management Center assets for the widget, layout template within the file system for your store.
You can delete the files specific to the widget or layout template. Edit the remaining files to
remove the code for your custom widget or layout template.
Note: If you are removing a widget that is provided by default with WebSphere Commerce from your store or stores, do not delete the storefront and Management Center assets for the widget.
-
Rebuild the
LOBTools
project. - Restart the WebSphere Commerce server.