Hello,
I have to know that any chance to call phtml file into system.xml if yes then how is it possible?
Thanks.
Hello,
I have to know that any chance to call phtml file into system.xml if yes then how is it possible?
Thanks.
In system.xml, add frontend model
mymodule/adminhtml_system_config_testbtn 87 1 0 1
In your block, you can modify the html output, and you can add yr logic & load other required data here.
<?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();
}