0

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.

1

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
0

While this is not a direct answer I feel it still has merit. Having multiple attributes for colors by different manufacturers could lead to a namespace conflict.

For example if you have attributes nike_color and reebok_color and both have an option "Red", you might get the wrong swatch if you upload red.png to /media/wysiwyg/swatches/red.png.

For this reason I feel the need to prefix the swatch name with some kind of namespace indicator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.