Magento – Link configurable swatches to appropriate simple product

color-swatchesconfigurable-productmagento-1.9

I am using configurable swatches on the product list page.

The default implementation links all the products to the configurable product and shows the default image for the configurable product.

For instance, say you have 3 simple products in your configurable product: yellow, green and blue.

When you click the swatch on the list page for say the blue product, and the listing image changes to show the blue product. Is there a way to update the href so that clicking the blue product links to the configurable product, but pre populated with the blue simple product.

Hope that makes sense 🙂

Thanks

Best Answer

The swatches on the list page are in this template: configurableswatches/catalog/product/list/swatches.phtml

Replace javascript:void(0) with the URL for the simple product.

For the question how to link to a configured product with preselected simple product, there is already a good answer here: Is it possible to link to a configurable product with pre-selected values?

Related Topic