export products in magento

Using Magento’s Data-Profiles to Export your entire product database (if this does not work see OPTION 2)

OPTION 1
Navigate to System -> Import/Export -> Data-Profiles
Select Export All Products

Review your options in the Profile Wizard. You may wish to change the name of your export file under File Information -> File Name.

To define which product attributes you wish to export for each product, under Profile Wizard -> Data Format -> Export you can choose to export All Fields, or select specific product attributes you wish to export by selecting Only Mapped Fields and selecting your required attributes.magento-data-profile-data-format

To define a specific range of products you wish to export under Profile Wizard -> Export Filters -> you can filter your products by name, sku, product type, attribute set, price, stock quantity, visibility or status. Save and Continue Edit, and we’re ready to export.

Now that the parameters for your export are set, choose the Run Profile tab and click the Run Profile in Popup button. Your export will start automatically in a pop up window.

Once your export is complete, you now need to retrieve it from your server via FTP.

Once logged into your server, you will find you exported csv file waiting for you inside the var/export folder.

OPTION 2
The above did not work for me, and I found lots of references online saying the same thing. I was able to accomplish the same thing via the command line.

Install this script into main httpdocs directory. You can then specify the profile from OPTION 1 that you want it to run. The export will then be created in the same directory as the script.

Import/Export > Profiles

require_once(‘app/Mage.php’);
umask(0);
Mage::app(‘admin’);

$profile = Mage::getModel(‘dataflow/profile’);
$userModel = Mage::getModel(‘admin/user’);
$userModel->setUserId(0);
Mage::getSingleton(‘admin/session’)->setUser($userModel);
$profile->load($profileId);
if (!$profile->getId()) {
Mage::getSingleton(‘adminhtml/session’)->addError(‘ERROR: Incorrect profile id’);
}

Mage::register(‘current_convert_profile’, $profile);
$profile->run();

echo “EXPORT COMPLETE.\n”;
?>