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.

Managing Assets

Managing Assets

Application and store assets are located in extensions/assets/.

Application Assets

The following application assets are required to run Commerce Manager Client.

  • cmassets - Commerce Manager assets, containing velocity templates used in the Commerce Manager Client.
  • content-wrappers - Template files (.xml and .cwt) that define how a particular content type is displayed and what information is required to display it.
  • import - Commerce Manager .csv files, (used for importing products, jobs, catalogs, etc)

Store Assets

Store assets are used by Cortex and the Integration Server. These assets include:

  • dynamiccontent (assets used by your Dynamic Content definitions)
  • themes (Velocity templates and properties used for formatting email messages)

Using Assets Locally

To use local assets for development:

  1. In your settings.xml, configure the ep.local.asset.path property to point to the assets source folder as described in Configure Maven Settings.xml.
  2. Re-populate your local database following the Populate the Database instructions. This updates the COMMERCE/STORE/ASSETS/assetLocation setting value in the database.

Deploying Assets for Production

When you build a deployment package using the extensions/packager module, an ext-assets.zip package is included in the the deployment package.

Assets are typically deployed to a local file system directory on each VM running the Elastic Path servers. The asset location is specified by the ep.local.asset.path property in the Data Population filtering.properties file. For more information, see Data Population Acccelerator Kit.

Specifying the Asset Path

You can change the asset path by modifying the assetLocation setting in Commerce Manager Client.

To change assetLocation:
  1. Log on to the Commerce Manager Client.
  2. In the Activity menu, choose Configuration.
  3. In the Configuration menu, choose System Configuration.
  4. In the Filter, enter COMMERCE/STORE/ASSETS/assetLocation.
  5. In the Setting Name menu, select the assetLocation setting.
  6. Under Defined Values, select the default setting and click the Edit... button.
  7. Under Value, enter your new asset location.
  8. Click Save to apply your changes.

Specifying the Assets Server URL

The assetServerBaseUrl setting defines the URL for your media assets. For example, if assetServerBaseUrl was https://media.samplestore.com for www.samplestore.com; then, image URLs would be: https://media.samplestore.com/thumbnail_hd.jpg

You can change the assets server URL by modifying the assetServerBaseUrl setting in the Commerce Manager Client.

To change assetServerBaseUrl:

  1. Log on to the Commerce Manager Client.
  2. In the Activity menu, choose Configuration.
  3. In the Configuration menu, choose System Configuration.
  4. In the Filter, enter COMMERCE/STORE/ASSETS/assetServerBaseUrl.
  5. In the Setting Name menu, select the assetServerBaseUrl setting.
  6. Under Defined Values, click the New... button.
  7. Under Context, enter your StoreCode.
  8. Under Value, enter your asset server URL.
  9. Click Save to apply your changes.