Wednesday, 15 August 2012

plugins - Magento is there an event when custom plugn is being installed? -



plugins - Magento is there an event when custom plugn is being installed? -

i want know if there sort of event can observer in case of doing actions when plugin beingness installed ?

i want check magento configuration when plugin installed , prevent enable when media storage set database. have observer , have no thought event connect it.

@following osdave reply config.xml

<config> <modules> <my_module> <version>1.0</version> </my_module> </modules> <global> <resource> <module_setup> <setup> <module>my_module</module> </setup> </module_setup> ...

and have install script at: app/code/comunity/my/module/data/module_setup/data-install-1.0.php using magento 1.8

in install setup script, can like:

<?php /* @var $installer mage_core_model_resource_setup */ $installer = $this; $installer->startsetup(); if (mage::helper('core/file_storage_database')->checkdbusage()) { mage::getsingleton('core/session')->adderror(mage::helper('yourmodulehelper')->__('unable install plugin')); } else { //execute script } $installer->endsetup();

hth

magento plugins installation

No comments:

Post a Comment