Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

Magento system settings overview

  1. #1
    Administrator david's Avatar
    Join Date
    Nov 2012
    Posts
    261
    Thanks
    22
    Thanked 39 Times in 32 Posts

    Cool Magento system settings overview

    From time to time Magento developers face with a need to add settings for their extensions. As it’s hard to remember all necessary details for each setting, so we would like to share our snippets which contain xml code of the most recent settings used in Magento admin.

    First of all, we would recommend you always place everything, that refers to Magento system settings, in the system.xml file, since it’s the main and the only role of this file.
    If you need to create your own tab in the admin system settings, you should simply add the following lines to the file:

    HTML Code:
    <config>
        <tabs>
            <atwix translate="label">
                <label>MEF Extensions</label>
                <sort_order>150</sort_order>
            </atwix>
        </tabs>    
    </config>
    As a result, you’ll get the new group (tab) in the admin settings. When you need to complete the procedure of adding settings you should add the following items: section, settings groups and the settings (fields) themselves:

    HTML Code:
    <config>
        <sections>
            <atwix_shoppingbar translate="label" module="atwix_shoppingbar">
                <class>separator-top</class>
                <label>Shopping Bar</label>
                <tab>atwix</tab>
                <sort_order>130</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <groups>
                    <quicksearch>
                        <label>Quick search</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>20</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>1</show_in_store>
                        <fields>
                            <quicksearch_enabled translate="label comment">
                                <label>Enable Quick Search</label>
                                <comment><!&#91;CDATA&#91;Enable quick search block&#93;&#93;></comment>
                                <frontend_type>select</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>0</show_in_website>
                                <show_in_store>1</show_in_store>
                            </quicksearch_enabled>
                            <results_count translate="label comment">
                                <label>Results count</label>
                                <comment><!&#91;CDATA&#91;Quick search results count (min 1, max 20)&#93;&#93;></comment>
                                <frontend_type>text</frontend_type>
                                <sort_order>5</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>0</show_in_website>
                                <show_in_store>1</show_in_store>
                            </results_count>
                        </fields>
                    </quicksearch>
                </groups>
            </atwix_shoppingbar>
        </sections>
    </config>
    Here is an illustration what means each of these terms:



    Next question is how will the different settings in the xml config look like. As you already know, each setting is placed in the node, then follows the unique setting’s id and finally – setting’s attributes. Here is a small review of the most useful settings:

    Text field
    Simple input field for short text values:


    HTML Code:
    <text_field translate="label">
        <label>Text Field</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>
    </text_field>

    Textarea

    Wide input field for long text values:



    HTML Code:
    <textarea translate="label">
        <label>Textarea</label>
        <frontend_type>textarea</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>
    </textarea>


    Drop down with Yes/No values

    Drop down menu with the values “Yes” and “No”. Commonly it is used as a flag for enabling/disabling something:




    HTML Code:
    <enabled translate="label">
        <label>Enabled</label>
        <frontend_type>select</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>1</show_in_store>
    </enabled>


    Drop down with Enable/Disable values
    Almost the same as previous one, but instead of “Yes” and “No” you will get “Enable” and “Disable”:


    HTML Code:
    <active translate="label">
        <label>Enable/Disable</label>
        <frontend_type>select</frontend_type>
        <sort_order>40</sort_order>
        <source_model>adminhtml/system_config_source_enabledisable</source_model>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    </active>

    Multiselect with custom values

    Field with the ability to select few items at the same time:





    File

    Allows to choose a file for uploading. In this example the file will be saved in var/uploads directory:




    HTML Code:
    <default translate="label">
        <label>Select</label>
        <frontend_type>select</frontend_type>
        <!-- Source model for countries list. For custom list you need to use your own source model -->
        <source_model>adminhtml/system_config_source_country</source_model>
        <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>
    </default>

    Time

    Is used to create three drop down menus for setting up the hours, minutes and seconds respectively:




    HTML Code:
    <multiselect translate="label">
        <label>Multiselect</label>
        <frontend_type>multiselect</frontend_type>
        <!-- Source model for countries list. For custom list you need to use your own source model -->
        <source_model>adminhtml/system_config_source_country</source_model>
        <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>
        <can_be_empty>1</can_be_empty>
    </multiselect>

    Editable items list

    Allows to add/remove text values for the setting:




    HTML Code:
    <addresses>
        <label>Blocked Email Addresses</label>
        <frontend_model>atwix_emailblocker/adminhtml_addresses</frontend_model>
        <backend_model>adminhtml/system_config_backend_serialized</backend_model>
        <sort_order>90</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
        <can_be_empty>1</can_be_empty>
    </addresses>

    Heading

    Is used to entitle some settings inside the group:



    HTML Code:
    <heading translate="label">
        <label>Heading</label>
        <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
        <sort_order>90</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    </heading>
    Dependent field

    It can be any field. The main purpose of this one – it’s to hide/show the field depending on the state of some other field. In the following example the field depends on the field’s enablemethod state. Ifenablemethod value is 1 – dependent_field will appear and vice versa:

    HTML Code:
    <dependent_field translate="label">
        <label>Dependent Field</label>
        <frontend_type>textarea</frontend_type>
        <sort_order>100</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
        <depends>
            <enablemethod>1</enablemethod>
        </depends>
    </dependent_field>
    There is also one interesting cheat. You are able to use javascript inside of the node:

    HTML Code:
    <specificerrmsg translate="label">
        <label>Displayed Error Message</label>
        <frontend_type>textarea</frontend_type>
        <comment>
        <!&#91;CDATA&#91;
            <script type="text/javascript">
                Event.observe('carriers_flatrate_active', 'change', function() {
                    alert('Be careful with this one');
                })
            </script>
        ]]>
        </comment>
        <sort_order>2013</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    </specificerrmsg>
    It might be useful for changing field’s value depending on different credentials. We would not recommend you to use it very often there, especially for the big javascript code.

    Moreover, as you might have noticed, there are some attributes like source_model for the custom drop downs or, all the more so, frontend model for editable list which may disappoint a bit. We are going to describe how to operate with these models in our next article, which will see the light in the nearest future. Thank you for reading us

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    216
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Default Mode. ...
    Developer Mode. ...
    Production Mode. ...
    SSH into your site's server using an application like Putty.
    Navigate to the site's root- typically public_html but not necessarily. ...
    Navigate to the /bin directory within the site root.
    Run the following command: php magento deploy:mode:show.

  3. #3
    New member
    Join Date
    Jun 2019
    Location
    Spain
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Buy Real Schengen VISA, Buy Fake UK VISA online, Canadian legal VISA for sale

    w w w. fakepassportonline.cc - We produce real and novelty documents of all types. All of our products are printed on high-quality printing machines, they have all holograms, secret features, and have been passed under UV light and other test equipment.

    If youre looking to purchase high quality fake passports easily online, youve come to the right place. Our business has been around for many years and have mastered the art of creating document that can be used for work, travel or as a replacement.

    We have customers that have lost a document and need a replacement faster than it would take their countrys government office to issue. We have customers that do not have the freedom to travel to various other countries, simply because of where they were born. With our assistance, these people can live the lives that theyre entitled to.

    We are able to replicate all the latest security measures and have all necessary materials available to produce a document in approximately a 2-5 days. Take a look at sample page to see some of our documents. All of our services are listed on our Services Page. Whenever a new security measure is added to a passport, driver's license or identity card, we will use to manufacturing of that product with the necessary materials and resources to successfully replicate it. We work tirelessly to ensure that our documents are identical in every way to originals.

    To get the additional information and place the order just visit our website:


    w w w. fakepassportonline.cc w w w. fakepassportonline.cc


    Keywords:
    ---------

    apply to visa canada
    apply to visa to European Union
    apply to visa to usa
    apply to visa to uk
    apply to visa to china
    apply to visa to france
    apply to visa to germany
    apply to visa to italy
    apply to visa lottery
    apply visa to australia
    apply visa to australia from singapore
    apply visa to australia from malaysia
    apply visa to america
    apply visa to australia online
    apply visa to amsterdam
    apply to american visa online
    apply visa to australia from india
    apply visa to australia from philippines
    apply visa to australia for malaysian
    apply a visa to canada
    apply a visa to usa
    apply a visa to china
    apply a visa to uk
    apply a visa to france
    apply a visa to australia
    apply a visa to spain
    apply a visa to japan
    apply a visa to germany
    apply a visa to ireland
    apply visa to brazil
    apply visa to bahrain
    apply visa to belgium
    apply visa to belgium from uk
    apply visa to bali
    apply visa to bangkok
    apply to british visa
    apply to b2 visa
    apply visa to beijing
    apply b visa usa
    how to apply visa b
    how to apply visa b australia
    apply for b visa usa
    b visa usa
    b visa to usa
    what is b visa usa
    what is b visa for usa
    apply visa to china
    apply visa to china in malaysia
    apply visa to china in singapore
    apply visa to canada from usa
    apply visa to china online
    apply visa to china for malaysian
    apply visa to canada from malaysia
    apply visa to china in hong kong
    apply visa to dubai online
    apply visa to denmark
    apply to diversity visa lottery
    apply visa to dubai from singapore
    apply visa to dominican republic
    apply visa to dubai from india
    apply visa to dubai from lebanon
    apply visa to dubai from uk
    apply visa to europe
    apply to extend visa
    apply visa to egypt
    apply visa to england
    apply to extend visa uk
    apply to extend visa canada
    apply visa to europe from singapore
    apply visa to enter singapore
    apply visa to estonia
    apply visa to enter australia
    apply e visa to india
    apply e visa to malaysia
    apply e visa to turkey
    apply e visa to singapore
    apply e visa
    apply e visa australia
    apply e visa taiwan
    apply e visa for thailand
    apply e visa dubai
    apply e visa vietnam
    apply to visa for canada
    apply visa to france
    apply visa to france from uk
    apply visa to france from usa
    apply visa to finland
    to apply visa for usa
    apply visa to france from dubai
    to apply visa for uk
    to apply visa for singapore
    how to apply for f visa china
    f visa china requirements
    apply visa to germany
    apply visa to greece
    apply visa to germany from uk
    apply visa to germany from usa
    apply to german visa from lebanon
    apply to greece visa from lebanon
    apply visa to georgia
    apply visa to germany in australia
    apply visa to greece from singapore
    apply visa to germany from dubai
    apply visa to hong kong
    apply visa to hong kong in singapore
    apply to h1b visa
    apply visa to holland
    apply visa to hungary
    apply visa hong kong online
    apply holiday visa australia
    apply h1b visa 2018
    how to apply h-1b visa
    how to apply h-2a visa
    how to apply for h-2b visa
    how to apply for h4 visa
    how to apply for h-3 visa
    how to apply h 1b visa
    how to apply for h 1b visa
    apply for h 1b visa
    how to apply for h1b visas
    requirements for h 1b visa
    apply visa to italy
    apply visa to india from usa
    apply visa to india from malaysia
    apply visa to india from singapore
    apply visa to indonesia
    apply visa to ireland
    apply visa to india from australia
    apply visa to iceland
    apply visa to india from canada
    i apply for visa
    how can i apply visa to canada
    how do i apply visa to china
    i to apply for a visit visa and
    apply visa to japan
    apply visa to japan from singapore
    apply visa to japan from usa
    apply visa to japan from melbourne
    apply j visa
    how to apply j visa
    apply j 1 visa
    how to apply j 1 visa
    applying j1 visa
    apply visa to korea
    apply visa to korea in singapore
    apply visa to korea in malaysia
    apply visa to kuwait
    how to apply k visa
    apply k visa
    apply visa to london
    apply visa to lebanon
    apply visa to laos
    apply visa to london from singapore
    apply visa to lithuania
    apply visa to latvia
    apply visa to london from dubai
    apply to us visa lebanon
    how to apply l visa
    how to get l visa
    how to apply for l visa
    apply visa to malaysia from singapore
    apply visa to morocco
    apply visa to mexico
    apply visa to myanmar
    apply to malaysia visa online
    apply visa to malaysia from india
    apply visa to myanmar in malaysia
    apply visa to melbourne
    apply m visa china
    how to apply m visa china
    apply for m visa china
    applying for m visa china
    requirements for m visa china
    what is m visa china
    apply visa to new zealand
    apply visa to netherlands
    apply visa to new zealand from australia
    apply visa to norway
    apply visa to netherlands from uk
    apply visa to new zealand from malaysia
    apply visa to netherlands from india
    apply visa to norway from uk
    apply visa to oman
    apply to dubai visa online
    apply to canada visa online
    apply to australian visa online
    apply to uk visa online
    apply to indian visa online
    apply o visa
    how to apply o visa
    apply visa to philippines
    apply visa to pakistan
    apply visa to poland
    apply visa to portugal
    apply visa to perth from singapore
    apply visa to panama
    apply visa to qatar online
    apply to us visa qatar
    apply to uk visa qatar
    apply visa qatar di jakarta
    apply visa qatar airways
    how to apply visa quota in dubai
    how to apply visa quota in uae
    apply visa to russia from singapore
    apply visa to russia from malaysia
    apply visa to rome
    apply visa rusia di jakarta
    realme apply visa
    apply visa rwanda
    apply visa renewal
    apply visa to spain
    apply visa to sri lanka
    apply to schengen visa
    apply to schengen visa from uk
    apply visa to saudi arabia
    apply visa to sweden
    how to apply t visa
    how to apply for t visa
    requirements for t visa
    t visa requirements
    t visa process
    apply to visa usa
    apply to visa uk
    apply visa to usa from malaysia
    apply visa to usa from canada
    apply visa to usa from singapore
    apply to uk visa from usa
    apply to us visa from saudi arabia
    apply u visa
    how to apply u visa
    u visa how to apply
    how to apply for the u visa
    apply visa to vietnam online
    apply to visitor visa canada
    apply visa to visit australia
    apply visa to visit usa
    apply visa to vietnam from hong kong
    apply visa to visit uk
    how to apply for uk visa
    applying for uk visa
    how i apply for uk visa
    how can i apply for uk visa
    how to apply for a uk visa
    apply to work visa canada
    apply to work visa
    apply visa to work in australia
    apply visa waiver jepang
    apply visa waiver program
    apply visa working holiday australia
    apply visa waiver uk
    apply visa with emirates
    apply visa with singpass
    apply for visa to work in usa
    apply x visa india
    apply x2 visa china
    apply xin visa my
    how to apply x visa for india
    x visa india application
    apply for x visa india
    applying for x visa india
    apply visa to zimbabwe
    apply visa zurich
    apply visa zambia
    apply visa to new zealand in singapore
    apply z visa china
    apply z visa in hong kong
    how to apply z visa for china
    get z visa in china
    applying for z visa in china
    what is z visa china
    apply visa 155
    apply 2nd visa australia
    apply to extend tier 2 visa
    tier 2 visa how to apply
    apply for a tier 2 visa
    applying for a tier 2 visa
    apply visa 317
    apply visa 309
    apply visa 300
    how to apply visa 309 online
    apply telex visa 317
    apply visa 485
    apply visa 4 uk
    apply visa 485 australia
    apply 4 visa uk
    apply to extend tier 4 visa
    apply visa 500
    apply visa 590
    how to apply visa 572
    apply uk visa 5 years
    apply china visa 5 years
    apply 5 years visa to vietnam
    5 steps to apply for a visa
    how to apply 5 years visa to vietnam
    apply for 5 years visa to vietnam
    5 years visa to vietnam
    5 year visa to vietnam
    5 year visa for vietnam
    apply visa 600 online
    apply visa 600
    apply visa 651 australia
    apply visa 600 for parents
    how to apply visa 651
    apply visitor visa 600 online
    apply visitor visa 600
    apply 601 visa
    how to apply for 6 months visa in uae
    how to apply visa 600 online
    apply visa 771
    apply australian visa 771
    apply for visa 785
    apply visa 866
    apply visa 804
    apply visa 802
    how to apply visa 864
    how to apply 9g visa


    To get the additional information and place the order just visit our website:


    w w w. fakepassportonline.cc w w w. fakepassportonline.cc

Similar Threads

  1. Magento Design and Content Overview
    By ccvv in forum Template, Design, HTML, CSS, Javascript
    Replies: 15
    Last Post: 17-06-2019, 05:24 AM
  2. Magento system settings overview
    By david in forum Webmaster & Administrator
    Replies: 0
    Last Post: 03-04-2013, 06:41 AM
  3. Source, frontend and backend models in Magento system settings
    By speed2x in forum Programming & Development
    Replies: 2
    Last Post: 02-04-2013, 01:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •