Skip to content

Instantly share code, notes, and snippets.

@eriksimonic
Created June 9, 2015 07:26
Show Gist options
  • Save eriksimonic/a3a99443fff3c185e371 to your computer and use it in GitHub Desktop.
Save eriksimonic/a3a99443fff3c185e371 to your computer and use it in GitHub Desktop.
Add EAV attribute to Flat catalog When selecting
$_product = Mage::getModel('catalog/product')->loadByAttribute( 'sku', 'ABC123' );
$coll = $_product->getTypeInstance()->getAssociatedProductCollection()
->joinAttribute( 'my_custom_attribute', 'catalog_product/my_custom_attribute', 'entity_id', null, 'left' )
->addAttributeToSelect( 'my_custom_attribute' )
;
Source
http://stackoverflow.com/questions/6271284/can-i-add-other-attributes-to-magentos-flat-product-catalog-table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment