I'll try to give a general answer.
How to change templates
In your theme, you can override any
phtml files from the default theme or parent theme. Copy the original file to
app/design/frontend/[package]/[theme]/template/[path/to/phtml] and make your changes.
If you don't have a project specific custom theme yet, for example because you just bought a theme, make sure to create one at
It will inherit from
[original-package]/[default], you do not need to copy everything from default, just the files where you need to make changes.
Module specific changes
An alternative to overriding the
phtml file, is to change the template path. This can usually be done in layout XML like this:
But this is intended to be used by modules who need to switch a template, not for theme specific changes. The new template should be in
How to use local.xml / theme.xml
local.xml file must be in the directory of the actual theme you are using, i.e.
local.xml files in the fallback hierarchy are not taken into account. The first of these that can be found, is used:
(assuming default hierarchy and no custom defined hierarchy)
How to make changes
You should only have modifications in local.xml, not repeat definitions that are already in the original XML files. That also means, avoid copying XML files from the default theme to make changes directly in the files. Keep your theme's
layout directory clean!
Typical elements of
<remove> to remove existing blocks entirely,
<action method="unsetChild"> and
<action method="append"> to move a block from one parent to another, or calling any other methods on existing blocks to modify their behaviour.
Starting with Magento 1.9, best practise is actually to not use
layout/local.xml for these changes, but
In short, you can add a layout update in app/design/frontend/yourpackage/etc/theme.xml. The advantage is that you have control over the load order of your layout updates. Before Magento 1.9 local.xml was always loaded last, and it was impossible to have layout directives be executed after it.
I’m not using local.xml any more for project-specific theme modifications. I think local.xml is just used for backward compatibility reasons (in 1.9 and above) as there is no point in using it any more. Local.xml is also eliminated in Magento 2 (https://github.com/magento/magento2/issues/1037).