Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Filtering Data

Filtering Data

Follow the following recommendations when creating a new data set:
  1. Follow general XML formatting rules.
  2. Use &amp to get ampersands &.

    Follow the same rule for other special characters.

  3. Avoid using angle brackets or <element> tags as placeholder values.
  4. Use '\\' instead of backslashes ('\').

Placeholder values in data sets are filtered by data population before the database update occurs. This provides a consistent way to define environment-specific values for both SQL and import/export files.

Placeholders values are stored in the following files:
File File Path Description
filtering.properties <dataDirectory>/config/ Specifies the default values that are shared by all environments. You can override these values in environment-specific property files.
filtering.properties <configDirectory>/ Specifies environment specific property values. Each environment has its own filtering.properties file. For example, environments/local/filtering.properties
  1. To create a new placeholder in a data sets, add the placeholder to data using the spring-style placeholder.
    For more information, see Data filtering (property placeholders).
  2. Optional: Add the default value for the place holder to the filtering.properties file.
  3. Add environment-specific values to filtering.properties files in each environment directory if the values differ from the default values.
    Note:

    Elastic Path recommends does not recommend using default values and to add environment-specific values for all environments. If you do not define an environment-specific value, the default value, localhost, is used.

In this example, the placeholder ${ep.smtp.host} is defined in an import/export data file with a default value as localhost.
<configuration_setting>
    <name_space>COMMERCE/SYSTEM/EMAIL/mailHost</name_space>
    <default_value type="String">${ep.smtp.host:localhost}</default_value>
    ...
</configuration_setting>
You can replace the default value with the following environment-specific values:
Environment Value Notes
local ep.smtp.host=${ep.smtp.host} Uses the value of ep.smtp.host defined in the .m2/settings.xml file.
dev ep.smtp.host=smtp-test.company.com Uses the test SMTP server URL.
prod ep.smtp.host=smtp.company.com Use the production SMTP server URL.