Why attributes of bundle items of a bundle product are also saved to the bundle product itself? (database-wise)
Update: how to stop the indexer from including child products
- Extend and modify
Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract
. - Look for the function
_prepareRelationIndex()
. - Modify the SQL query builder statement as follows:
Code:
$select = $write->select()
->from(array('l' => $this->getTable('catalog/product_relation')), 'parent_id')
->join(
array('cs' => $this->getTable('core/store')),
'',
array())
->join(
array('i' => $idxTable),
'l.child_id = i.entity_id AND cs.store_id = i.store_id',
array('attribute_id', 'store_id', 'value'))
->join(
array('e' => 'catalog_product_entity'),
'l.parent_id = e.entity_id',
array())
->group(array(
'l.parent_id', 'i.attribute_id', 'i.store_id', 'i.value'
))
->where('e.type_id != ?', 'bundle');
reference: addition of codes highlighted in red
It is the same way with configurable products.
If you are looking for white shoes and the configurable products solves this problem for you, the product is offered. I think it is easy as this. So if your searched product is part of a bundle product, this product is offered too.