Set Up Sample Data
Elastic Path provides a set of sample data with the react-pwa-reference-storefront
project. Use the sample data for testing purposes.
Prerequisite
You need a valid Elastic Path development environment.
Configuring Sample Data
From the
react-pwa-reference-storefront/data
directory, extract the sample catalog data contents into theep-commerce/extensions/database/ext-data/src/main/resources/data
directory.In the
ep-commerce/extensions/database/ext-data/src/main/resources/data/
directory, update theliquibase-changelog.xml
file with the following sample data:<include file="ep-blueprint-data-bellevie_{version}/liquibase-changelog.xml" relativeToChangelogFile="true" />
note
In the previous code block, ensure that you replace
{version}
with the version of Elastic Path Commerce that you are using.In the
ep-commerce/extensions/database/ext-data/src/main/resources/environments/local/data-population.properties
file, set theliquibase.contexts
property todefault,shared-data,ep-blueprint
:liquibase.contexts=default,shared-data,ep-blueprint
In the command line, navigate to the
ep-commerce/extensions/database
module.To run the Data Population tool, run the following command:
mvn clean install -Preset-db
For more information about populating the database, see the Populating the Database section.