Last updated: Mar 02 2017

Area: Episerver Commerce Applies to versions: 10 and higher
Other versions:

Asset management (Legacy]

Note: The legacy Asset Management system is not available in Commerce versions 11 and up.

Note: Episerver uses the Episerver asset system by default. To enable the legacy Asset management System, set the UseLegacyAssetSystem configuration setting to true in the web.config files of both the Commerce Manager and the front-end sites. For the new system, the value is the default (false or null). If you use the legacy system, the Assets tab in the catalog edting UI is removed.

This topic describes the legacy asset management system and its features, including: customizing assets, displaying assets, securing assets and authorization, and storing data. Episerver Commerce lets you associate assets with products and SKUs. Those associated assets are then available in the Entry.Assets collection. However, you can render and retrieve assets independently. Episerver Commerce also includes controls that let you display or make digital assets downloadable.

Episerver Commerce comes with asset management providers for file storage, MSSQL storage and Amazon S3. You can also create your own asset management provider. See Storing Data for information. 

In this topic

Classes in this topic are available in the following namespaces:

  • Mediachase.Commerce.Assets
  • Mediachase.Commerce.Catalog.Objects
  • Mediachase.Library.AmazonProviders

Item assets

ItemAsset represents an asset association with a SKU. It provides the linking information (SKU and Asset IDs), and is a simple object with properties. The Entry has a collection of these objects representing the assets associated with an entry.

Folder elements

FolderElementEntity

Contains the information pertaining to the asset. Also contains a method to get the virtual URL associated with an asset (GetUrl()).

Contains a static method to create a new asset.

Contains static methods to copy, delete, and move assets.

This object also provides access to custom fields that you create in the Business Foundation {BF} definition of the FolderElement class.

FolderEntity

Represents an asset folder, and is useful when you are navigating the asset hierarchy. Retrieve with EntityManager. This is a Manager class that retrieves FolderElementEntity and FolderEntity objects.

Creating a Folder

The following example creates an asset folder.

Asset providers

BlobStorageProvider

Represents an asset provider and returns information about the provider, to retrieve blob information. In most cases, you do not need to use this provider. If you want to implement complex business logic regarding the storage provider or override business logic in the provider, use BlobStorageProvider.

BlobStorage is a Manager class to retrieve BlobStorageProviders. It also exposes events that can be listened to, for instance when an asset is added, allowing custom logic to be implemented during asset management activities.

BlobInfo

Simple object with blob information about the asset. Its properties are a subset of the FolderElementEntity object.

Four primary database tables have asset information.

  • CatalogItemAsset. Contains the asset to product/SKU mapping.
  • cls_FolderElement. Contains information about the assets.
  • cls_Folder. Contains information about folders in the asset system.
  • McBlobStorage. Contains the asset blob information used by the SqlBlobStorageProvider.

Comments