Magento's theme hierarchy: base/ vs default/ - magento

In this material I read about themes in magento.
I also talks about default/default folder, but it doesn't specify clearly which is on top of which.
So, if a have mythemepackage/default, default/default and base/default, is default/default reached while getting falledback from mythemepackage to base?

[EDITED]
NO,
If you have below package/theme
1. mythemepackage/mytheme
2. mythemepackage/default
3. default/default
4. base/default
and you have set the package to mythemepackage and default theme to mytheme.
Then Magento first check in mythemepackage/mytheme folder and if not found then check in mythemepackage/default and if still not found then look in base/default.
If not found, a rendering error will occur.

Related

How can I install new theme in Magneto ?

I want to install new theme in magento and I have also followed step of this link (https://www.siteground.com/tutorials/magento/magento_themes.htm) but I am not abling to get theme in magento. Please suggest me how can I install theme in magento ?
Thanks
If you already have the pre-built theme, then in magento project folder navigate to
app/design/frontend/default
Place your theme folder here.
Now to activate your theme. Log in to your admin panel.
Navigate to
system->configuration
Click in the design tab in the left hand side
Under the "Pakage Name" put you package name i.e "default" in this case and under you theme In the "Template" put your theme name "Your_theme_name" i.e your theme folder name that you copied inside default directory.
If you are creating a new theme, just create a new folder inside default directory and follow the step as described above.
In this way you can install a new theme.
Hope this will help.
It depends how theme you want to use is distributed. If it is a package, just extract it to your root folder and you should get proper folders in skin and app/design dirs and what you need to do then is to set correct package and / or theme in backend (Configuration > Web > Design). For full package theme name would probably always be default. Although if you are only adding new theme, you should pick its name app/design/frontend/default/{theme_name} and same in skin folder (if it includes some additional css, images and / or javascript).

Magento Theme Hierarchy

Currently I am moving the theme file from Default/XXX to XXX/default . From
http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
I found out that Magento searches the file in following sequence:
Package/theme->Package/default->Base->default.
Is it possible to make it search the theme like this: Package/theme1->Package/theme2->Package/default->Base->default?
Besides that, will the magento still be loading the default/default theme?
Thx
Magento system will fall back the files using below order.
Using DEFAULT package with DEFAULT theme
1) app/design/frontend/{DEFAULT}/{DEFAULT}
2) app/design/frontend/base/{DEFAULT}
Using DEFAULT package with Custom theme
1) app/design/frontend/{DEFAULT}/{MY-THEME}
2) app/design/frontend/{DEFAULT}/{DEFAULT}
3) app/design/frontend/base/{DEFAULT}
If you are using the Custom Package with Custom theme.
1) app/design/frontend/{CUSTOM-PACKAGE}/{MY-THEME}
2) app/design/frontend/{CUSTOM-PACKAGE}/{DEFAULT}
3) app/design/frontend/base/{DEFAULT}
These above order only magento files are fallback.
Old question but as I stumbled across this I would like to add the newest fallback hierarchy.
Since 1.9 you can define the fallbacks in a theme.xml in your theme folder. See http://alanstorm.com/magento_parent_child_themes for further information.

New custom theme without copying all the default files

I search how to configure a custom theme in Magento Enterprise ver. 1.12.0.2 without doing a copy of all the base/default files.
The only way I can make it is to create my_theme folder in /var/www/magento/app/design/frontend/enterprise/my_theme and then in system>configuration>design to let enterprise as "Current Package Name" and my_theme as "default" in "themes".
But I'm afraid it's not the ideal way in case of upgrading Magento.
Is anyone have an idea ?
Thanks
You're on the right track. What I typically do is create a new Package and Theme. It will still fallback to base/default so you don't have to copy all of the default files into your package. Leave default empty in the Admin -> General -> Design section. Set the Package Name to your package and the other theme settings except for default to your theme name. You'll only need to copy template and layout files that you plan on customizing, so there's no need to copy everything into your theme.
I've tried already but it didn't worked....
I found why in
http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
"2nd Exception to Rule 6: Enterprise customers for now DO need to copy the files from enterprise/default into their custom package as a starting point. In a future release, the Enterprise files will be folded into the base/default directories but they are not in EEv1.8."

Remove a magento theme - Rollback to default

This is my first time working with Magento and here is what happend: I spent two days reading the documentation and tweaking the settings to fit my needs. I then installed this theme:
http://themeforest.net/item/decostore-magento-theme/1876494?WT.ac=category_thumb&WT.seg_1=category_thumb&WT.z_author=8theme
The problem is that the theme didn't work the way I was expecting and now I'd like to rollback to the default theme and completely remove everything added by this theme to my installation.
Unfortunately, I didn't backup the installation and database before I installed the new theme and I have no idea where to start.
Thanks in advance.
1. Switching back to default theme
Go to the admin area and then system > configuration > design
Change "Current Package Name" to 'default' and make sure all inputs under the "Themes" section are empty. This will return you to the default theme.
2. Completely remove everything added by this theme
I take it from your question that you are not using any form of source control. Might be an idea to look into this for the future :)
Magento 1.7 has introduced backup and rollback features so you may also want to check that out.
If this is the case, backup everything before you start removing files and directories as described below
Anyway, to completely remove all files and directories added when you installed the module, unfortunately it will simply be a case of manually finding the files and directories deleting.
The easiest way to do this will be to find the original source code you received when you purchased the theme and removing the corresponding files from your site. When removing directories be careful to only remove those specific to the theme - It will have been sent to you structured so that you can easily drag straight in to your web root - so will contain some other directories required by Magento, simply to give it the correct hierarchy.
At the very least there will be files and folders specific to the theme located in the following directories:
app/design/frontend
skin/frontend
js
and also most likely some more in the following:
app/etc/modules
app/design/adminhtml
app/locale
I know the result for this can be different for everyone, but in case someone else comes across my specific case, it was the N98 folder under app/code/community/N98 that caused the problem. Particularly their CustomerGroupCheckout plugin as shown here: https://github.com/amenk/N98_CustomerGroupCheckout
Removing the N98 folder brought back the configuration page.

Magento: theme fallback hierarchy question

Can someone verify what I think is what's happening with Magento's fallback theme hierarchy.
The final fall-back point is the /base/default/ theme.
Within your interface/package (they are the same things right?), your default theme is selected at, from the Magento admin page, System->Configuration->General->Design->Themes->"B" ("B" is an example name of the theme).
On top of your default package theme, you can select an active theme from System->Design->"A".
So with this setup, Magento will look into "A" first, then in "B", then finally resort to base/default if neither A or B has files it needs.
Correct or no? TIA!
Sorta.
The fall-back hierarchy in Magento CE v1.4+ and EE v1.8+ is as follows.
Look for requested file in:
app/design/frontend/custom_package/custom_theme/
skin/frontend/custom_ package/custom_theme
If not found, look for requested file in:
app/design/frontend/custom_package/default
skin/frontend/custom_package/default
If not found, look for requested file in:
app/design/frontend/base/default
skin/frontend/base/default
If not found, a rendering error will occur.
Source: Magento's Theme Hierarchy - Changes in CEv1.4 and EEv1.8
I will do my best to clarify some points for you.
If you are not using a child theme, magneto will use /base/, however if you have a child theme active, magneto will use your custom theme files.
For example, If your new theme file has a header.phtml file but not footer.phtml, Magento will automatically fall back to the base. this is why its never smart to edit core files

Resources