Fixed: variant product selection trashes image
The variant products' images are being saved in the variable IMG encoded as urls,
thus selecting the variant triggers an image override with an unsuitable file name.
Thanks: Alex Bodnaru
@@ -349,8 +349,10 @@ if (product) {
contentWrapper = new ProductContentWrapper(imageMap[key], request)
// initial image paths
- detailImage = contentWrapper.get("DETAIL_IMAGE_URL", "url") ?: productContentWrapper.get("DETAIL_IMAGE_URL", "url")
- largeImage = contentWrapper.get("LARGE_IMAGE_URL", "url") ?: productContentWrapper.get("LARGE_IMAGE_URL", "url")
+ detailImage = contentWrapper.getProductContentAsText(product, "DETAIL_IMAGE_URL", request, "string")
+ ?: productContentWrapper.get("DETAIL_IMAGE_URL", "string")
+ largeImage = contentWrapper.getProductContentAsText(product, "LARGE_IMAGE_URL", request, "string")
+ ?: productContentWrapper.get("LARGE_IMAGE_URL", "string")
// full image URLs
detailImageUrl = null
