Developer forum

Forum » PIM » Image patterns with /

Image patterns with /

Jonathan Pascoe
Reply

Hi is there any way to get the image patterns and standard image to work with a product no. that includes a forward slash ?  We have a client with a sudstantial amount of products that are formatted like this example [123-abc/21]  These images do not show in the PIM module or the front end. We made a custom function for the front end  in a previous project but now the customer is using the PIM moduel it would be nice to get all the images there as well and not use a custom string formating function in the front end. Any thoughts, work arounds? It would be surprising if our client was the only one including / or - in the product no.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Forward slash is an issue since it is a path character and not valid for filenames. So we do not have support for it. 

You can create an imagepattern extender by inheriting ImagePatternExtenderBase - it has to methods - ReplaceImagePath and ReplaceFilePath that can be used to manipulate the image pattern lookup before and after the pattern is matched to files. This will work in backend and frontend.

An alternative is to create a custom field and normalize the SKU to something file friendly and use that field instead of SKU to do the pattern match.

BR Nicolai

Votes for this answer: 2
 
Jonathan Pascoe
Reply

Ok thanks. 

 
Tomas Gomez
Reply

Same issue here, thanks for the alternatives :-)

 
Kim Søjborg Pedersen
Reply

Yes of course :)

 

You must be logged in to post in the forum