cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fetch values from custom fields in Admin?

How do I fetch values from custom fields in Admin?

I've added custom fields from backend to Admin > Config > Sales. Now, I want to get their values and the details of the product added by the owner for calculating product price before displaying on product page.

 

Untitled2.png

Apart from this I need to check which type of gold/silver/diamond is selected. So the eqation will be 'Value from database which was selected' * 'Quantity' + 'Making Charges' = 'Final Price'

If its in PHP I can do it. But I don't know how can I do it in #Magento ? Please guide me if any one can...

Tags (1)
2 REPLIES

Re: How do I fetch values from custom fields in Admin?

Hi @GaganSingh

 

If you can update your question with the modules's system.xml file then you may get the answer.

 

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: How do I fetch values from custom fields in Admin?

<?xml version="1.0"?>
<config>
    <sections>
         <sales>
            <groups>
                <newgroup translate="label" module="sales">
                    <label>Prices</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>250</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <Gold1 translate="label">
                            <label>Gold Per Gram - 18kt</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Gold1>
                        <Gold2 translate="label">
                            <label>Gold Per Gram - 20kt</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Gold2>
                        <Gold3 translate="label">
                            <label>Gold Per Gram - 22kt</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Gold3>
                        <Gold4 translate="label">
                            <label>Gold Per Gram - 24kt</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Gold4>
                        <Silver translate="label">
                            <label>Silver Per Gram</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Silver>
                        <Diamond translate="label">
                            <label>Diamond Per ct</label>
                            <frontend_type>text</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>6</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Diamond>
                        <Tax translate="label">
                            <label>Tax Percentage</label>
                            <frontend_type>text</frontend_type>
                            <comment>Do Not Include Percentage(%) Symbol.</comment>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>7</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </Tax>
                    </fields>
                </newgroup>
            </groups>
        </sales>
    </sections>
</config>