TheVyom
TheVyom

Reputation: 533

Magento: In Magento Flat tables why do some attributes have value stored while others do not?

I was looking at the Flat Tables and saw this perculiar behaviour. For some of my attributes like 'language' there were two columns (language and language class) while for other 'age' there were no such values stored.

I could not find any settings in the attribute field which described this and it seems to follow no pattern.

Also in the place where language is stored language is int(11) and langauge_value is varchar(256) while in age it is varchar(256) but actually stores just a number.

UPDATE: I think the question was not understood. I am seeing some attributes being shown as varchar(255) while some attributes being shown as attributes (int(11)) and attribute_value (varchar(255)

Found the answer: For simple dropdown, the attribute_value is also added to the flat table.values being shown. For Multiselect, the values are not added to the Flat table.

Upvotes: 0

Views: 2634

Answers (3)

Fiasco Labs
Fiasco Labs

Reputation: 6457

Answered under the topic Can I add other attributes to magento's flat product catalog table? And don't get too slap-happy in adding attributes to your Flat Product Catalog table. It has a row limit defined by MySQL limitations.

Upvotes: 1

Dmytro Zavalkin
Dmytro Zavalkin

Reputation: 5277

Pattern is very simple, when you create new attribute, you select whether it is used for search/layered navigation. If yes - indexer will add new column for this attribute to flat table.

Upvotes: 1

Josh Pennington
Josh Pennington

Reputation: 6408

I believe it is all about the scope of the variable and if it is available on the frontend of the website (where the flat table is used).

If you set an attribute to be displayed on the front end of the website (or I believe if its scope is set to store view, but dont quote me on that) it will be put into the flat table.

One way I generally look at it is, if when I create the attribute I need to reindex the flat product index, it is going to go in there.

Upvotes: 0

Related Questions