Hi guys. Actually I have asked this question as well on the Stack Overflow, but sadly I have not received any response so far.

(Original post: http://magento.stackexchange.com/q/52745/20537)

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.

Step 1: color is not set for both A and B

Name:  1.png
Views: 71
Size:  7.3 KB

Step 2: color is set as Black (value_id = 19) for B

Name:  2.png
Views: 200
Size:  17.5 KB

Step 3: color is set as White (value_id = 18) for A

Name:  3.png
Views: 237
Size:  24.9 KB

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.

View more threads in the same category: