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 <dataDirectory>/config/ Specifies the default values that are shared by all environments. You can override these values in environment-specific property files. <configDirectory>/ Specifies environment specific property values. Each environment has its own file. For example, environments/local/
  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 file.
  3. Add environment-specific values to files in each environment directory if the values differ from the default values.

    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 ${} is defined in an import/export data file with a default value as localhost.
    <default_value type="String">${}</default_value>
You can replace the default value with the following environment-specific values:
Environment Value Notes
local${} Uses the value of defined in the .m2/settings.xml file.
dev Uses the test SMTP server URL.
prod Use the production SMTP server URL.