srgb
srgb

Reputation: 5193

Magento - add media gallery attribute to product flat table

How do I add a 'media_gallery" attribute type to products flat table, so that it can be used in product listing?

Upvotes: 0

Views: 3806

Answers (2)

Vern Burton
Vern Burton

Reputation: 3210

They can be added by defining "Used in Product Listing" to Yes Once you have done this, you will need to re-index the Product Flat

EDIT: See solution for the final answer.

Source: Can I add other attributes to magento's flat product catalog table?

Solution: Media Images not available in Magento’s product list? Media Images not available in Magento’s product list? - archive

Upvotes: 1

MagePal Extensions
MagePal Extensions

Reputation: 17656

To change it programmatically, you could do.

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->updateAttribute('catalog_product', '{field_code_here}', 'used_in_product_listing', 1);

Then reindex.

Upvotes: 0

Related Questions