I'm looking for a way to call the magento export (System->Import/Export->Export) product export from an URL for a 3rd party system. So I want something like https://my.domain.com/bla/blub/export.php?filterAttribute=2 and that shall return a csv of all products with filterAttribute 2. I managed to do this by using dataflow export and then readfile() to the client, just to realize that this is missing lots of attributes.

So, currently I basically do something like:

$profile = Mage::getModel("dataflow/profile")->load($profileId);
$adminUser = Mage::getModel('admin/user')->setUserId(0);
$guiData = $profile->getGuiData();
$guiData['product']['filter']['filterAttribute'] = 2;
$profile = Mage::getModel("dataflow/profile")->load($profileId);
Mage::register('current_convert_profile', $profile);

Now, how do I transfer this simple code to Import/Export? Magento 1.9

1 Answer 1


Once you know what to google for it is rather easy:

ini_set('memory_limit', '2048M');

$skipAttrs = array();

$data = array(
    "entity" => 'catalog_product',
    "file_format" => 'csv',
    "export_filter" => array(
        "seller_id" => '6'
    "skip_attr" => $skipAttrs

$model = Mage::getModel('importexport/export');
echo $model->export();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.