A media item in SAP Commerce is not a physical file, but a reference to the file.
A media item in SAP Commerce is a container object that contains references to files. In other words, the media item in SAP Commerce is not the file itself, but a reference to the file. The actual file can be stored in SAP Commerce, or it can be located on a remote server or system.
The media item has an identifier and is assigned to the catalog version. The identifier is used for logical reference, for example, to match product identifiers. Media items can be synchronized with the catalog version to which they are assigned. In this way, you can ensure that the product image matches the catalog version.
In addition, the media item has a URL that points to the actual file location. To reference files in the SAP Commerce application, you need to retrieve and use the URL of the media item.
In the figure, the catalog Clothescatalog contains a catalog version (Online), which contains a product (30124). This product references two media items; 30124_medium and 30124_thumbnail. The media item 30124_medium refers to the file 30124_medium.jpg, and the media item 30124_thumbnail refers to the file 30124_thumbnail.jpg.
One File per Media, Several Media per File
There is a one-to-one correspondence between media items and physical files.
During directory version synchronization, all media items in the source directory version will be copied. After synchronization, each media item is available twice: once in the source catalog version and once in the target catalog version.
However, the files referenced by the media item will not be copied and can only be used once. The media item in the target directory version saves a reference to the original file instead of creating a separate copy of the media item reference file in the target directory version. This concept is similar to symbolic links.
https:// before the url field, you can view it in the browser:
Grouping Media Using Media Containers
Media items in SAP Commerce can be assigned to each media container for logical grouping. A single media item can only be assigned to one media container, which contains all media items in different formats from a certain media item. For example, a media container can hold all media items of a product, no matter what file type or actual file measurement. Essentially, a media container is a rule for which media items are used for which media format. If the media item has a media format set, the media item can only be assigned to a media container.
Media items contained in the media container:
Media format
Each media item can be assigned a media format. A media format is just a label assigned to a media item, called a logical label. It does not call any functions, such as automatic conversion. For example, if the media item is assigned the "50x50px" media format, it does not mean that the file size must be 50x50 pixels, nor is it automatically converted or scaled to 50x50 pixels. This simply means that the media is assigned the "50x50px" label. You must use a media asset management system to explicitly provide any conversion or rescaling functions.
The screenshot of Media Format in the system is just a tag:
Grouping Media Formats Using Media Contexts
The media context is to the media format what the media container is to the media item. This is a rule about which media format to use in any given context and not others. Essentially, the media context tells the user that if you encounter media items in this media format, please replace them with media items in another media format.
Therefore, the media context defines the mapping of media formats. One entry holds the media format to be replaced, and the other entry holds the media format to be used as the replacement.
The Media Context high-res in the screenshot defines these replacement rules:
Screenshot of assigning media item to product:
More original articles by Jerry, all in: "Wang Zixi":
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。