3

I want to display Magento custom variable from the Admin configurations, so when I add the calling inside my custom configurations it didn't get the value of it, you can see the below example:

        <bank_sms translate="label">
            <label>Bank Orders Ensure Message</label>
            <frontend_type>text</frontend_type>
            <sort_order>3</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <fields>
                <active_banksms translate="label">
                    <label>Enable Bank Orders SMS</label>
                    <frontend_type>select</frontend_type>
                    <source_model>adminhtml/system_config_source_yesno</source_model>
                    <sort_order>0</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                </active_banksms>
                <message_bank>
                    <label>Bank Orders SMS</label>
                    <frontend_type>textarea</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <depends>
                        <active_banksms>1</active_banksms>
                    </depends>
                </message_bank>
            </fields>
        </bank_sms>

enter image description here

After I echo the configurations, it give me the same content in it (Your order {{customVar code=verifyOrder}}). So is there a way to print the value of the customVar tag?

1 Answer 1

1

for custom variable customvarDirective is used.

Try below code

$helper = Mage::helper('cms');
$processor = $helper->getPageTemplateProcessor();
$html = $processor->filter(<Pass Your Config message_bank>);

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.