In system.xml, add frontend model
<product_test_btn translate="label"> <frontend_model>mymodule/adminhtml_system_config_testbtn</frontend_model> <sort_order>87</sort_order> <show_in_default>1</show_in_default> <show_in_website>0</show_in_website> <show_in_store>1</show_in_store> </product_test_btn>
In your block, you can modify the html output, and you can add yr logic & load other required data here.
class Mycompany_Mymodule_Block_Adminhtml_System_Config_Testbtn extends Mage_Adminhtml_Block_System_Config_Form_Field {
<?php
class Mycompany_Mymodule_Block_Adminhtml_System_Config_Testbtn extends Mage_Adminhtml_Block_System_Config_Form_Field
{
/**
* Generate button html
*
* @return string
*/
public function getButtonHtml()
{
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
->setData(array(
'id' => 'my_button',
'label' => $this->helper('adminhtml')->__('Send Product (Test)'),
'onclick' => 'javascript:check(); return false;'
));
return $button->toHtml();
}
/**
* Return element html
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
return $this->_toHtml();
}