Using Differing Setup Classes In One Module

Updated . Posted . Visible to the public.

On occasion you may have a module which requires both EAV and flat resource setup classes, in this situation you can instantiate a setup class as this note shows.

Eav:

$installer = Mage::getModel('eav/entity_setup', 'eav_setup');

Flat:

$installer = Mage::getResourceModel('core/setup', 'core_setup');

Catalog:

$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');

You can then continue with the setup script as you normally would.

Mike Whitby
Last edit
Mike Whitby
Posted by Mike Whitby to Magento (2012-02-22 11:06)