Category Archives: Themes

○ Define and describe the use of themes in Magento:
■ How you can use themes to customize core functionality?
■ How can you implement different designs for different stores using
Magento themes?
■ In which two ways you can register custom theme?
These code references can be used as an entry point to find answers to the questions above:
■ Mage_Core_Model_Layout
■ Mage_Core_Model_Layout_Update ■ Mage_Core_Model_Design
■ Mage_Core_Model_Design_Package
○ Define and describe the use of design packages:
■ What is the difference between package and theme?
■ What happens if the requested file is missed in your theme/package?
These code references can be used as an entry point to find answers to the questions above:
○ Describe the process of defining template file paths:
■ Which kind of paths (absolute or relative) does Magento use for templates and layout files?
■ How exactly can Magento define which physical file correspond to certain template/layout to use?
■ Which classes and methods need to be rewritten in order to add additional directories to the fallback list?
■ Mage_Core_Model_Layout
■ Mage_Core_Model_Layout_Update
■ Mage_Core_Model_Design
■ Mage_Core_Model_Design_Package
Mage_Core_Block_Template
These code references can be used as an entry point to find answers to the questions
above:
Blocks
■ Mage_Core_Model_Design
■ Mage_Core_Model_Design_Package
■ Mage_Core_Block_Template

Customising Transactional Emails

If it is necessary to change the any of the transactional emails, it is possible to do this from within the administrator interface. First let’s clarify the term transactional email, by this consider the following forms that are generated with the standard operating processes:
Contact Form
Credit Memo Update
Credit Memo Update for Guest
Currency Update Warning
Forget Admin Password
Forgot Password
Invoice Update
Invoice Update for Guest
Log cleanup Warning
Moneybookers activate Email
New Credit Memo
New Credit Memo for Guest
New Invoice
New Invoice for Guest
New Order
New Order for Guest
New Shipment
New Shipment for Guest
New account
New account for Guest
Newsletter subscription confirmation
Newsletter subscription success
Newsletter unsubscription success
Order Update
Order Update for Guest
Payment Failed
Product alerts Cron error
Product price alert
Product stock alert
Remind Password
Send product to a friend
Share Wishlist
Shipment Update
Shipment Update for Guest
Sitemap generate Warnings
Token Status Change

To update any of these forms it is possible to enter the Administrator Backend. Then go to the following menu option System -> Transactional Emails.

Then Add New Template. From the new form that opens:

Backend -> System -> Transactional Emails -> Add New Template -> Load default template

This will allow selection of the forms listed above when selecting the Template* dropdown.

Then select the locale dropdown to define the language option that the new template will be applied to.

When the Load Template button is selected this will populate the bottom half of the form and it will be possible to customise this directly and save it. This template will then be used for the conditions applied.

Modifying Frontend Customer Account List Options

When it comes to customer options, sometimes it is good to give them what they want, worth considering however is limiting the list to what you want them to want, and what is actually available.

By default a customer is likely to get something like the following options:

Customer Account Option Links

This is often far from desirable, and in those situations it is good to remove those choices that simply do not make sense for your installation.

One way of achieving this is with an extension.

Here are the instructional guidelines.

/app/etc/modules/{Namespace}_{Module}.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <{Namespace}_{Module}>
            <active>true</active>
            <codePool>local</codePool>
        </{Namespace}_{Module}>
    </modules>
</config>

/app/code/local/{Namespace}/{Module}/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <global>
        <blocks>
            <customer>
                <rewrite>
                    <account_navigation>{Namespace}_{Module}_Block_Account_Navigation</account_navigation>
                </rewrite>
            </customer>
        </blocks>
    </global>
</config>

/app/code/local/{Namespace}/{Module}/Block/Account/Navigation.php

<?php

class {Namespace}_{Module}_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation {

    public function removeLinkByName($name) {
        unset($this->_links[$name]);
    }
}

This is pretty much it, and sets up the environment for one last change.

In the /app/design/frontend/default/{theme/default}/layout/local.xml file, add immediately before the closing tag:

    <!--
               Customer Profile page
    -->
    <customer_account>
        <reference name="customer_account_navigation">
            <action method="removeLinkByName"><name>billing_agreements</name></action>
        </reference>
    </customer_account>

This will remove the Billing Agreements option. However, add from the following to remove other options that are not needed:

            <action method="removeLinkByName"><name>account</name></action>
            <action method="removeLinkByName"><name>account_edit</name></action>
            <action method="removeLinkByName"><name>address_book</name></action>
            <action method="removeLinkByName"><name>orders</name></action>
            <action method="removeLinkByName"><name>billing_agreements</name></action>            
            <action method="removeLinkByName"><name>recurring_profiles</name></action>
            <action method="removeLinkByName"><name>reviews</name></action>
            <action method="removeLinkByName"><name>tags</name></action>
            <action method="removeLinkByName"><name>downloadable_products</name></action>
            <action method="removeLinkByName"><name>wishlist</name></action>
            <action method="removeLinkByName"><name>newsletter</name></action>

Recurring Profiles =

<action method="removeLinkByName"><name>recurring_profiles</name></action>

My Product Reviews =

<action method="removeLinkByName"><name>reviews</name></action>

My Tags =

<action method="removeLinkByName"><name>tags</name></action>

My Applications =

<action method="removeLinkByName"><name>OAuth Customer Tokens</name></action>

My Downloadable Products =

<action method="removeLinkByName"><name>downloadable_products</name></action>

Resources:
Remove Billing Agreements and Recurring Profiles from Dashboard

Changing The Adminhtml Template Location

This solution came courtesy of the Magento forums, but is so simple, it deserves repetion here:

Create a folder in the /app/design/adminhtml/default/ directory, this will be the name of the new admin theme.

Then modify the local.xml file located in the /app/etc/ directory by adding the following code:

    <stores>
        <admin>
            <!-- default admin design package and theme -->
            <design>
                <theme>
                    <default>{folder_name}</default>
                </theme>
            </design>
        </admin>
    </stores>

Note that for simplicity, it may be ideal to place this code immediately before the closing tag at the end of the file.

Resources:
http://www.magentocommerce.com/boards/viewthread/17306/P15/