Regarding child matrix image naming -- my understa...
# suitecommerce
b
Regarding child matrix image naming -- my understanding is that the default naming convention for images that represent multiple options is to provide a
.
as a delimiter in the file name. For example, if two child options where Black and Medium, the image would be named
ABC_Black.Medium-01.jpg
-- Our situation is that many of our options have the
.
character in the value itself. For example,
3.75 inches
-- with the
.
character being the default delimiter this creates an issue with this value.... Is there a default out of the box method of handling this? e.g., some sort of "escaping" of the
.
in the the value? We have a customization in place to address this so that child matrix images are properly shown on the PDP, and it's working, but I would rather get us back to the default method of naming child matrix images.
m
Hi @badgerdigital - could you just change the naming convention in the Setup -> SCA - > Setup Website, then on the images tab? Make it a hyphen or an underscore or similar, then name your images that way. Might mean you need to do a big rename of your files, but would avoid the issue in the future
b
Yes, I see the delimeters. Would that be the structure delimiter?
m
Yep - so it looks like you already have an underscore for the Item ID Delimiter, then if you change the Structure Delimiter to the same you'd have something like this
Also, if you have to go through and rename all your images, there's a blog post here by an incredibly handsome man that might help: https://developers.suitecommerce.com/bulk-rename-product-images
b
How does the out of box solution deal with spaces in option values as it relates to the image name. Having images with spaces in the name would just not sit right with me...
m
Yeah, I personally hate the idea of files with spaces in their names, but our servers actually deal with it OK - I've used "1234.Dark Blue.Small.media.01.jpg" type filenames before and they work fine
b
Thanks -- what about characters that are not allowed (at least on windows) in file names, such as double quote. We have several values of
4"
etc....
Our current solution basically strips spaces and non numeric or alpha characters... as I said, I'd like to get back to "out of the box" -- I could write a script to rename all the images so if I know all the cases are covered it would be worth doing
m
Hmmm, I would generally try to avoid them as they may do something whacky in the URL - that being said, UNIX/Linux handles that kind of thing fine so you would technically be able to use them (I think!), but I don't know how you'd manage them on a WIndows PC if you need to edit, rename or replace them
I'd maybe do some big regex renames to remove special characters, standardise your cases, etc
b
OK, thanks. I understand the scope of the issue now. Much appreciated.