Recently I was studying how the options of the layered navigation filter on the category page are determined and retrieved. I have dug a bit into the models and database for it, and there I found the following mechanism which I do not understand:
Situation:
Say, I have an attribute named color
(attribute_id = 133), a simple product A
(entity_id = 26), and a bundled product B
(entity_id = 27), and A
is added to B
as its bundle item, in Magento ver. 1.9.0.1
.
Step 1: color
is not set for both A
and B
Step 2: color
is set as Black
(value_id = 19) for B
Step 3: color
is set as White
(value_id = 18) for A
From step 3, we could see that apparently attributes of the bundle items (A
in this case) are also saved as if they are the attributes of the bundle product (B
in this case) itself. And I believe that this is why the attributes of the bundle items of bundle products also appear in the layered navigation filter.
I would like to ask why is it designed this way? Why would the system save attributes of the children products to the parent product as well? How does it help in any specific process in the system?
Thanks in advance.
Best Answer
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.