Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Building Magneto modules
 
Neuner
Jr. Member
 
Total Posts:  11
Joined:  2007-12-27
 

Hi there!

I´m building a couple of payment modules for Magento. Doing this I´m running some test and alter the config values the user can set in the admin section for various reasons… Till now I have reinstalled Magento every time to test get my new configfields in the admin section…
How can I delete a module and install it again? It only works once for me :(

I have tried deleteing the values Magento saves in the sql-tables core_config_data and core_config_field, the module disappears correctly but it doesn´t seem to install the module again… Is there some other information saved in the database for this I can erase or what can I do?

/Niklas

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jonathan Hedrén
Member
 
Total Posts:  67
Joined:  2007-08-31
Sweden
 

Try removing your_setup from the core_resource table.

You could also use upgrade files and add/remove/alter your configs whenever you change version of your module. Take a look at for example Mage/Core/sql/Setup/*. Notice how the mysql-upgrade-x.x.x-x.x.x.php matches the version tag i Mage/Core/etc/config.xml.

Edit
I suppose you’ve read it, but in the paymentmodule tutorial @ http://www.magentocommerce.com/wiki/how-to/create-payment-method-module the author suggest you to create a mysql4-uninstall-x.x.x.php - I’m not sure when it’s triggered but it is probably what you’re looking for.

Edit 2
Maybe someone at Varien could shed some light over this… *wink* smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Hi.

The mysql4-uninstall-x.x.x.php files are not triggered by anything right now, so they won’t be executed.

@Nicklas: remove the record from core_resource will work.

Please note, that from next release it will be simpler, because `core_config_field` migrated into xml files, and won’t need re-running upgrade files to be changed.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top