Introduced in Feature Pack 1

Changing custom fields labels

You can change the labels of custom fields. The product properties Manage Product tab contains a Custom section. In this section, you can change the field labels, or help text to suit your business needs.

Screen capture of the custom fields for a product.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > catalog > propertiesViews.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config > commerce > catalog > propertiesViews.
  3. Modify one of the following files to change the section name, field label, and information help text:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1CatalogPropertyPane.lzx WebSphere Commerce Version 7.0.0.0Feature Pack 1
    1. Open the CatalogPropertyPane.lzx file for editing.
    2. Change the section name by identifying the property group you want to work with.
      • Locate the wcfPropertyGroup tag that controls the name of the Custom section.
        <class extends="wcfPropertyGroup"
        		1groupTitle="${catalogResources.additionalInformationSection.string}"
          	name="catManageAdditionalInformation" open="false">  
        The value of the groupTitle attribute controls the name of the Custom section. To change the section name, change the value of the groupTitle attribute using the resource bundle to define the text for user interface.
    3. Change the field label and information help text by identifying the property widget label you want to work with. For example, to change the label and information help text for Field1 widgets:
      • Locate the wcfPropertyStepper tag that controls the Field 1 (Integer) label and information help text.
        <!-- Property: Field 1. A custom input box for the catalog entry property. -->    
        <wcfPropertyStepper
        	minimumValue="-2147483648"
         	maximumValue="2147483647" 
         	objectPath="CatalogEntryExtraProperties"
         	1promptText="${catalogResources.catalogEntryExtraPropertiesField1_DisplayName.string}" 
        	propertyName="xprop_field1"
         	2extendedHelpText="${catalogResources.extendedHelpText_field1.string}"/>     
        To change the label and information help text, change the value of the promptText attribute and extendedHelpText attribute using a resource bundle to define the text for user interface.
    4. Repeat the previous step for the other fields: Field 2 (Integer), Field 3 (Decimal), Field 4 (Text), and Field 5 (Text).
    5. Save your changes.
    Introduced in Feature Pack 2CatalogPropertyPane.def Introduced in Feature Pack 2
    1. Open the CatalogPropertyPane.def file for editing.
    2. Change the section name by identifying the property group you want to work with.
      • Locate the PropertyGroup element that controls the name of the Custom section.
        <PropertyGroup definitionName="catManageAdditionalInformation"
        	groupTitle="${catalogResources.additionalInformationSection}" open="false">
        The value of the groupTitle attribute controls the name of the Custom section. To change the section name, change the value of the groupTitle attribute using the resource bundle to define the text for user interface.
    3. Change the field label and information help text by identifying the property widget label you want to work with. For example, to change the label and information help text for Field1 widgets:
      • Locate the PropertyStepper element that controls the Field 1 (Integer) label and information help text.
        <PropertyStepper
        	extendedHelpText="${catalogResources.extendedHelpText_field1}"
        	maximumValue="2147483647" minimumValue="-2147483648"
        	objectPath="CatalogEntryExtraProperties"
        	promptText="${catalogResources.catalogEntryExtraPropertiesField1_DisplayName}"
        	propertyName="xprop_field1"/>
        To change the label and information help text, change the value of the promptText attribute and extendedHelpText attribute using a resource bundle to define the text for user interface.
    4. Repeat the previous step for the other fields: Field 2 (Integer), Field 3 (Decimal), Field 4 (Text), and Field 5 (Text).
    5. Save your changes.
  4. Modify one of the following files to change the name of the fields in the grid.
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1CatalogEntryGrid.lzx WebSphere Commerce Version 7.0.0.0Feature Pack 1
    1. Open the CatalogEntryGrid.lzx file for editing.
    2. Change the field name in the grid. For example, to change the grid name for Field1:
      • Locate the wcfGridStepper tag that controls Field 1 name in grid.
        <wcfGridStepper name="xprop_field1"
        	minimumValue="-2147483648"
         	maximumValue="2147483647"
         	objectPath="CatalogEntry/CatalogEntryExtraProperties"
         	propertyName="xprop_field1"
         1text="${catalogResources.productField1_ColumnHeader.string}"
        	visible="false" width="120"/>
        To change the field name in the grid, change the value of the text attribute using a resource bundle to define the text for user interface.
      • Repeat the previous step for the other fields: Field 2 (Integer), Field 3 (Decimal), Field 4 (Text), and Field 5 (Text).
      • Save your changes.
    Introduced in Feature Pack 2CatalogEntryGrid.def Introduced in Feature Pack 2
    1. Open the CatalogEntryGrid.def file for editing.
    2. Change the field name in the grid. For example, to change the grid name for Field1:
      • Locate the GridStepper element that controls Field 1 name in grid.
        <GridStepper maximumValue="2147483647" minimumValue="-2147483648"
        	name="xprop_field1" objectPath="CatalogEntry/CatalogEntryExtraProperties"
        	propertyName="xprop_field1"
        	text="${catalogResources.productField1_ColumnHeader}" visible="false"
        	width="120"/>
        To change the field name in the grid, change the value of the text attribute using a resource bundle to define the text for user interface.
      • Repeat the previous step for the other fields: Field 2 (Integer), Field 3 (Decimal), Field 4 (Text), and Field 5 (Text).
      • Save your changes.
  5. Restart the test server.

What to do next

After you complete your customization:
Version Steps
  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This setting is the default environment setting.
  2. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your changes to your production environment.
Introduced in Feature Pack 2
  1. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  2. Deploy your changes to your production environment.