1

I created a module as suggested in another question:

app/etc/modules/Vendor_Module.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <Vendor_Module>
                <active>true</active>
                <codePool>local</codePool>
            </Vendor_Module>
        </modules>
    </config>

app/code/local/Vendor/Module/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Vendor_Module>
            <version>1.0.0</version>
        </Vendor_Module>
    </modules>
    <global>
        <helpers>
            <class>Vendor_Module_Helper</class>
        </helpers>
    </global>
</config>

app/code/local/Vendor/Module/etc/system.xml

<?xml version="1.0"?>
<config>
    <sections>
        <shippinginfo translate="label" module="module">
            <label>YOUR_LABEL</label>
            <tab>general</tab>
            <sort_order>60</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>                    
                <shipping_times>
                    <fields>
                        <monday translate="label">
                            <label>Monday</label>
                            <frontend_type>text</frontend_type>
                            <comment>e.g 17.00</comment>
                            <sort_order>10</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </monday>
                        <tuesday translate="label">
                            <label>Tuesday</label>
                            <frontend_type>text</frontend_type>
                            <comment>e.g 17.00</comment>
                            <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>
                        </tuesday>
                        <wednesday translate="label">
                            <label>Wednesday</label>
                            <frontend_type>text</frontend_type>
                            <comment>e.g 17.00</comment>
                            <sort_order>30</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </wednesday>
                        <thursday translate="label">
                            <label>Thursday</label>
                            <frontend_type>text</frontend_type>
                            <comment>e.g 17.00</comment>
                            <sort_order>40</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </thursday>
                        <friday translate="label">
                            <label>Friday</label>
                            <frontend_type>text</frontend_type>
                            <comment>e.g 17.00</comment>
                            <sort_order>50</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </friday>
                        <saturday translate="label">
                            <label>Saturday</label>
                            <frontend_type>text</frontend_type>
                            <comment>Leave blank If its non shipping day</comment>
                            <sort_order>60</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </saturday>
                        <sunday translate="label">
                            <label>Sunday</label>
                            <frontend_type>text</frontend_type>
                            <comment>Leave blank If its non shipping day</comment>
                            <sort_order>70</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </sunday>                           
                    </fields>
                </shipping_times>
            </groups>
        </shippinginfo>
    </section>
</config>

app/code/local/Vendor/Module/helper/data.php

<?php

class Vendor_Module_Helper_Data extends Mage_Core_Helper_Abstract
{
}

I did refresh the cache, but there is no "YOUR_LABEL" in the "general" tab. What could be done wrong?

5

There is typo in system.xml. The closing </section> should be </sections> (missing "s" at the end).

And in config.xml

<helpers>
    <class>Vendor_Module_Helper</class>
</helpers>

should be

<helpers>
    <vendor_module>
        <class>Vendor_Module_Helper</class>
    </vendor_module>
</helpers>

Edit:

Helper isn't called correctly, change

<shippinginfo translate="label" module="module">

to

<shippinginfo translate="label" module="vendor_module">

Btw ... file/folder names should start with an uppercase letter:

app/code/local/Vendor/Module/helper/data.php

should be

app/code/local/Vendor/Module/Helper/Data.php

Edit 2:

There are some lines missing:

<groups>                    
    <shipping_times>

should be

<groups>                    
    <shipping_times>
        <label>YOUR_GROUP_LABEL</label>
        <frontend_type>text</frontend_type>
        <sort_order>10</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>

Edit 3:

Missing ACL ... add to app/code/local/Vendor/Module/etc/adminhtml.xml

<?xml version="1.0"?>
<config>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <shippinginfo>
                                        <title>Shippinginfo ACL</title>
                                    </shippinginfo>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>
  • Thank you for the answer! I did everything as you said, but I am getting an error: Fatal error: Class 'Mage_Module_Helper_Data' not found in C:\wamp64\www\magento1\app\Mage.php. I tried reading on what might be causing it, but none of the cases seemed to apply to my case. – Jurģis Toms Liepiņš Jun 9 '17 at 6:44
  • Updated answer. – sv3n Jun 9 '17 at 6:56
  • Interesting... I updated the code, now there are no errors, but I still don't see my custom tab. – Jurģis Toms Liepiņš Jun 9 '17 at 7:09
  • Updated .... and tested :) – sv3n Jun 9 '17 at 7:38
  • Thank you so much! I do see "YOUR_LABEL" now, but when I click on it, it gives me "404 error", have I made a mistake somewhere? Should I update my code in the question so you can see if I am doing something wrong? – Jurģis Toms Liepiņš Jun 9 '17 at 7:45

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.