Magento – Configurable Swatches on Listing Page: Show Multiple Color Attributes

color-swatchesconfigurable-productmagento-1.9swatches

Currently Magento 1.9.1.0 allows to show only a single attribute on the listing page as a swatch (product details page can have multiple attributes showing).

Since I've 30+ manufacturers (and each has about 20+ colors), I've a separate color attribute for each manufacturer. I would like that all of my different color attributes will show on the listing page.

How can I make it happen?

Thank you in advanced for any tip.

Best Answer

In the module the app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php is the helper which determines which _swatchAttributeId should be used.

You could extend this module and rewrite the helper. Rewrite the getSwatchAttributeId function and do you own magic.

You could

  • just add some id logic, Mage::registry('current_category')->getCategoryId()
  • add a custom option for a category which you can set per category
  • read it from the attributeset used for the first product
Related Topic