0

Hello,

I have to know that any chance to call phtml file into system.xml if yes then how is it possible?

Thanks.

4
  • Why do you want to call phtml file in system.xml? Commented Dec 1, 2017 at 7:25
  • because of login in custom extension.
    – Moin Malek
    Commented Dec 1, 2017 at 7:27
  • Can you elaborate your situation in more detail? Commented Dec 1, 2017 at 7:29
  • I have to call one phtml file login and logout and call fieldss
    – Moin Malek
    Commented Dec 1, 2017 at 7:43

1 Answer 1

0

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();
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.