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

Depending on the type of object you are removing or deleting, the steps that are involved can differ:
  • 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 HCL Commerce. Do not delete or change the source code for any Commerce Composer object that is provided by default with HCL 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.

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 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.
  3. Use the Data Load utility to remove the Commerce Composer object from Management Center for your store.
    1. Create a CSV input file that identifies the Commerce Composer object that you want 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 you are deleting a custom widget, layout template, or page, you can reuse the CSV files that were used to create the custom object. If you do not have an existing CSV file, HCL Commerce provides sample CSV files that you can copy and edit for use in deleting your Commerce Composer object. These sample files are in the appropriate subfolder within the following directory:
      • WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer

      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 you are removing a widget that is provided by default with HCL 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 you are removing a layout template that is provided by default with HCL 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.
    You can reuse the configuration files that you were used to create the Commerce Composer objects. If you do not have the configuration files, HCL 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:
    • WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer
  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 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 HCL Commerce from your store or stores, do not delete the storefront and Management Center assets for the widget.
  8. Rebuild the LOBTools project.
  9. Restart the HCL Commerce server.

Results

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