1

Following are the steps for creating store config value.I created this fields for store some shipping value and add that value in to total in the checkout page.

STEP 01 config.xml file :- Path(app\code\local\Wired\Concept\etc)

<?xml version="1.0"?>
<config>
<modules>
    <Wired_Concept>
        <version>0.1.0</version>
    </Wired_Concept>
</modules>
<global>
    <models>
        <concept>
            <class>Wired_Concept_Model</class>
        </concept>
    </models>
    <helpers>
        <concept>
            <class>Wired_Concept_Helper</class>
        </concept>
    </helpers>
 </global>
 <adminhtml>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <wired>
                                        <title>Wired Consept - All</title>
                                    </wired>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>
</config>

STEP 02 system.xml file :- Path(app\code\local\Wired\Concept\etc)

<?xml version="1.0" encoding="UTF-8"?>
<config>
<tabs>
    <wired translate="label" module="concept">
        <label>Wired Extensions</label>
        <sort_order>100</sort_order>
    </wired>
</tabs>
<sections>
    <wired translate="label" module="concept">
        <label>Extension Options</label>
        <tab>wired</tab>
        <sort_order>1000</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
        <groups>
            <wired_group translate="label" module="concept">
                <label>Shipping &amp; Handling Charge</label>
                <frontend_type>text</frontend_type>
                <sort_order>1000</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <wired_shipping_charge translate="label">
                        <label>Shipping &amp; Handling Charge : </label>
                        <comment>Shipping &amp; handling charge for entire order</comment>
                        <frontend_type>text</frontend_type>
                        <sort_order>20</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </wired_shipping_charge>                        
                </fields>
            </wired_group>              
        </groups>           
    </wired>
</sections>
</config>

STEP 03 create the Wired_Concept.xml file :- Path(\app\etc\modules)

<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
    <Wired_Concept>
        <active>true</active>
        <codePool>local</codePool>
    </Wired_Concept>
</modules>

STEP 04 helper class Data.php :- Path(\app\code\local\Wired\Concept\Helper)

<?php
class Wired_Concept_Helper_Data extends Mage_Core_Helper_Abstract
{
/* Shipping charge for whole order*/
public function config_shipping(){
return Mage::getStoreConfig('wired/wired_group/wired_shipping_charge');
}
}

In the admin panel the text field is shown under wired extension.I try to get value using

echo Mage::helper('concept')->config_shipping_cost();

no any value retrieve for me and also in the admin panel the value saved also not retrieve n the created text filed.

I am unable to verify my mistakes to unsaved the value and nor retrieve the value which i saved using the text field i created. It will be a great pleasure to help me to identify my issue.

  • your helper function is config_shipping and you was try to fetch data using ->config_shipping_cost(); – Amit Bera Jan 7 '15 at 10:56
  • thank you @AmitBera. earlier i kept it as config_shipping and later change to config_shipping_cost.I want to clarify with you is "config_shipping" is a default magento function? – Mujahidh Jan 7 '15 at 11:00
  • no...config_shipping_cost() not a default function – Amit Bera Jan 7 '15 at 11:05
  • thank you very much.I asked another question 3 days back didn't get any answer shall i forward it here for your consideration? – Mujahidh Jan 7 '15 at 11:07
0

your helper function is config_shipping and you was try to fetch data using -config_shipping_cost() So Pleas try this

 Mage::helper('concept')->config_shipping();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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