I created a custom module
which fetch data using third-party APIs.
In admin Dashboard
after module installation. I want to check few things form API( i am getting everything from API , just need to show show message once admin activate the module ) if all ok i want to show the message under the Enable/Disable button.
In /var/www/html/magento16/app/code/local/Namespace/ReviewRating/etc/system.xml
<!-- ... --> <active translate="label comment"> <label>Activate Slider </label> <frontend_type>select</frontend_type> <sort_order>54</sort_order> <source_model>adminhtml/system_config_source_enabledisable</source_model> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </active> <!-- ... -->
If i chage my above config as below
<active translate="label comment"> <label>Activate Slider </label> <frontend_type>select</frontend_type> <sort_order>54</sort_order> <source_model>adminhtml/system_config_source_enabledisable </source_model> <frontend_model>reviewrating/adminhtml_system_config_allgood </frontend_model> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </active>
and create a model class as below In /var/www/html/magento16/app/code/local/Namespace/ReviewRating/Block/Adminhtml/System/Config/Allgood.php
<?php class Namespace_ReviewRating_Block_Adminhtml_System_Config_Allgood extends Mage_Adminhtml_Block_System_Config_Form_Field { // if i am doing correct then how i will trigger api here or get to know that module is enabled ?? }
Please suggest how to proceed. I didn’t find any link related to this in which I can hit API on enable/disable
button and then show messages.
Thank You.