AjaxSwatches icon indicating copy to clipboard operation
AjaxSwatches copied to clipboard

Swatches don't work for attribute labels that have accented uppercase letters

Open erikagiroux opened this issue 9 years ago • 1 comments

In the original attachConfigurableProductChildrenAttributeMapping function, the array keys are normalized using Mage_ConfigurableSwatches_Helper_Data::normalizeKey (which uses mb_strtolower). In your version, the keys are normalized using a regular strtolower, which doesn't work with special characters.

For example, I have an attribute called "Érable" for which the swatch image won't show because it's looking for a key called "érable" but the actual key is "Érable" because it was not normalized properly.

erikagiroux avatar May 12 '16 15:05 erikagiroux

I tested the recent version of the module locally and noticed the same issue (still running an old version from 2015 in production which is working fine). If an option label contains a special character like á or è, the JSON which is used to create the swatches will contain "null" instead of the option label and result in a JS error on the frontend.

philspbr avatar Jun 03 '16 14:06 philspbr