In this post you will learn how you can export Magento 1.9 categories for a specific store view as CSV. For example, you have Arabic store view with ID 7, and you want to export all arabic category names in a CSV file, below will be the code you want. Create a file on your Magento root and paste the below code, change the $storeId to your desired ID and run the script. After running the above script, you will find the exported CSV file `categories_arabic.csv` in the directory `var/export/` <?php require_once 'app/Mage.php'; Mage::app("admin"); $storeId = 7; $categories = Mage::getModel('catalog/category') ->getCollection() ->setStoreId($storeId) ->addFieldToFilter('is_active', 1) ->addAttributeToSelect('*'); $handle = fopen("var/export/categories_arabic.csv", "w"); $header = array('ID', 'Name'); fputcsv($handle, $header); foreach($categories as $category){ $row = array($category->getId(), $category->getName()); fputcsv($handle, $row); } fclose($handle); ?>
Magento
Magento 1: Export Catalog Categories by Store View
In this post you will learn how you can export Magento 1.9 categories for a specific store view as CSV. For example, you have Arabic store view with ID 7, and y
· 5 min read · By Tahir Yasin
Related posts
Magento
Add Home link in Magento top navigation menu
Learn how to easily add a Home link to the Magento top navigation menu using simple template changes and PHP code. By default there is no Home link in Magento top navigation menu but you can easily add it yourself.
Magento
Magento 1: Export Manufacturers CSV by Store View
This post will guide you on how you can export the manufacturer list (Magento 1.9) to CSV file. In this script, I am filtering the list by store view. Let’
Magento
Search Magento products by product labels
Project Overview: Task was to develop a Product Labels Magento extension. Where admin can create product labels by uploading an image, enter label title and att