Episerver Find version 12.6.0 and Episerver Commerce version 11.2.4
We can access most meta fields for search results by defining them in a custom class for our CatalogContentType:
[CatalogContentType(MetaClassName = "TestProductEntry", DisplayName = "Test Product Entry", Description = "")]
public class TestProductEntry : ProductContent
{
[IncludeValuesInSearchResults]
[DecimalSettings(18, 2)]
public virtual decimal TestPercentage { get; set; }
}
But when it comes to images (field type ImageFile) we have come across a few issues:
We have not found a way in documentation or via trial and error for hard typing the image path as a property like the example above
We are able to load the MetaFile for the image using MetaObject.Load of the product in question. However AssetUrlResolver requires an IAssetContainer type so we can't use it to retrieve the image path.
Generally we recommend to upload your images as assets (aka CMS content) and attach them to them the products via CommerceMediaCollection instead. That would provide a better performance and more flexible way to handle the images.
Hi all,
Episerver Find version 12.6.0 and Episerver Commerce version 11.2.4
We can access most meta fields for search results by defining them in a custom class for our CatalogContentType:
But when it comes to images (field type ImageFile) we have come across a few issues:
How can we retrieve Commerce ImageFile paths?
Thanks!