Thursday 3 July 2014

How to install and use Magmi for Magento?

The benefits of Magmi:
  • Super fast, direct SQL import.
  • Enhanced features (simple and advanced imported products)
  • Multiple storeviews and Websites possible
  • Import and update: categories, images, pricing, stock, .... (not bundled)
  • Translations of products at store level view
Installation and configuration:
The installation from Magmi is very simple. Magmi is a standalone plugin completely beside your Magento installation. It interacts directly with your Magento database.So, extract the Magmi folder in the root folder of your Magento installation. Create now the following folders in your Magento root folder:
  • /var/import (directory to import csv files)
  • /media/import (directory for the import of product images)
Visit the magmi configuration page: http:// <magento-url> /magmi/web/magmi.php
Now you only have to make the database configuration of your Magento site in Magmi, fill out and save. All other parameters are standard to use if you have followed the above folder structure.


Step 1:  product import:

The item processors are very useful plugins to do an advanced import. Check this item processors for our first product import:
  • On the fly category creator / importer (allows for category titles instead of IDs to use)
  • Image processing attributes (corresponding import product images)
You can also check all plugins to avoid problems.

CSV example:

sku;name;price;qty;is_in_stock;visibility;image;weight;categories;tax_class_id
demo-001;"Demo 1";12;19;1;4;demo.jpg;0;"demo categorie";2


Save generated csv file in the directory /var/import from magento and optionally post the image demo.jpg in the /media/import folder, you can select the csv file from the Data Sources tab of the Magmi imports page. Select the imported file from the dropdown, use ‘;’ as separator and " as enclosure. Go to the top of the 'Run magmi' tab and select "Create new items, new ones skip” and click Run.

When the import is successful you get a summary of the statistics from your import. You will get a list of error messages, when there is an import problem.
Go to the Magento backend and check if your first product was added to Catalog > Manage Products.
To view your product in the frontend, you need to re-index magento: System > index management.
 This simple import is done with the minimum data required in magento. Just a list of parameters:
  • SKU (unique number of a product)
  • name (title of your product)
  • price (price of your product)
  • Qty (quantity of products in stock)
  • is_in_stock (0 for no or 1 for yes, 1 is necessary to visualize your product in the shop)
  • visibility (4 for visibility in catalog and search)
  • Image (url of the image which is placed in the /media/import directory)
  • weight (weight can be 0 if you do not use it in your shop)
  • categories (the name of the category, if it does not exist it is created by the "on the fly category creator" plugin "demo/demo” to import in a subcategory)
  • tax_class_id (2 for products with taxes or use a self-configured value)

Advanced product imports:

This more advanced import allows you to use almost all parameters inside your Magento site.

A closer look to use some additional parameters:
  • store (default "admin" or a storeview to make translations possible. You can overwrite the title and description from "admin" at store level view).
  • websites (default "base" or the code of the Web site where you want to add the products, only to be used for a Magento installation with multiple sites)
  • attribute_set ('Default' or a self-generated code for a product with special attributes)
  • Type (default 'simple' or 'configurable' to import configurable products)
  • media_gallery (add extra images in addition to the standard picture)
  • See also the most common attribute codes within magento: http://go.magento.com/support/kb/entry/name/working-with-product-csv-files

Wednesday 18 June 2014

Exception printing is disabled by default for security reasons

Error :
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX
Solution :

After installation of magento then some of pages shows this error.
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX

In this case you need to check following steps.
1) Go to folder /home/username/public_html/errors/
2) cp -p local.xml.sample  local.xml
3) vi /home/username/public_html/lib/Zend/Cache/Backend/File.php
and search

protected $_options = array(
'cache_dir' => 'null',


and Change it to:

protected $_options = array(
'cache_dir' => 'tmp/',
Save the changes.


Create “tmp” folder under “/home/username/public_html/” folder.

Thats all! done

How can I remove index.php from url in magento ?


If you want to access your magento URL without index.php for example:

http://domain.com/index.php/category
to
http://domain.com/category

then use the following steps

1) Login to admin section by using the URL
http://domain.com/index.php/admin

2) then go to “System >>  Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

3) Go to “System >>  Configuration >>Web >>Secure”
Use secure URL Frontend: YES

4)Then create the .htaccess file under your the magento installed folder.

If the magento installed under document root ( /home/username/public_html) then add follogig rules into .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


and If the magento installed under /shop or directory then add the following rules into ” /home/username/public_html/shop/.htaccess ” file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>


Done

How to create a dropdown list of countries in Magento ?

The list of countries in Magento doesn’t work like all other data collections. Rather than store country data in the database, Magento stores country data in an XML file and loads it in on each request.There were some simple functions we can use to access country names and codes in Magento. In this post, I will guide you through how to create a drop-down list of countries in Magento:




Get An Array of Country Names/Codes in Magento

<?php
 
    $countryList = Mage::getResourceModel('directory/country_collection')
                    ->loadData()
                    ->toOptionArray(false);
 
    echo '<pre>';
    print_r( $countryList);
    exit(');
?>
 
The above code will print out an array containing every country code and country name known to Magento.
 

Drop Downs and Country Information

The most common reason developers access country names in Magento is to create a drop down. There are several ways to accomplish this and they differ depending on whether you’re in the admin (backend) or the frontend.

Creating a Country Drop-Down in the Magento Frontend

You can add the following code to any template file in the frontend of Magento and you will get a drop down box using the country name as the label and the country code as the value.
 
<?php $_countries = Mage::getResourceModel('directory/country_collection')
                                    ->loadData()
                                    ->toOptionArray(false) ?>
<?php if (count($_countries) > 0): ?>
    <select name="country" id="country">
        <option value="">-- Please Select --</option>
        <?php foreach($_countries as $_country): ?>
            <option value="<?php echo $_country['value'] ?>">
                <?php echo $_country['label'] ?>
            </option>
        <?php endforeach; ?>
    </select>
<?php endif; ?>
 

Creating a Country Drop Down in the Backend Magento Admin

When creating forms in the Magento Admin area, it is very rare that we use actual HTML. The reason for this is that forms are generally built using pre-built functions. The benefit of this is that each Admin page looks uniform and helps to keep Magento looking like one whole application rather than having loads of bits stuck onto it. As our method of adding HTML changes, so must our method of creating our country drop down.
<?php
 
    $fieldset->addField('country', 'select', array(
        'name'  => 'country',
        'label'     => 'Country',
        'values'    => Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(),
    ));
 
?>
 
I hope you find this tutorial helpful!
 

 




How to setup cross sell in Magento ?

Cross-selling is the action or practice of selling among or between clients, markets, traders, etc. or the action or practice of selling an additional product or service to an existing customer. For Magento, products that are offered as cross-sell will be automatically showed on the checkout cart page before the customer start with their checkout process.
This tutorial shows you how to setup Cross Sell for your Magento store to increase sales.

To set up cross-sell products:

In the admin panel, select Product Information on the left and click Cross-sells.

Next, click the Reset Filter button in the upper-right to list all the available products, or use the search filters at the top of each column to find specific products.


 In the product list, select the check-box of any product you want to feature as a cross-sell.
When finished, click the Save button.Now the selected products will be showed in Checkout Process as Cross Sell products.


How to add date picker to Magento admin backend page?

To add Date Picker to Magento admin backend configuration page. There is no direct model that can be called to add the date picker. However, these simple steps will allow you to add the date picker to back-end of your Magento site.

Step 1.

Edit system.xml, create the new field as follows:

<my_date translate="label comment">
<label>Expire On</label>
<frontend_type>text</frontend_type> <!-- Set the frontend type as Text -->
<frontend_model>MODULE_NAME/adminhtml_system_config_date</frontend_model> <!-- Specify our custom model -->
<sort_order>4</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Set the expiry date for the Feature Tour</comment>
</my_date>
 
 

Step 2.

Create the new model file at the path: app\code\local\<NAMESPACE>\<MODULE>\Block\Adminhtml\System\Config\Date.php 


<?php
class Arvtour_Tour_Block_Adminhtml_System_Config_Date extends Mage_Adminhtml_Block_System_Config_Form_Field
{
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $date = new Varien_Data_Form_Element_Date;
        $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
 
        $data = array(
            'name'      => $element->getName(),
            'html_id'   => $element->getId(),
            'image'     => $this->getSkinUrl('images/grid-cal.gif'),
        );
        $date->setData($data);
        $date->setValue($element->getValue(), $format);
        $date->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT));
        $date->setForm($element->getForm());
 
        return $date->getElementHtml();
    }
}
 

How to change favicon of your magento site

Changing favicon of a magento site is very easy without making any changes to code. Here were the steps to follow:

First method:

Go to System->configuration->Design
Under design open HTML Head Tab and upload your favicon ico and Click Save Config Button


Second Method:

To change the favicon ico in magento to paste your favicon ico instead of magento favicon ico (remove magento favicon ico and paste your favicon ico) in following folders



(localhost address)
After paste favicon ico clear the browser history and again login your magento admin panel and also Refresh front page

Thursday 5 June 2014

How will you call a CMS page in your module’s PHTML file?

$this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘blockidentifier’)->toHtml();

What is codePool in Magento?

codePool is a tag which you have to specify when registering new module in app/etc/modules/Company_Module.xml
There are 3 codePools in Magento: core, community and local, which are resided at app/code/ directory.
Core codePool is used by Magento core team, Community is generally used by 3rd party extensions and Local codePool should be used for in-hour module development and overriding of core and community modules for custom requirement.
So in short, codePool helps Magento to locate module inside app/code/ for processing.

When will you need to clear cache to see the changes in Magento?

When you have added/modified XML, JS, CSS file(s).

How will you enable product’s custom attribute visibility in frontend?

In the Manage Attributes section of the custom attribute, select Visible on Product View Page on Front-end and Used in Product Listing to Yes.

What is the difference between EAV and flat model?

EAV is entity attribute value database model, where data is fully in normalized form. Each column data value is stored in their respective data type table. Example, for a product, product ID is stored in catalog_product_entity_int table, product name in catalog_product_entity_varchar, product price in catalog_product_entity_decimal, product created date in catalog_product_entity_datetime and product description in catalog_product_entity_text table. EAV is complex as it joins 5-6 tables even if you want to get just one product’s details. Columns are called attributes in EAV.
Flat model uses just one table, so it’s not normalized and uses more database space. It clears the EAV overhead, but not good for dynamic requirements where you may have to add more columns in database table in future. It’s good when comes to performance, as it will only require one query to load whole product instead of joining 5-6 tables to get just one product’s details. Columns are called fields in flat model.

How many database tables will Magento create when you make a new EAV module?

Magento creates 6 tables when you create new EAV module. Tables: module, module_datetime, module_decimal, module_int, module_text and module_varchar. one is the main entity table, and rest 5 tables which holds attribute’s data in different data types. So that integer values will go to module_int table, price values to module_decimal, etc.

Explain different types of sessions in Magento (e.g. customer/session, checkout/session, core/session) and the reason why you store data in different session types?

Customer sessions stores data related to customer, checkout session stores data related to quote and order. They are actuall under one session in an array. So firstname in customer/session will be $_SESSION['customer']['firstname'] and cart items count in checkout/session will be $_SESSION['checkout']['items_count']. The reason Magento uses session types separately is because once the order gets placed, the checkout session data information should get flushed which can be easily done by just unsetting $_SESSION['checkout'] session variable. So that the session is not cleared, just session data containing checkout information is cleared and rest all the session types are still intact.

What are the commonly used block types? What is the special in core/text_list block type.

Commonly used block types: core/template, page/html, page/html_head, page/html_header, page/template_links, core/text_list, page/html_wrapper, page/html_breadcrumbs, page/html_footer, core/messages, page/switch.
Some blocks like content, left, right etc. are of type core/text_list. When these blocks are rendered, all their child blocks are rendered automatically without the need to call getChildHtml() method.

How to configure tier pricing ?

In order to configure tier pricing please follow the steps below:
1. Log in to the Magento admin panel and open the product configuration page.
2. In the “Prices” tab you can see the “Tier Price” section. Tier prices are used for those customers who are willing to order multiple products and you want to reward them by giving a discount. Once you’ve added the tier price, you can select the customer group that the price will be valid for.

magento tier pricing 1 300x185 How to configure tier pricing ?

3. Set the website, the quantity of products and a new price.

How to display New products in Magento?

Hello Magento lovers!, have you ever wanted to display New products in your store by just setting the product “Set Product as New from Date” within the product configuration in your Admin-panel?. It simple, luckily Magento provides php functions to do almost anything you wish, in this case we’ll use the Mage::getResourceModel(‘catalog/product_collection’) features:
We’ll create a template file called: new_products.phtml
The content would be:


<?php
$todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
 
$_productCollection=$this->getLoadedProductCollection();
$_productCollection = Mage::getResourceModel(‘catalog/product_collection’)
->addAttributeToSelect(‘*’)
->addAttributeToFilter(‘news_from_date’, array(‘date’ => true, ‘to’ => $todayDate))
->addAttributeToFilter(‘news_to_date’, array(‘or’=> array(
0 => array(‘date’ => true, ‘from’ => $todayDate),
1 => array(‘is’ => new Zend_Db_Expr(‘null’)))
), ‘left’);
 
$now = date(“Y-m-d”);
$newsFrom= substr($_productCollection->getData(‘news_from_date’),0,10);
$newsTo=  substr($_productCollection->getData(‘news_to_date’),0,10);
 
?>
 
<?php if(!$_productCollection->count()): ?>
<div>
<?php echo $this->__(‘There are no products matching the selection. Please provide a category ID.’) ?>
</div>
<?php else: ?>
 
Then you can call this template by adding a block call like this in your CMS content pages:
 
 
{{block type="catalog/product_list" template="catalog/product/new_products.phtml"}}

How to import products in Magento using CSV files?

It is rather inconvenient to manually add a large number of products at once to a Magento installation. Inserting products one by one will take a long time especially when you have hundreds or thousands of products.In such cases you need an automatic way to add all those products to your Magento online store. We will address all steps you need to take in order to achieve a successful import.
First, access your Magento administrator backend and go to Catalog -> Manage Categories.
magento tier pricing 11 300x160 How to import products in Magento using CSV files?

Create all product categories you will need. You can do so by filling the form displayed below:

magentoimportprod02 300x160 How to import products in Magento using CSV files?

When you fill the form with all the information you like click the Save Category button.

magentoimportprod03 300x160 How to import products in Magento using CSV files?

Bear in mind that at this point you should make note of the newly created category ids. It would be best to save them in a simple text file as you will need them for the import. The category ID will be displayed upon saving the category. It is recommended to make notes as shown below

magentoimportprod04 300x160 How to import products in Magento using CSV files?

If you plan to have additional attributes for the products you are importing you will need to create those via Catalog ->Attributes ->Manage Attributes -> Add new Attribute. You can use this functionality to add all custom attributes that are not present by default in a standard Magento installation. Note also that you can add additional attributes later at the moment you are creating a sample product. It is up to you whether to create the attributes before that or at the point you are creating the first product.
The next step is to manually add a product to your Magento installation. You will later export this product and use it as a template for importing the large batch. Make sure you include all attributes you will use for the products you are going to import in the sample product. You might want to delete all default products that might be present as you will not need them and then create the new product you will use as a template for the import.
Once you create the new product and save it it will appear in the products list for your Magento store.

magentoimportprod06 300x160 How to import products in Magento using CSV files?

You are now ready to make the sample export that you will use as a template. In the Magento administrator area go to System -> Import/Export -> Dataflow – Profiles -> Export All Products. Under Profile Information -> Store choose the desired store where you will be importing the products. This should also match the store where you have previously created a sample product. Under Data Transfer drop down menu choose Local/Remote Server. Under Data Format make sure CSV / Tab Separated is selected for type and click Save Profile. Then click export all products again and click Run Profile in Popup.

magentoimportprod07 300x160 How to import products in Magento using CSV files?

This will save a file named “export_all_products.csv” under the var/export/ directory for your Magento installation. The export success screen will look like this and will specify the file name where the products were exported.

magentoimportprod08 300x160 How to import products in Magento using CSV files?

magentoimportprod08 How to import products in Magento using CSV files?
Using an FTP client download this file to your local computer. The file will include columns for each of the attributes you have defined for your products. Open it in a spreadsheet program (MS Excel, Open Office Spreadsheet) and add the products you would like to import. Make sure you are copy/pasting the corresponding attributes in the correct columns. Also here is when you will have to add the category IDs. Use the IDs from the text file you saved earlier and put the corresponding category ID for the products you are adding.
Once you have accomplished the above go back to the Magento administrator area and choose System -> Import/Export -> Dataflow – Profiles -> Import All Products. Then choose Upload file and browse for the .csv file that you have updated with the products that need to be imported. Once you have uploaded it click Import All Products again, then Run Profile, select the .csv file you have just uploaded from the drop down menu and click Run Profile in Popup. A status screen will open and the products will start importing

magentoimportprod09 300x160 How to import products in Magento using CSV files?
When the import completes you will get an export success message.

magentoimportprod091 300x160 How to import products in Magento using CSV files?

You can now go to the products section of the Magento administrator backend and check the imported products. They will be present there and assigned to the corresponding categories with the attributes you have added for them.

How to Use the Magento CMS Features?

In order to manage your web site pages you need to navigate to the CMS section in the Magento admin area. Click on the Manage Pages link in order to proceed with the pages modification.

23 300x160 How to Use the Magento CMS Features?

You can edit a page by clicking on it. The Edit Page will open the window below:

24 300x160 How to Use the Magento CMS Features?

You can modify this page to your preference. Static blocks is another useful option. For example, you can edit the footer block which contains the links located at the bottom of your main page:

25 300x160 How to Use the Magento CMS Features?

The Polls section allows you to create and edit polls:

26 300x160 How to Use the Magento CMS Features?

Actually, magento has a fully-featured CMS system integrated in it. Browse through the pages to see the different elements you can add to your site.

Magento Restricted CMS Pages:

Step1
First goto   “app\design\frontend\default\[your theme directory]\template\page”
make a copy of your template page it can be “1column.phtml” or “2columns-right.phtml”…. whatever you are using.
rename it to “restricted.phtml”  and paste the below code just after body tag starts.


&lt;?php <code>$login</code> <code>= Mage::getSingleton( </code><code>'customer/session'</code> <code>)-&gt;isLoggedIn(); </code><code>//Check if User is Logged In</code>
<div><code> </code><code>if</code><code>(!</code><code>$login</code><code>)</code></div>
<div><code> </code><code>{</code></div>
<div><code> </code><code>$msg</code> <code>= Mage::getSingleton(</code><code>'core/session'</code><code>)-&gt;addError(</code><code>$this</code><code>-&gt;__(</code><code>'Please Sign in / Register first to access this page.'</code><code>));</code></div>
<div><code> </code><code>header(</code><code>'Location: '</code><code>. Mage::getUrl(</code><code>'customer/account/login'</code><code>));</code></div>
<div><code> </code><code>exit</code><code>;</code></div>
<div><code> </code><code>}</code></div>
<div>?&gt;</div>
<div>
 
 
goto “\app\code\core\Mage\Page\etc”  and open “config.xml”
add this code just befor “</layouts>” tag


<div>
<div><code>&lt;</code><code>allowed_user</code> <code>module</code><code>=</code><code>"page"</code> <code>translate</code><code>=</code><code>"label"</code><code>&gt;</code></div>
<div><code> </code><code>&lt;</code><code>label</code><code>&gt;Only Registerd / Sign in users&lt;/</code><code>label</code><code>&gt;</code></div>
<div><code> </code><code>&lt;</code><code>template</code><code>&gt;page/restricted.phtml&lt;/</code><code>template</code><code>&gt;</code></div>
<div><code> </code><code>&lt;</code><code>layout_handle</code><code>&gt;page_allowed_user&lt;/</code><code>layout_handle</code><code>&gt;</code></div>
<div><code> </code><code>&lt;/</code><code>allowed_user</code><code>&gt;</code></div>
<div></div>
</div>
 
 
Now open you “admin” ,” cms”  and “add new page”
and you will find new select option under “design” tab in “Layout” option.
just select “Only Restricted/ sign in user”. Rest will be handelled by the code icon smile Magento Restricted CMS Pages
magento restricted page Magento Restricted CMS Pages
 
 


 
 

How do I remove the “Log In”-link in the top links area ?

I feel the “Log In”-link in the header is waste of space as the “My Account”-link on the left side in the same area does the trick pretty ok, but I havent figured out how to remove it from the loop in the code which generated those toplinks.
I would need to add a “Logout”-box in the “My Account” area if this was to be removed, or place a “Logout”-link somewhere else, but guess that wont be any problem.
You have to go to app/design/frontend/default/default/layout/customer.xml.
Remove the action method :

<action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>

How to add a Contact Us form in Magento ?

Magento includes contact form functionality by default. A link to a contact form can usually be found in the footer of your Magento installation.
Of course, you can add a contact form on any page. All you need to do is:
Log in to the administrator area.
Go to CMS > Pages.
Select the page you want to edit or create a new page.

Paste the following code using the HTML option of the WYSIWYG editor:
<!– CONTACT FORM CODE BEGIN–>
{{block type='core/template' name='contactForm' template='contacts/form.phtml'}}
<!– CONTACT FORM CODE END–>

Save the changes and the contact form will appear on the desired page.

Magento – get Skin Url

This method return the path url of the current selected Skin.


<?php
 $this->getSkinUrl();
 ?>

How to View all modules system config.xml in Magento?

In Magento Config.xml file is used to setup the module details. We used to setup config.xml file in PackageName/ModuleName/etc/.
Magento collect all the config data from different modules and combine it all into a single file named config.xml.
To view this file simply paste this code in any controllers, run it and see the magic. A huge tree with lots of nodes.


<?php header('Content-Type: text/xml');
 //header('Content-Type: text/plain');
 echo $config = Mage::getConfig() ->loadModulesConfiguration('config.xml') ->getNode() ->asXML();
 exit();
 ?>

Magento – check if coupon code used:

Once on the Onepage Checkout page, I need to track if the customer has used any specific coupon code. This can be checked by the checkout session.
Use this code to hunt up the coupon code. This code will return the coupon code if used or empty result.


<?php
 $coupon_code = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode();
 if($coupon_code){
      echo "coupon used";
       }
       else
       {
            echo "coupon not used";
             }
              ?>

Magento – Get base url inside controller:

Magento’s $this->getBaseUrl() method works inside template and blocks only but not in the controllers because it’s a Core_Block class method. To get the base url inside controller use instead this method.


<?php
 Mage::getUrl();
 ?>

Magento – view entire system config – system.xml :

In Magento modules, system.xml file is used to create admin configuration tabs and options. Magento’s great feature allows developers to create advanced configurable modules in a little time. At the run time Magento collects all the xml files and group them into a single file.
To view the system.xml file simply paste this code snippet in any controllers and run it. A large xml will be open.


<?php
 //header('Content-Type: text/plain');
  header('Content-Type: text/xml');
   echo $config = Mage::getConfig()
    ->loadModulesConfiguration('system.xml')
     ->getNode()
     ->asXML();
    exit();
    ?>

Magento – Add Remove top links using Layout.xml:

Removing or Adding top links in the header section of the theme is very easy via Layout.xml files. However we need to edit multiple files to accomplish this task like wishlist.xml, customer.xml, checkout.xml etc.
1. To Remove Wishlist link from top links
—————————————————————————–
Open the file /app/design/frontend/package/theme/layout/wishlist.xml and find the lines given below, simply comment these lines to remove the wishlist link.
?
1
2
3
4
5
6
<!--
<reference name="top.links"
   <block type="wishlist/links" name="wishlist_link"/>
    <action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
 </reference>
-->
2. To remove My Account link
—————————————————————————————
Open the file /app/design/frontend/package/theme/layout/customer.xml and find the lines and comment these lines.
?
1
2
3
<!--<action method="addLink" translate="label title" module="customer"><label>My Account</label>
 <url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/> <position>10</position> </action>
-->
3. Add Home Link in top menu
—————————————————————————————-
Open the file /app/design/frontend/package/theme/layout/customer.xml and search the line
‘’
Under the ‘’ add these lines.
?
1
<action method="addLink" translate="label title" module="customer"> <label>Home</label><url helper="core/url/getHomeUrl"/><title>Home</title><prepare/><urlParams/> <position>10</position> </action>
4. To Remove or Add Checkout and My Cart link in top menu
———————————————————————————————
To show or hide the Checkout and My Cart link in the top links just comment or un-comment these lines in /app/design/frontend/package/theme/layout/checkout.xml file.
?
1
2
3
4
5
6
<?php
 //My Cart link
 <action method="addCartLink"></action>
  //Checkout link
  <action method="addCheckoutLink"></action>
  ?>