Deleting Commerce Composer objects

If you no longer need a specific Commerce Composer object, such as a widget, layout template, layout, or page, we can remove the object from the store and delete the object.


About this task

Depending on the type of object we are removing or deleting, the steps that are involved can differ:

To remove and delete a page, widget, or layout template object from your system, complete the following steps:


Procedure

  1. Open the Commerce Composer tool..

  2. Ensure that the object to remove is not in use on a store page.

    • If we 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 we are deleting a layout template, ensure that business users delete any layouts that are based on the layout template. Alternatively, as an administrator, we 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 we are deleting a widget, ensure that the widget is removed from any layouts that include the widget.

  3. Use the Data Load utility to remove the Commerce Composer object from Management Center for the store.

    1. Create a CSV input file that identifies the Commerce Composer object to remove the subscription for or delete and flag the data for deletion. Within the CSV file, ensure that you include the Delete column and set the value for the column to 1 for the row that includes the data.If we are deleting a custom widget, layout template, or page, we can reuse the CSV files that were used to create the custom object. If you do not have an existing CSV file, WebSphere Commerce provides sample CSV files that we can copy and edit for use in deleting your Commerce Composer object. These sample files are in the appropriate subfolder within the following directory:

      Widgets Use CSV files that contain the following information with the value 1 set for the Delete column:

      • To unsubscribe a widget, use a subscribeWidgetdef.csv CSV file.

      • To unregister a widget, use a registerWidgetdef.csv CSV file. If we are removing a widget that is provided by default with WebSphere Commerce, do not unregister the widget.

      • To delete the properties values set for a widget within a layout, use a widgetnvp.csv CSV file.

      • To delete the layout relationship between a widget and a layout, use a layoutWidgetRelationship.csv CSV file.

      Layout templates Use CSV files that contain the following information with the value 1 set for the Delete column:

      • To unsubscribe a layout template container, use a subscribeWidgetdef.csv CSV file.

      • To unregister a layout template container, use a registerWidgetdef.csv CSV file. If we are removing a layout template that is provided by default with WebSphere Commerce, do not unregister the template.

      • To delete the layout relationship between a widget and a layout, use a layoutWidgetRelationship.csv CSV file.

      • To delete the registration of the layout template as a template, use a template.csv CSV file.

      • To remove the additional layout template information that defines the template slots, use a
        slotDefinition.csv CSV file.

      Content pages Use CSV files that contain the following information with the value 1 set for the Delete column:

      • To delete the page information, use a page.csv

      • To delete any remaining layout assignments for the page, use a layoutAssignment.csv CSV file.

      • To delete custom search engine optimization (SEO) properties for the content page, such as the URL keyword, page title, and meta description, use a seopage.csv CSV file.

      • To delete any custom search engine optimization (SEO) descriptive information for the content page, use a seopagedesc.csv CSV file.

  4. Configure the Data Load utility. We 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 we 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:

  5. Run the Data Load utility.

  6. Verify the results of the data load. Ensure that the object you deleted no longer displays in Management Center for the store.

  7. Optional: If we 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 the store. We can delete the files specific to the widget or layout template. Edit the remaining files to remove the code for our custom widget or layout template.

    If we are using removing a widget that is provided by default with WebSphere Commerce from the store or stores, do not delete the storefront and Management Center assets for the widget.

  8. Rebuild the LOBTools project.

  9. Restart the WebSphere Commerce server.


Results

The Commerce Composer object is removed from the store, and deleted from your system.


Related concepts
Developing Commerce Composer assets
Widgets for Commerce Composer
Commerce Composer widget library
Layouts, layout templates, and default layouts
Layout assignments for category pages
Layout assignments for catalog entry pages
Layout assignments for search terms
Pages and page creation


Related tasks
Creating Commerce Composer layout templates
Creating Commerce Composer widgets


Related reference
Remove marked for delete Commerce Composer layouts
Best practices for developing Commerce Composer assets