Dear Dynamicweb,
Please see this thread: https://doc.dynamicweb.com/forum/ecommerce-standard-features/include-extension-in-imagepattern?PID=1605, where we urgent need a bug fix.
I have looked into the source code and have marked the issue with yellow below, as found images before the separator (;) are replaced by this line if nothing is found in the second iteration
List<string> foundImages = null;
bool isVariantImageFound = false;
foreach (TokenContainer tokenContainer in pattern.GetPatternTokens())
{
string imagePath = tokenContainer.PatternString;
imagePath = ReplaceTokensInImagePath(product, allSupportedPatternMappings, tokenContainer, imagePath);
foreach (var extender in extenders)
imagePath = extender.ReplaceImagePath(imagePath, product);
if (allFilePaths.TryGetValue(imagePath, out foundImages))
{
for (var i = 0; i < foundImages.Count; i++)
{
foreach (var extender in extenders)
foundImages[i] = extender.ReplaceFilePath(imagePath, product);
if (!string.IsNullOrEmpty(foundImages[i]))
{
foundImagePattern = tokenContainer.PatternString;
if (foundImagePattern.Contains("VariantOption"))
{
isVariantImageFound = true;
}
break;
}
}
}
}
Can this be fixed in this week as we have a client going live Monday and are missing this feature??
Best regards,
Anders