I am using Magento 1.9 and I want to have a custom admin template for each stores I have.

Website 1 (Global Admin template)
---- Store 1 (Custom Admin1 template)
---- Store 2 (Custom Admin2 template)
Website 2 (Global Admin template)
---- Store 1 (Custom Admin11 template)
---- Store 2 (Custom Admin11 template)

I am really talking about a new template, not only a role. Is this possible?

  • You'll need to define what you mean by template. Are you talking about entire new theme for admin when switching stores ?
    – Prateek
    Dec 2 '15 at 8:47
  • Yes. When the administrator of website1 store1 access the admin page, i need to present a completely different view of the admin. Dec 2 '15 at 9:08
  • May be this link will help you get started : inchoo.net/magento/custom-admin-theme-in-magento
    – Prateek
    Dec 2 '15 at 9:39
  • I saw that link. Tried it. Doesnt work with magento 1.9 :( Dec 2 '15 at 10:05
  • Just tried it with version. It's working fine. What issues are you facing ?
    – Prateek
    Dec 2 '15 at 10:29

This link should give you an example of how to achieve this : http://inchoo.net/magento/custom-admin-theme-in-magento/

Although it is not entirely correct for your situation(this I realized after above comments!), as when you switch stores in admin, you are not actually changing store, you are just changing the scope from which admin should fetch values. But, you can go with some logic around query parameters, as when you switch stores in admin, store id/code is added in URLs. So, in observer code in above link, you might go like this :

public function overrideTheme() {
    if (Mage::app()->getRequest()->getParam('store')) {
        Mage::getDesign()->setArea('adminhtml')->setTheme((string)Mage::getStoreConfig('design/admin/theme', Mage::app()->getRequest()->getParam('store')));

Please not, I'm not sure whether Magento sets store ID or code. If it sets code in URL then you can easily convert it to ID.

Next, let's say you added custom theme 'mytheme' in your configuration. Then you can add your customization in template and skin folders. I'd suggest going with skin folder first. If it can be done entirely via skin, then it's probably best, changing templates without properly knowing what they do, can result in a broken admin panel.

So, you'll have something like 'skin/adminhtml/default/mytheme' folder. Copy files from default folder at this level into it. Now, any changes you do on these files will be directly applied to the site's admin panel at appropriate store level.

If you need to customize templates/layouts, then same will go for them. Make a folder at 'app/design/adminhtml/default/mytheme' and copy files from default folder into it. Now, you can modify them as per your requirements.

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.