Skip to content

Instantly share code, notes, and snippets.

@piotrekkaminski
Last active August 29, 2015 14:09
Show Gist options
  • Save piotrekkaminski/6e77fca4f109f616eb8d to your computer and use it in GitHub Desktop.
Save piotrekkaminski/6e77fca4f109f616eb8d to your computer and use it in GitHub Desktop.
[PATCH] Fixed issue where language fallback swatch images would not be loaded from media/wysiwyg/swatches
diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
index 2de62ed..c284811 100644
--- a/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
+++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
@@ -227,6 +227,8 @@ class Mage_ConfigurableSwatches_Helper_Productimg extends Mage_Core_Helper_Abstr
$fileExt = self::SWATCH_FILE_EXT;
}
+ // normalize to all lower case so that value can be used as array key below
+ $value = Mage_ConfigurableSwatches_Helper_Data::normalizeKey($value);
$defaultValue = $value; // default to no fallback value
if ($object instanceof Mage_Catalog_Model_Layer_Filter_Item) { // fallback for swatches loaded for nav filters
$source = $object->getFilter()->getAttributeModel()->getFrontend()->getAttribute()->getSource();
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment