Change Magento Package, Theme and Skin programmatically on the fly


When working on Magento website, you may get requirements to change store design on fly. For example, you want to add an option on store’s frontend to change skin. When you get such requirements from your client, don’t worry because you can achieve this functionality very easily.

You can paste below code in action method for which you want to change Package/Theme/Skin

Change Package and Theme:

Mage::getDesign()->setArea('frontend') //Area (frontend|adminhtml)
        ->setPackageName('default') //Name of Package
        ->setTheme('modern'); // Name of theme

Change Package:


Change Theme:


Change Skin:

Mage::getDesign()->setTheme('skin', 'CUSTOM_SKIN_NAME');

Below are some useful methods to get current design configurations.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: