We have been running EPiServer Commerce for quite a while now. I think we first started around the release of EPiServer CMS 7. We are importing our product catalog from a different system (PIM), called inRiver using the offical EPiServer adapter.
For quite some time ago it came to my attention that EPiServer commerce is supposed to show nice thumbnails for the products in the commerce interface. This has NEVER ever worked for us. When I took an EPiServer Commerce class 1 year ago I talked about this with my teacher and we tried to resolve it a bit over email. Unfortunately a conclusion was never reached.
On our site. This function: ServiceLocator.Current.GetInstance().GetThumbnailUrl(product.CatalogContent, "Thumbnail") ALWAYS returns an empty string for some reason. And the "/globalassets/inRiver/Resources/{bild.jpg}/thumbnail/" url does not work (returns 404).
I was told to try writing a scheduled job and run:
_thumbnailManager.CreateImageBlob(content.BinaryData, ”BinaryData”, new ImageDescriptorAttribute())
So I wrote code that runs this for the entire product catalog:
var thumbnail = thumbnailManager.CreateImageBlob(
mediaData.BinaryData,
"BinaryData",
new ImageDescriptorAttribute());
var clone = (MediaData)mediaData.CreateWritableClone();
clone.Thumbnail = thumbnail;
contentRepository.Save(
clone,
mediaData.GetForceCurrentVersionSaveAction(),
AccessLevel.NoAccess);
After this these urls: /globalassets/inRiver/Resources/{bild.jpg}/thumbnail/ suddenly work for affected products but ServiceLocator.Current.GetInstance().GetThumbnailUrl(product.CatalogContent, "Thumbnail") still returns an empty string for everything.
I responded with this information and was told it would be forwarded to someone in the know. It is now 2016-09-13, almost 1 year later. Does anyone know how this works now?
Hello,
We have been running EPiServer Commerce for quite a while now. I think we first started around the release of EPiServer CMS 7. We are importing our product catalog from a different system (PIM), called inRiver using the offical EPiServer adapter.
For quite some time ago it came to my attention that EPiServer commerce is supposed to show nice thumbnails for the products in the commerce interface. This has NEVER ever worked for us. When I took an EPiServer Commerce class 1 year ago I talked about this with my teacher and we tried to resolve it a bit over email. Unfortunately a conclusion was never reached.
On our site. This function: ServiceLocator.Current.GetInstance().GetThumbnailUrl(product.CatalogContent, "Thumbnail") ALWAYS returns an empty string for some reason. And the "/globalassets/inRiver/Resources/{bild.jpg}/thumbnail/" url does not work (returns 404).
I was told to try writing a scheduled job and run:
_thumbnailManager.CreateImageBlob(content.BinaryData, ”BinaryData”, new ImageDescriptorAttribute())
So I wrote code that runs this for the entire product catalog:
var thumbnail = thumbnailManager.CreateImageBlob(
mediaData.BinaryData,
"BinaryData",
new ImageDescriptorAttribute());
var clone = (MediaData)mediaData.CreateWritableClone();
clone.Thumbnail = thumbnail;
contentRepository.Save(
clone,
mediaData.GetForceCurrentVersionSaveAction(),
AccessLevel.NoAccess);
After this these urls: /globalassets/inRiver/Resources/{bild.jpg}/thumbnail/ suddenly work for affected products but ServiceLocator.Current.GetInstance().GetThumbnailUrl(product.CatalogContent, "Thumbnail") still returns an empty string for everything.
I responded with this information and was told it would be forwarded to someone in the know. It is now 2016-09-13, almost 1 year later. Does anyone know how this works now?