Developer forum

Forum » PIM » Image pattern - images not shown on product

Image pattern - images not shown on product

Michael Knudsen
Reply

Hello PIM forum!

I have been working on a DW9.8.0 PIM solution, where it have been decided to use 'Alternative Images' and 'Image Pattern'.  In the section of 'File name pattern' it works great with custom fieldnames like {DefaultProductImage}.jpg and {DefaultVariantImage}.jpg even the images aren't shown in the list of images using the 'wrench' icon on the product. Minor issue.

The big issue is in the image pattern section, where several rows have been added with a 'Pattern' like {VariantImage}-0.jpg but for some reason aren't these images shown on the product? Is it not possible to use custom fieldsnames in the pattern?

A clarification would be much appreciated.

PS. Between the file name pattern and the image pattern section is a list of fieldnames shown "{ProductID}, {ProductNumber}, {ProductName}, {GroupID}, {VariantID}, {VariantOptionIdLevel1}, {VariantOptionLevel1}", but do they belong to the file name pattern or the image pattern section?  Or are they there by mistake?

PSS. Documentation mention a number of fields, but do not mention custom fields can be used in 'File name pattern' section. https://doc.dynamicweb.com/documentation-9/ecommerce/product-catalog/product-images#sideNavTitle1-3

 


Replies

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi,

I'm not sure I understand what you are trying to do, with that "Image Pattern" setup you explain.

But I will recomend you to use the new "Improved Image pattern" functionality. You enable it in /Settings/Ecommerce/Advanced configuration/Images (Select all 4 Checkmarks)

After then you on (Warehouse/Shops) can specify Image pattern, to be used for "Product Default image", on both "Main product" and "Variant product"..

If you want to use "Product Customer fields", use the FieldSystemName as "parameter name"

I hope that helps you ..

/Søren

 
Michael Knudsen
Reply

Hello Søren,

My description could perhaps been better, but I'll try clearify:

  • I have selected all 4 checkmarks in /Settings/Ecommerce/Advanced configuration/Images
     
  • The PIM Warehouse have in the section 'File name pattern' the following specified: 
    • 'Main product' is set to {DefaultProductImage}.jpg   !This works, and the image are shown on the product for the PIM editor!
    • 'Variant product' is set to {DefaultVariantImage}.jpg   !This works, and the image are shown on the variant for the PIM editor!
       
  • The PIM Warehouse have 1..N image pattern rules specified (below the section 'File name pattern'):
    1. 'Name' is set to VariantName_0 and 'Pattern' is set to {VariantImage}-0.jpg   !This does not work, and the image is not visible for the PIM editor!
    2. 'Name' is set to VariantName_1 and 'Pattern' is set to {VariantImage}-1.jpg   !This does not work, and the image is not visible for the PIM editor!

All fields (DefaultProductImage, DefaultVariantImage, VariantImage) are using the FieldSystemName.

Attached images shows image pattern configuration and that 'Image pattern' aren't shown on for the PIM editor.

 

 

image-pattern-support.PNG image-pattern-support2.PNG
 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi,

So you have Product fields created with the Systemnames "DefaultProductImage" & "VariantImage" ?

And they contains the wanted value there match the Image-names ?

But I'm a little confused that you use a specific field name to locate the image. I didn't think it made any sense.

Can you please let me know why you have these specific Fields created ?

/Søren

 

 
Michael Knudsen
Reply

Hello Søren,

- yes, I have the Product fields created with the Systemnames "DefaultProductImage", "DefaultVariantImage" and "VariantImage" + they contains a value that match a image-name.

Variant images could be "20492187-997-0.jpg" where "20492187" is the ProductNumber and "997" is the color code (color name for "997" is "Jet black").

Problem is, that variants (Colors) is created with names ie. "Jet black", "Gun metal" etc. - and here comes the "VariantImage" into action, because it contains a combination of ProductNumber and Color code = "20492187-997".

Just as a note, have I tried to hardcode the Image Pattern to "20492187-997-0.jpg" and now the product correctly shows the expected image (but of course for all products). Replacing the hardcoded value with "{VariantImage}-0.jpg" the expected image are not shown.

Attached image shows that 'Image pattern' are shown for the PIM editor, when that Image Pattern is hardcoded..

image-pattern-support3.PNG
 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply
Hi Michael,
 
But I don't understand why your using/define specific ProductCustomFields for that ..
 
If you are using integration to external source (eg. ERP), you can set/update the Product number and Color code from the external source..
 
Then the ImagePattern could look like this (Attached)
 
You could send a request to support, to find out if something are wrong by using "variable Options" on your system
 
 
/Søren
Imagepattern.PNG
 
Michael Knudsen
Reply

Hello Søren,

- I'm using custom fields ("DefaultProductImage", "DefaultVariantImage" and "VariantImage") since documentation mention it's possible to use "custom product fields":

Improved image patterns

Dynamicweb 9.7 introduced a new and faster version of the Image Pattern feature, with new template tags and explicit fallback logic. Like their counterparts, improved image patterns can be built on all standard product fields – but also custom product fields, which makes the new implementation much more flexible.

 

It should be fairly easy to replicate the problem by creating a custom product field (MyCustomField) and add value "cat" to the field. Then add five random cat images (cat-1.jpg, cat-2.jpg, cat-3.jpg, cat-4.jpg and cat-5.jpg) and update the image pattern to have {MyCustomField}-1.jpg etc. in the Image Pattern. Open the product and check if you can see the cat images?

PS. the original take on using Image Pattern was to use standard product fields, but as described in my previous post are variants stored by name and not by code! 

 

 

 
Michael Knudsen
Reply
This post has been marked as an answer

Hello Søren,

- just to let you know, that my issue with image pattern and "custom product fields" is solved in DW 9.8.8.

Issue closed.

 

Votes for this answer: 1

 

You must be logged in to post in the forum