Question

The issue is also described on Magento Bug-track (still not answered): http://www.magentocommerce.com/bug-tracking/issue/index/id/443

Steps to reproduce:

I have created a configurable product consisting of 3 Simple products (hidden individually) with different Stock quantities. When looking at the frontend and having the option: "Only X left" displayed, the quantity is correct. When I expand to display the details, the table is displayed but does not contain the names of the individual Simple products. I have tested this with a clean install of 1.9.0.1 which works correctly I have tested this with a clean install of 1.9.1.0 and the information is missing.

Expected Result:

Only X left table in the frontend with a breakdown of the Name of the Simple products per row and the Qty of that product in the column behind it Actual Result: Only X left table in the frontend consists of the correct amount of rows and columns. The name column does not display the product name, the Qty column displays the correct information.

Does anyone know how to fix this bug?

This is how it looks like in Magento 1.9.1.0:

enter image description here

And this is how it should look like (from Magento 1.9.0.1):

enter image description here

Was it helpful?

Solution

It seems that they changed getUsedProducts method in Mage_Catalog_Model_Product_Type_Configurable class.

Magento 1.9.0.1

$collection = $this->getUsedProductCollection($product)
    ->addAttributeToSelect('*')
    ->addFilterByRequiredOptions();

Magento 1.9.1.0

$collection = $this->getUsedProductCollection($product)
    ->addFilterByRequiredOptions();

// Provides a mechanism for attaching additional attributes to the children of configurable products
// Will primarily have affect on the configurable product view page
$childAttributes = Mage::getConfig()->getNode(self::XML_PATH_PRODUCT_CONFIGURABLE_CHILD_ATTRIBUTES);

if ($childAttributes) {
    $childAttributes = $childAttributes->asArray();
    $childAttributes = array_keys($childAttributes);

    $collection->addAttributeToSelect($childAttributes);
}

So instead of selecting all the attributes they provided a mechanism for us to select only what we need.

const XML_PATH_PRODUCT_CONFIGURABLE_CHILD_ATTRIBUTES = 'frontend/product/configurable/child/attributes';

So in your module config.xml add following:

<frontend>
    <product>
        <configurable>
            <child>
                <attributes>
                    <name/>
                </attributes>
            </child>
        </configurable>
    </product>
</frontend>

Flush cache, reload product page and enjoy :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top