4

a simple question. In magento, when going to System / Configuration there are some main tabs in left navigation. General, Catalog, Customer, Sales, Advanced, etc.

I wonder what xml set the order for those? I would love to have Advanced somewhere on top.

Ovidiu
  • 2,921
  • 5
  • 28
  • 36

4 Answers4

3

Looking at the Mage/Core/etc/system.xml file, I see this near the top:

<config>
    <tabs>
        <general translate="label" module="core">
            <label>General</label>
            <sort_order>100</sort_order>
        </general>
        <service translate="label" module="core">
            <label>Services</label>
            <sort_order>99999</sort_order>
        </service>
        <advanced translate="label" module="core">
            <label>Advanced</label>
            <sort_order>999999</sort_order>
        </advanced>
    </tabs> 
    ...
</config>

I'm guessing (but haven't verified) that changing the sort_order parameter in this file will change that order for you.

Hope that helps!

Thanks, Joe

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104
1

So What I have found is when some Magento extensions are installed they will have etc/system.xml file with the line in it <sort_order>100</sort_order>. This will compete with the same line in Mage/Core/etc/system.xml, so the configuration menu under system will be out of order compared to the fresh install order.

The problem is locating and editing all of these XML files. They will all be structured like /etc/system.xml, but it is too easy to mistake the wrong file and loose track if the wrong file gets mangled (been there, done that).What I did was set up a text search for on specific thing all these files have in common that would not be similar in other /etc/system.xml files. This would be the <label>General</label> portion of the XML file. However using the header title may lead to more confusion so I picked the first or second sub menu name. For example on of my extensions is TBT Corp Extension's "Enhanced Product Grid", so the gave me the search <label>Enhanced Product Grid</label>. The point being I used text that unique to the extension and not in common with other labels.

This gave me the right /etc/system.xml in /app/code/community/TBT/Enhancedgrid/etc where I found this;

<tabs>
    <tbtall translate="label" module="enhancedgrid">
        <label>TBT Corp Extensions</label>
        <sort_order>100</sort_order>
    </tbtall>
</tabs>

As you can see with the sort order of 100 it will end up near the top of the sort order, so changing it to 300 or greater (301, 400, 401) put things back in order. Doing this systematically throughout my site gave me what I want. I had many of these to do, so perhaps my next step would be a second search and do a command line to make an immutable file chattr +i filename to add immutable (a minus to undo immutable), so some update will leave them as is or give an install error?

In final some of the extensions had multiple labels under their Title so some had to be found and sorted be the extensions group Title. Also I had to go back to /app/code/core/Mage/ModuleName and since "General started at '100' and "Catalog" started at '200' and "Customers" started at 300' and so forth, I change them respectively to '100', '102', '103' down the line to put them first. So/app/code/core/Mage/Sales/etc/system.xml I put is at '104' so it was closer to the original order upon install. Very IMPORTANT would to save a backup right in you folders, but do it like system.xml.backup and not like backup.system.xml otherwise Magento will load anything ending in ".xml"

My hope is this not only helps but somewhat of a short guide!

James N.
  • 11
  • 5
0

There are two ways of editing the tabs on the product edit page, the first few tabs are managed by the attribute group order (as Mathew pointed out). The second bunch of tabs are added directly in the code via adding a tab in the block.

So there are two ways of modifying those tabs.

  1. Change the order of the attribute groups within the attribute set (using the GUI)
  2. Extend the Tab block, Core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php, and manually change the order of the tabs.

Within the block you can add your own custom tabs as well using $this->addTab()

0

You need to set these on a per attribute-set basis by dragging the folders up and down in the attribute-set-manager (in products menu of admin).

enter image description here

ʍǝɥʇɐɯ
  • 4,012
  • 7
  • 32
  • 53