Magento 1.9 – Configurable Swatch Images Disappeared

databasemagento-1.9product-imagesswatches

After a full migration to the production server I noticed that some filenames of the swatch colors wasn't matching with their respective color attribute name (a code in the filename was in lowercase instead being the opposite), so I took the decision to capitalize the whole filename (except the filename extension) and the attribute value for every color.

As anybody would guess, I renamed all the files in the folder using a Bash script and the attribute values using a SQL update statement, but now none of the swatch images shows up (but the swatches display the attribute name in uppercase as it should be, even in the Admin Panel). The swatch folder (media/catalog/swatches) is gone. The IMG tag is not being created. The source swatch folder (media/wysiwyg/swatches) where the files are uploaded, is OK.

I flushed the swatch image cache (then the whole cache) and reindexed the Product Attributes index (then all the indexes). Exception.log says nothing about the issue.

Seems like something is broken but I don't know what.

Best Answer

Finally I found it! Obviously I've completely forgot the rules to create a configurable swatch value: the filename should be in lowercase (which it isn't) and the attribute value should be in lowercase too or camelized (which it isn't neither).

http://www.venustheme.com/configurable-swatches-guide-for-magento-1-9-1/

So, changing both from uppercase to lowercase fix the problem!

Related Topic