Wednesday, 11 July 2012

how to display all child category according to position in magento

php
$cats = Mage::getModel('catalog/category')->load(3)->getChildrenCategories();
?>



53. wordpress blog show on home page
http://fishpig.co.uk/wordpress-integration/docs/recent-posts-block.html

Extension :-
http://www.magentocommerce.com/magento-connect/wordpress-integration.html
-----------------------------------------------------------------------------------------------------------

how to display all child category according to id in magento

php
$cats = Mage::getModel('catalog/category')->load(3)->getChildren();
$catIds = explode(',',$cats);
?>


Friday, 6 July 2012

How to check HTTPS



2
$_SERVER['HTTPS'] - this check HTTPS or HTTP
3
$_SERVER['SERVER_NAME'] - this return server name
4
$_SERVER['REQUEST_URI'] - this return client request
5

6
//assign the URL to variable
7
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
8
//display the URL
9
echo $url;

magento bd connection


$conn = Mage::getSingleton('core/resource')->getConnection('core_write');
$conn->query("insert into table name (fields) values (values) ");

no conflict javascript code







Php mail function



$mail_to="mukesh@gmail.com";
$sub="Contact Information";
$msg="































 


Contact Information
Name". $_REQUEST['name']."
E-Mail".$_REQUEST['email']."
Message".$_REQUEST['message']."
";
  $headers = "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
  $headers .="From: ".$_REQUEST['email'];

 ini_set("SMTP","gmail.com");
 ini_set("smtp_port","25");


mail($mail_to,$sub,$msg,$headers);


print("");
//info@essveecollection.com
 ?>

Paypal Form














     









language translation java script




Magento important link

Mukesh kumar saini magento usefull link :-


0. 360 degree roted image in magento
 http://www.jquery4u.com/plugins/jquery-360-degrees-image-display-plugins/
-----------------------------------------------------------------------------------------------------------
1. Best seller TopRating/Populer/Reviews/New/BestSeller
http://www.magentocommerce.com/magento-connect/Magazento/extension/6647/magazento_homesellers

{{block type="homepage/topsell" template="magazento/homepage/topsell.phtml"}}

{{block type="homepage/new" template="magazento/homepage/new.phtml"}}

{{block type="homepage/popular" template="magazento/homepage/popular.phtml"}}

{{block type="homepage/toprated" template="magazento/homepage/toprated.phtml"}}

{{block type="homepage/review" template="magazento/homepage/review.phtml"}}

Extensions
http://www.ecommercecircle.com/magento-extensions-ecommerce-store_3912793.html

-----------------------------------------------------------------------------------------------------------
2. I-Banner

http://www.magentocommerce.com/magento-connect/magestore/extension/1850/banner-slider
-----------------------------------------------------------------------------------------------------------

3.  y_ibanner
http://www.magentocommerce.com/magento-connect/Theodore+Doan/extension/4330/m
-----------------------------------------------------------------------------------------------------------

4. extension for blog

http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks

-------------------------------------------------------------

5. extension for joom image

Mpycho_Jquery_Lightboxes
http://192.168.1.11/sextoynew/

-----------------------------------------------------------

6. Create product type
http://www.zetaprints.com/magentohelp/web-to-print-product-type-compatibility/#config
--------------------------------------------------------------------------------------------
7. For shipping
http://addoa.com/blog/how-restrict-free-shipping-magento
http://www.magentodevelop.com/blog/category/magento-admin/magento-shipping

-----------------------------------------
8.  Live chat extension

http://www.magentocommerce.com/magento-connect/isidore/extension/3246/zopim-live-chat

Shipping extension
http://www.webshopapps.com/
---------------------------------------------------------------------------------------
9. For onsale
http://www.magentocommerce.com/magento-connect/thirty4+interactive/extension/841/catalog-sale-items
++++++
http://www.h-o.nl/blog/display-special-priced-products-on-homepage-magento/

10. FOR ON SALE

http://www.magentocommerce.com/boards/viewthread/16098/

http://jainsamaj.org/rpg_site/literature4.php?id=89
http://www.magentocommerce.com/boards/viewthread/16098/

-----------------------------------------------------------
11. display random product
http://blog.decryptweb.com/random-products-in-magento/

---------------------------------------------
12. randon best seller
http://www.magikthemes.com/question-answers/how-to-display-random-products-on-home-page-in-magento-theme/

----------------------------------------------------
13. onsale product extension

http://www.mage-world.com/advance-on-sale-products-magento-extension
http://www.magentocommerce.com/magento-connect/developer/clockworkgeek
-------------------------------------------------

14. pagging with new arrival products

http://www.magentocommerce.com/boards/viewthread/31159/
--------------------------------------------------------

15.  MP3 Player Extension
http://www.webdesignbooth.com/10-easy-to-implement-flash-based-mp3-players-for-your-website/

http://www.magentocommerce.com/magento-connect/desv.us/extension/5390/mp3_flash_player

http://www.instantshift.com/2010/02/10/21-free-music-players-for-your-website/

----------------------------------------------------------------

16. Free Testmonial extension
http://www.magentocommerce.com/magento-connect/Turnkeye.com/extension/4876/testimonials_pro
 
---------------------------------------------------------------
17. Contacu Us form
http://www.mage-world.com/quick-contact-extension-for-magento
Free module
http://www.magentocommerce.com/magento-connect/rebimol/extension/7232/webforms
-------------------------------------------------------------
http://www.richardcastera.com/blog/magento-add-additional-fields-to-the-contact-form
--------------------------------------------------------------------------------------------------
18. Cloth Extension
For clolor
http://demo.temgra.com/index.php/color-views/color-views-magento-extension-magento-plug-in.html

http://www.magentocommerce.com/magento-connect/temgra/extension/893/color-swatches


(a)most Extension link
http://techdad.wordpress.com/2010/02/20/most-downloaded-magento-extensions/
----------------------------------------------------------------------------------------

19. Remove All default link http://www.magentocommerce.com/knowledge-base/entry/turning-on-off-magentos-content-blocks/

http://store.belvg.com/demo/iconoptions/configurable-product.html

--------------------------------------------------------------------

20. Extension for blog
http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks


21. How to upload product using CSV file

http://www.magentocommerce.com/magento-connect/capacitywebsolutions/extension/4421/import_products_categories__multiple_images_and_custom_options

---------------------------------------------------
22.Light box

http://www.magentocommerce.com/magento-connect/TemplatesMaster/extension/1487/magento-easy-lightbox

-------------------------------------------------------------------
23.Magento dropdwon super menu
http://web-experiment.info/webandpeople-custom-menu-extension.html

--------------------------------------------------------------
Paid dropdown
http://www.manadev.com/demo/drop-down-list-for-layered-navigation/index.php/electronics.html?___store=checkboxes&___from_store=default

--------------------------------------------------
24.Use for shorting it's paid 19$
http://www.magentocommerce.com/magento-connect/Mana+Team/extension/7480/drop-down-list-for-layered-navigation

------------------------------------------------------
For dropdown menu
http://www.magentocommerce.com/magento-connect/EMThemes.com/extension/5163/em_catalogmenuwidget

------------------------------------------------------
Paid only 1$
http://www.magentocommerce.com/magento-connect/WebAndPeople/extension/5765/wp_custom_menu

-------------------------------------------------------
25. Shippimg skip method/Skip
 http://winvinod.blogspot.com/2011/06/skip-shipping-method-from-onepage.html

------------------------------------------------------
26.skip onpage checkout
http://connect20.magentocommerce.com/community/Crius_SkipStep1

------------------------------------------------------------
27.Very most all extensions
http://techdad.wordpress.com/2010/02/20/most-downloaded-magento-extensions/
----------------------------------------------------------------------------
28.for Recurring profile
http://www.magentocommerce.com/knowledge-base/entry/working-with-recurring-profiles
----------------------------------------------------------
29.Gift cart
http://ecommercesoftwaresolutionsonline.com/magento-services-pricing/magento-extensions/magento-free-gift-product-extension.html
http://www.magentocommerce.com/magento-connect/varyous/extension/3570/freegift
--------------------------------------------------------
30.Free Price complain
http://www.magentocommerce.com/magento-connect/Magazento/extension/6646/magazento_priceproposal
---------------------------------------------------------
30.reques catalogue form
http://www.magentocommerce.com/boards/viewthread/72142/
call modules:{{block type=\"catalogrequest/catalog\" template=\"catalogrequest/catalogrequest.phtml\"}}
http://www.magentocommerce.com/magento-connect/ebizmarts/extension/1208/ebizmarts-mail-chimp-module
----------------------------------------------
31.quick buy overview of products
http://www.magentocommerce.com/magento-connect/EMThemes.com/extension/6195/em_quickshop
------------------------------------------------
32.Smart former gold
http://www.magentocommerce.com/magento-connect/IToris/extension/4213/professional_form_builder_smartformer_gold
---------------------------------------------
33.Quick Shop
http://www.magentocommerce.com/magento-connect/EMThemes.com/extension/6195/em_quickshop
---------------------------------------------
34.Quick overview in tab on detail page
http://www.magentocommerce.com/magento-connect/TemplatesMaster/extension/1725/magento-easytabs
-------------------------------------------------
35.Left navigation bar vertical category
http://www.magentocommerce.com/magento-connect/Rico+Neitzel/extension/763/vertical-navigation-with-css-classes
--------------------------------------------------
36.Dynamic banner for home page
http://www.magentocommerce.com/magento-connect/Interakting.com/extension/2255/interakting-slider
-----------------------------------------------------------
37.top menu with Ajex onmouse over page open
http://www.magentocommerce.com/magento-connect/OlivertAr/extension/657/navigation-bar-administrator
-------------------------------------------------------------
38.Face Book like button per product:
http://www.magentocommerce.com/extension/specs/3816/facebooklb#specs
call button:
<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('facebooklb/like.phtml')->toHtml(); ?>
--------------------------------------------
39.On mouse over show my cart product
http://www.magentocommerce.com/magento-connect/Vitalityshop/extension/6424/cartview
------------------------------------------------
40.Gift cart:
http://www.magentocommerce.com/magento-connect/Vitalityshop/extension/6424/cartview
http://www.magentocommerce.com/magento-connect/amahi/extension/6559/s3ibusiness_giftpromo
------------------------------------------------
41.Drop Down menu in left side with colour full
http://www.magentocommerce.com/magento-connect/officeecommerce/extension/7747/ecommerceoffice_megamenusidebar
------------------------------------------------------
42.menu navigation bar:
http://www.magentocommerce.com/magento-connect/OlivertAr/extension/657/navigation-bar-administrator
-----------------------------------------------------------
43.Show category on home page with images
http://hridaya.com.np/display-categories-with-images-on-homepage-in-magento/
------------------------------------------------------------
44.one page checkout extension pade
$59
http://www.magentocommerce.com/magento-connect/apptha-one-step-checkout.html

$159
http://www.magentocommerce.com/magento-connect/customer-experience/checkout/easy-checkout.html
-----------------------------------------------------------------------------------------------------
45. left menu with plus mins arrow 6.1
http://www.magentocommerce.com/magento-connect/sidebar-navigation-menu-4554.html
-----------------------------------------------------------------------------------------------------
46.multistore setting in magento
http://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup
-----------------------------------------------------------------------------------------------------
47.Product Tag (use image in selected product) :-
 http://ecommerce.aheadworks.com/magento-extensions/on-sale.html
-----------------------------------------------------------------------------------------------------
48. light box (till 1.7)
http://www.magentocommerce.com/magento-connect/jquery-lightboxes-fancybox-pirobox-etc.html
-----------------------------------------------------------------------------------------------------
49.Order delete extenstion :-
ext :- http://connect20.magentocommerce.com/community/Asperience_DeleteAllOrders

url :-  http://www.magentocommerce.com/magento-connect/asperience-deleteorders.html

error solusation :-\\192.168.1.49\mukesh\coach1\app\code\core\Mage\Adminhtml\Block\Sales\Order\Shipment\Create
 line 132 comment
-------------------------------------------------------------------------------------------------------------------------
51.contact page show in cms page
 {{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
------------------------------------------------------------------------------------------------------------------------------
52. get attribute value ..
 <?php echo $_helper->productAttribute($_product, $_product->getModel() ,'model'); ?></div>
---------------------------------------------------------------------------------------------------
53. wordpress blog show on home page
http://fishpig.co.uk/wordpress-integration/docs/recent-posts-block.html military
Extension :-
http://www.magentocommerce.com/magento-connect/wordpress-integration.html
-----------------------------------------------------------------------------------------------------------
54.Best Seller Extenstion :-
http://www.magentocommerce.com/magento-connect/bestseller-products-7401.html
-----------------------------------------------------------------------------------------------------------
55. Magento simple Module :-
http://demos.frnzzz.com/d/?f=magento/magentoModule.zip
----------------------------------------------------------------------------------------------------------
56.checkout cart drop Ajax top header
http://www.magentocommerce.com/magento-connect/sharplogicians-cart-drop-down-3832.html
------------------------------------------------------------------------------------------------------------------------------
57. add-custom-field-in-the-billing-and-shipping-address
http://indiestechtips.wordpress.com/2011/07/30/how-to-add-custom-field-in-the-billing-and-shipping-address-of-onepage-checkout-in-magento/
-------------------------------------------------------------------------------------------------------------------------------------------
58. time counter category and product .
http://www.magentocommerce.com/magento-connect/products-countdown.html
-----------------------------------------------------------------------------------------
59. Web Form (custom form)
http://www.magentocommerce.com/magento-connect/rebimol/extension/7232/webforms
------------------------------------------------------------------------------------------------------------
60.Add Order Comments in last Step
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/10860/
----------------------------------------------------------------------------------------------------------
61. category Access Control module.
http://www.magentocommerce.com/magento-connect/category-access-control.html
-------------------------------------------------------------------------------------------------------
62.Twitter twits display :-
http://www.magentocommerce.com/magento-connect/creare-latesttweet-6926.html
----------------------------------------------------------------------------------------------------------
63.Facebook:-
http://www.magentocommerce.com/magento-connect/magazento-all-in-one-facebook-widgets-integration.html
--------------------------------------------------------------------------------------------------------
65.Out of stock product Information client
 http://www.magentocommerce.com/magento-connect/product-out-of-stock-subscription-1350.html
---------------------------------------------------------------------------------------------------------
66. Configur product ' please select ' drop down value Change  :- 
http://stackoverflow.com/questions/5163106/change-remove-please-select-message-from-custom-option-dropdown-on-magento
-----------------------------------------------------------------------------------------

67.Custom one page checkout :- 
1=http://nightlyworker.posterous.com/magento-skip-shipping-and-payment-method-step
2=http://www.magentocommerce.com/boards/viewthread/19125/
3=http://winvinod.blogspot.com/2011/06/skip-shipping-method-from-onepage.html
-------------------------------------------------------------------------------------------

68. tab content link :- 
http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm
-------------------------------------------------------------------------------------------

69. All exention link :-
http://visionwidget.com/inspiration/web/374-free-magento-extensions.html
-------------------------------------------------------------------------------------------

70. category show with image :-
http://hridaya.com.np/display-categories-with-images-on-homepage-in-magento/
------------------------------------------------------------------------------------------
71. left catgory menu :- 
http://www.magentocommerce.com/magento-connect/sidebar-navigation-menu-4554.html
-----------------------------------------------------------------------------------------

72. particuler category show by id :-
http://stackoverflow.com/questions/5889593/magento-list-sub-categories-of-a-specific-parent-category-as-links
------------------------------------------------------------------------------------------

73. Currency change with flag :-
http://www.magentocommerce.com/magento-connect/magento-easy-catalog-images.html
-----------------------------------------------------------------------------------------

74. particuler category product show :- 
http://blog.magikcommerce.com/how-to-display-best-selling-products-on-magento-store-home-page/
----------------------------------------------------------------------------------------------

75.banner extension :- 
http://www.magentocommerce.com/magento-connect/simple-banners.html
http://www.magentocommerce.com/magento-connect/multiple-banner-extension.html
http://www.magentocommerce.com/magento-connect/banner-slider-3912.html
----------------------------------------------------------------------------------------------

76. Socail link extension :-
http://www.magentocommerce.com/magento-connect/Zizio/extension/6378/ziziogroupsale
-----------------------------------------------------------------------------------

78. facebook like button :- 
http://www.magentocommerce.com/magento-connect/facebook-like-button.html
-----------------------------------------------------------------------------------

79. order delete exention :-
http://www.silvertouch.com/MagentoExtensions/
----------------------------------------------------------------------------------

80. order comment extension :- 
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/10860/
---------------------------------------------------------------------------------------------

81. webshop martix rate :- 
http://www.magentocommerce.com/magento-connect/webshopapps-matrixrate-1-multiple-table-rates-extension-certified-bug-free.html
-----------------------------------------------------------------------------------------------


82. best selling categoty wise :- 
http://www.magentocommerce.com/magento-connect/bnm-best-selling-products-new-products-and-most-viewed-products.html
http://www.magentocommerce.com/magento-connect/bestseller-selected-on-category-id.html
-------------------------------------------------------------------------------------------------

83.how to import and export category in magnto :-
http://www.bluehorse.in/amit-bera/bluehorse-stuffs/export-and-import-categories-in-magento/ 
http://blog.srmklive.com/2011/03/21/how-to-export-categoriessubcategories-from-x-cart-to-magento/
--------------------------------------------------------------------------------------------------

84. multiple image upload :- 
http://prattski.com/2009/10/09/magento-import-multiple-images-for-products-module/
http://www.consofas.com/blog/import-products-into-magento-with-multiple-images/
----------------------------------------------------------------------------------------------------

85.how to add custom filed in one page in magento :- 
http://indiestechtips.wordpress.com/2011/07/30/how-to-add-custom-field-in-the-billing-and-shipping-address-of-onepage-checkout-in-magento/
-----------------------------------------------------------------------------------------------------

86. imoprtant webforms extension link :- 
http://www.magentocommerce.com/magento-connect/webforms-community-edition.html
-----------------------------------------------------------------------------------------------------

87. how to add custom moudlein magento :- 
http://www.webspeaks.in/2010/08/create-your-first-adminbackend-module.html
------------------------------------------------------------------------------------------------------

88. facebook all in one :- 
http://www.magentocommerce.com/magento-connect/magazento-all-in-one-facebook-widgets-integration.html
------------------------------------------------------------------------------------------------------

89.most view  product slider :- 
http://www.magentocommerce.com/magento-connect/product-slider-9077.html
-----------------------------------------------------------------------------------------------------


90. select box convert ul li :- 
http://stackoverflow.com/questions/6797684/convert-ul-to-select-w-optgroups 
-----------------------------------------------------------------------------------------------------

91. Search with category search link :-
http://www.geekyplugins.com/magento/catalog-category-search.dot
-----------------------------------------------------------------------------------------------------

92. price countdown extension :-
http://www.magentocommerce.com/magento-connect/price-countdown.html
------------------------------------------------------------------------------------------------------


How To Export and ImporCategory in Magento

For export category  create a simple php file catgory.php in root Folder.

    ini_set("memory_limit","1000M");
    require_once "app/Mage.php";
    umask(0);
    Mage::app();
    $category = Mage::getModel ( 'catalog/category' );
    $tree = $category->getTreeModel ();
    $tree->load();
    $ids = $tree->getCollection()->getAllIds();
    if ($ids) {
    $string='';
    $heading = '"store","categories","cat_id","is_active","meta_title","meta_keywords","meta_description","include_in_menu","is_anchor","description",';
    foreach ($ids as $id) {
    if($id>0)//start if removeroot category and default category .
    {

    $cate_cre = Mage::getModel('catalog/category');

    $cate_cre->load($id);
    $treeurl='';
    $cate_cre1=Mage::getModel('catalog/category')->load($id);
    $treeurl=$cate_cre->getName();
    if($cate_cre1->getParentId()>0)
    {
    for($i=0; ;$i++)
    {
    if($cate_cre1->getParentId()>0)
    {
    $abc=Mage::getModel('catalog/category')->load($cate_cre1->getParentId());
    $pCat=$abc->getName();
    if($abc->getId()>1){
    $treeurl=$pCat.'/'.$treeurl;
    }
    $cate_cre1=$abc;
    }
    else{
    break;
    }
    }
    }
    $store = "default";
    $string .='"'.$store.'","'.$treeurl.'","'.$id.'","'.$cate_cre->getIsActive().'","'.$cate_cre->getMetaTitle().'","'.$cate_cre->getMetaKeywords().'","'.$cate_cre->getMetaDescription().'","'.$cate_cre->getIncludeInMenu().'","'.$cate_cre->getIsAnchor().'","'.$cate_cre->getDescription().'"';
    $string.="\n";
    }//endof if removeroot category and default category .
    }
    $csv_output = $heading ."\n".$string;
    $filename = "Categories";
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: csv" . date("Y-m-d") . ".csv");
    header( "Content-disposition: filename=".$filename.".csv");
    print $csv_output;
    }
    ?>

After run this file at browser .u got a csv file-

After the export category you must need to import the categories and  you want to import the categories with previous category structure.For that work i craeted a folder ImpCat folder at app\code\local\
first i craete  file at a file Category.php  at app\code\local\ImpCat\Catalog\Model\Convert\Adaptera\


    class ImpCat_Catalog_Model_Convert_Adapter_Category
     extends Mage_Eav_Model_Convert_Adapter_Entity
    {
     protected $_categoryCache = array();

     protected $_stores;

     /**
     * Category display modes
     */
     protected $_displayModes = array( 'PRODUCTS', 'PAGE', 'PRODUCTS_AND_PAGE');

     public function parse()
     {
     $batchModel = Mage::getSingleton('dataflow/batch');
     /* @var $batchModel Mage_Dataflow_Model_Batch */

     $batchImportModel = $batchModel->getBatchImportModel();
     $importIds = $batchImportModel->getIdCollection();

     foreach ($importIds as $importId) {
     //print '

'.memory_get_usage().'
';
     $batchImportModel->load($importId);
     $importData = $batchImportModel->getBatchData();

     $this->saveRow($importData);
     }
     }

     /**
     * Save category (import)
     *
     * @param array $importData
     * @throws Mage_Core_Exception
     * @return bool
     */
     public function saveRow(array $importData)
     {
     if (empty($importData['store'])) {
     if (!is_null($this->getBatchParams('store'))) {
     $store = $this->getStoreById($this->getBatchParams('store'));
     } else {
     $message = Mage::helper('catalog')->__('Skip import row, required field "%s" not defined', 'store');
     Mage::throwException($message);
     }
     } else {
     $store = $this->getStoreByCode($importData['store']);
     }

     if ($store === false) {
     $message = Mage::helper('catalog')->__('Skip import row, store "%s" field not exists', $importData['store']);
     Mage::throwException($message);
     }

     $rootId = $store->getRootCategoryId();
     if (!$rootId) {
     return array();
     }
     $rootPath = '1/'.$rootId;
     if (empty($this->_categoryCache[$store->getId()])) {
     $collection = Mage::getModel('catalog/category')->getCollection()
     ->setStore($store)
     ->addAttributeToSelect('name');
     $collection->getSelect()->where("path like '".$rootPath."/%'");

     foreach ($collection as $cat) {
     $pathArr = explode('/', $cat->getPath());
     $namePath = '';
     for ($i=2, $l=sizeof($pathArr); $i<$l; $i++) {
     $name = $collection->getItemById($pathArr[$i])->getName();
     $namePath .= (empty($namePath) ? '' : '/').trim($name);
     }
     $cat->setNamePath($namePath);
     }

     $cache = array();
     foreach ($collection as $cat) {
     $cache[strtolower($cat->getNamePath())] = $cat;
     $cat->unsNamePath();
     }
     $this->_categoryCache[$store->getId()] = $cache;
     }
     $cache =& $this->_categoryCache[$store->getId()];

     $importData['categories'] = preg_replace('#\s*/\s*#', '/', trim($importData['categories']));
     if (!empty($cache[$importData['categories']])) {
     return true;
     }

     $path = $rootPath;
     $namePath = '';

     $i = 1;
     $categories = explode('/', $importData['categories']);
     /*$IsActive = $importData['IsActive'];*/
      $IsActive = $importData['is_active'];
     $IsAnchor =$importData['is_anchor'];
      $Description =$importData['description'];
       $IncludeInMenu=$importData['include_in_menu'];
       $MetaTitle=$importData['meta_title'];
     
       $MetaKeywords=$importData['meta_keywords'];
       $MetaDescription=$importData['meta_description'];
       $Image=$importData['image'];
       $URlkey=$importData['url_key'];
     
     foreach ($categories as $catName) {
     $namePath .= (empty($namePath) ? '' : '/').strtolower($catName);
     if (empty($cache[$namePath])) {

     $dispMode = $this->_displayModes[2];
       $cat = Mage::getModel('catalog/category')
             ->setStoreId($store->getId())
             ->setPath($path)
             ->setName($catName)
             ->setIsActive($IsActive)
             ->setIsAnchor($IsAnchor)
             ->setDisplayMode($dispMode)->save();
        
         $cat = Mage::getModel('catalog/category')->load($cat->getId());
         $cat->setIncludeInMenu($IncludeInMenu);
         $cat->setDescription($Description);
         $cat->setMetaTitle($MetaTitle).
       $cat->setMetaKeywords($MetaKeywords);
       $cat->setMetaDescription($MetaDescription);
       $cat->save();
     
      $cat = Mage::getModel('catalog/category')->load($cat->getId());
      $data['meta_keywords']=$MetaKeywords;
      $data['meta_title']=$MetaTitle;
      $data['meta_keywords']=$MetaKeywords;
      $data['meta_description']=$MetaDescription;
      $data['url_key']= $URlkey;
      $cat->addData($data); 
      $cat->save();
     $cache[$namePath] = $cat;
     }
     $catId = $cache[$namePath]->getId();
     $path .= '/'.$catId;
     $i++;
     }

     

     return true;
     }

     /**
     * Retrieve store object by code
     *
     * @param string $store
     * @return Mage_Core_Model_Store
     */
     public function getStoreByCode($store)
     {
     $this->_initStores();
     if (isset($this->_stores[$store])) {
     return $this->_stores[$store];
     }
     return false;
     }

     /**
     * Init stores
     *
     * @param none
     * @return void
     */
     protected function _initStores ()
     {
     if (is_null($this->_stores)) {
     $this->_stores = Mage::app()->getStores(true, true);
     foreach ($this->_stores as $code => $store) {
     $this->_storesIdCode[$store->getId()] = $code;
     }
     }
     }
    }

    ?>

There for need  config.xml file for configuration placed  at app\code\local\ImpCat\Catalog\etc\ -


   
     
     
     
     
     ImpCat_Catalog_Model_Convert_Adapter_Category
     
     
     
     
   









Now craete  module controller file ImpCat_All.xml at app\etc\modules-


   
     
     
     local
     true
     
     
   






then, create a  dataflow advanced profile into -admin/system/Import Export/Dataflow Advanced Profile and give the Profile Name is 'category import'and 
its Actions XML  is-






     file
     var/import
     
     
   
   
     
     
     true
     
     1
     
     catalog/convert_adapter_category
     parse
   



after create import categoryextension you goes to admin system->permission->roles->Administrators ->Role Users 

click on Save Role.Then Flush magento Cache.
Then downloaded  Categories.csv put Categories.csv into var/import/
and removed cat_id colums from csv and
remove first two rows

and remove all Default Category/ from categories colunn in Categories.csv.
Now you go to again- admin/system/Import Export/Dataflow Advanced Profile  run 'category import' profile>Run Profile>click 'Run Profile in Popup' import of category now start and automatically created category. Now you fill happy.Click here to download
click for csv

 http://www.bluehorse.in/Uploads/cat.rar

and click for extension  http://www.bluehorse.in/Uploads/ImpCat_All.rar
and
http://www.bluehorse.in/Uploads/ImpCat.rar