Posted about 7 years ago. Visible to the public.

Using Differing Setup Classes In One Module

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:

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

Flat:

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

Catalog:

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

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

Owner of this card:

Avatar
Mike Whitby
Last edit:
almost 4 years ago
by Mike Whitby
Posted by Mike Whitby to Magento
This website uses cookies to improve usability and analyze traffic.
Accept or learn more