This post will guide you on how you can export the manufacturer list (Magento 1.9) to CSV file. Navigate to your `var/export` folder and find the `manufacturers.csv`. Please post your questions and queries in the comments box below.
In this script, I am filtering the list by store view. Let’s suppose you have a store view for Arabic (Store ID=1) and you want to export the manufacturer (Attribute ID= 555) list in Arabic labels only.
The below script will be helpful for you. <?php require_once 'app/Mage.php'; Mage::app("admin"); $manufacturer_attribute_id = 555; // Change attribute id as per your store setup $storeId = 7; // Punch the store id for which you want to export the data $collection = Mage::getResourceModel('eav/entity_attribute_option_collection') ->setAttributeFilter($manufacturer_attribute_id) ->setStoreFilter($storeId, false); $handle = fopen("var/export/manufacturers.csv", "w"); $header = array('ID', 'Name'); fputcsv($handle, $header); foreach($collection as $manufacturer){ $row = array($manufacturer->getOptionId(), $manufacturer->getValue()); fputcsv($handle, $row); } fclose($handle); ?>
Magento
Magento 1: Export manufacturers CSV by specific 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’
· 5 min read
Related posts
Magento
Magento 1: Export catalog categories for a specific 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
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
Magento
How to Conditionally remove Magento header/footer?
<p>Are you looking for a solution to conditionally remove Magento header footer but don’t know where to start? Right in this post I will show you how to create custom layout handles and utilize them to conditionally remove header/footer blocks.</p>