Friday 28 March 2014

Magento Add Tab in Product Detail Page.

Please add following code in Page which you want.
















<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<style>
   
.tabset {
    overflow:hidden;
    margin:0 0 -9px;
}
.tabset li {
    float:left;
    margin:5px 11px 0 0;
    padding:0px 0 9px;
        list-style: none;
       
}
.tabset li a {
    display:block;
    padding:8px 20px;
    background:#bfbfbf;
    text-align:center;
    text-decoration:none;
    color:#fff;
}
.tabset li a:hover,
.tabset li.active a,
.tabset li:hover a {background:#eb5594;}
.tab-content-wrap {
    padding:10px;
    background:#fff;
    border:1px solid #dcdcdc;
    min-height: 150px;
        width: 600px;
}
.tab-content {
    display: none;
}
   
</style>


<ul id="collateral-tabs" class="tabset">
    <li class="tab"><a href="#" id="description">Tab-1</a></li>
    <li class="tab"><a href="#" id="additional">Tab-2</a></li>
    <li class="tab"><a href="#" id="tab-3">Tab-3</a></li>
    <li class="tab"><a href="#" id="tab-4">Tab-4</a></li>
</ul>
<div class="tab-container">
    <div class="tab-content-wrap">
        <div class="tab-content tab-description">
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...  
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
        </div>                          
        <div class="tab-content tab-additional">
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...  
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
        </div> 
         <div class="tab-content tab-tab-3">
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...  
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
        </div>
        <div class="tab-content tab-tab-4">
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...  
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when ...
        </div>
    </div>
</div>

<script type="text/javascript">
   
jQuery(document).ready(function(){
    jQuery('.tab:first').addClass('active');
        jQuery('.tab-content:first').fadeIn(400).addClass('active');
        jQuery('.tabset li a').click(function(){
                var newTab = jQuery(this).attr('id');
                jQuery('.tabset li').removeClass('active');
                jQuery(this).parent('li').addClass('active');
                jQuery('.tab-content.active').removeClass('active').fadeOut(100, function(){
                        jQuery('.tab-content.tab-'+ newTab).delay(120).fadeIn(400).addClass('active');
                });
                return false;
        });   
});
   
</script>

Wednesday 26 March 2014

Magento Create Multiple Website.

In magento most uaseful functionality is multiple website. To create multiple wesite in magento follow the following steps.

Stepl-1 Create Root category for other website.

Go To Catalog -> Manage Category and click on "Add Root Category" Button and create root category.
in root category you can add category for other website.

Step-2 Create Wesite , Store & Store view.

Go To System -> Manage stores -> Click on "Create Website" Button

It open new form in form two field vaialable Name & Code

Add Name & Code in form save it.

Note: I have added Name Website2 & Code = wesite2 for example purpose

Next create a store click on create "Create Store" button then open new form in that three field available Website , Name & Root category.

Select a website from Website field. Next add store name in Name field & Select category form Root Category field.

Next create store view clicking in "Create Store View" button. it open new for store view. in that Store , Name , Code , Status , & Short Order field are available.

Select store form Store field. Add name of store view in Name field & add store code & select status from status field.

Finally save store view form.

Step-2 Create website folder in root directory.

create wesite folder (in my case folder name is website2) in root directory add index.php & .htaccess file in website folder from root.

Next Open index.php

Change following lines

$compilerConfig = MAGENTO_ROOT . '/includes/config.php'; // (Approximate line no : 47)

Replace with

$compilerConfig = MAGENTO_ROOT . '/../includes/config.php';



$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; // (Approximate line no : 52)

Replace with

$mageFilename = MAGENTO_ROOT . '/../app/Mage.php';


$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; // (Approximate line no : 82)
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; // (Approximate line no : 85)

Replace with

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'website2'; // Adding website code here
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'website';  // Adding website keyword

Step-3 Set Website Path in System Configuration.

Finally set website path in configuration.

Go System -> Configuration -> Select New website (Website2) form Current Configuration Scope Dropdown













After that Go to System -> Configuration -> General -> Web -> Unsecure Section Add website code name at last in 'Base URL' textbox.













Now clear the cache & create index management. then check in browser

Tuesday 25 March 2014

Magento Sharing Customer Account Globally.

This is magento inbuilt functionality in magento multi website customer register in site-1 that customer can access his acount in site-2.

Go to
System -> Configuration -> Customer -> Customer Configuration -> Account Sharing Options set Share Customer Accounts Global.