PHPackages                             ambimax/magento-module-ambimax-arrayexport - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ambimax/magento-module-ambimax-arrayexport

ActiveMagento-module[Utility &amp; Helpers](/categories/utility)

ambimax/magento-module-ambimax-arrayexport
==========================================

Magento module that lets you export all product as array to be modified and arranged during export

1949PHP

Since Apr 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ambimax/magento-module-ambimax-arrayexport)[ Packagist](https://packagist.org/packages/ambimax/magento-module-ambimax-arrayexport)[ RSS](/packages/ambimax-magento-module-ambimax-arrayexport/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ambimax® ArrayExport
====================

[](#ambimax-arrayexport)

Magento module that lets you export all product as array to be modified and arranged during export and saved to csv or any other format

Installation
------------

[](#installation)

Copy src/\* to your root folder or use composer.json:

```
"require": {
    "ambimax/magento-module-ambimax-arrayexport": "~1.0"
}

```

Usage
-----

[](#usage)

### 1.) Create a file for all logic

[](#1-create-a-file-for-all-logic)

Create an Model file in app/code/comminity/My/Module/Model/Export.php

```
class My_Module_Model_Export {

    /** @var  Mage_ImportExport_Model_Export_Adapter_Csv */
    protected $_writeAdapter;

    /** @var bool */
    protected $_headerColsSet = false;

    /**
     * Init to export all products
     *
     * @param Varien_Event_Observer $observer
     */
    public function initExport()
    {
        $file = Mage::getBaseDir('var').DS.'export'.DS.'exportfile.csv';
        $this->_writeAdapter = new Mage_ImportExport_Model_Export_Adapter_Csv($file);

        $data = array(
            "entity" => 'catalog_product',
            "file_format" => 'csv',
            "export_filter" => array(),
            "skip_attr" => array(),
        );

        /** @var Ambimax_ArrayExport_Model_Export $export */
        $export = Mage::getModel('ambimax_arrayexport/export');
        $export->setData($data);
        $export->export();
    }

    /**
     * Writes every product to $_writeAdapter
     *
     * @param Varien_Event_Observer $observer
     */
    public function writeRow(Varien_Event_Observer $observer)
    {
        // Set header cols
        if( ! $this->_headerColsSet) {
            $this->_writeAdapter->setHeaderCols($observer->getHeaderCols());
            $this->_headerColsSet = true;
        }

        // $data contains store codes with product data
        $data = $observer->getProductData();
        $row = $data['default'];

        // do something with all the data

        // write to csv
        $this->_writeAdapter->writeRow($row);
    }
}

```

### 2.) Add an Observer.php

[](#2-add-an-observerphp)

Create an Observer file in app/code/community/My/Module/Model/Observer.php

*This file is required so we use a Singleton at all times, otherwise the writeAdapter will not be set*

```
class My_Module_Model_Observer {

    /**
     * Init to export all products
     *
     * @param Varien_Event_Observer $observer
     */
    public function initCompleteProductExport(Varien_Event_Observer $observer)
    {
        Mage::getSingleton('my_module/export')->initExport();
    }

    /**
     * Write row to file
     *
     * @param Varien_Event_Observer $observer
     */
    public function writeRow(Varien_Event_Observer $observer)
    {
        Mage::getSingleton('my_module/export')->writeRow($observer);
    }
}

```

3.) Add row handler event
-------------------------

[](#3-add-row-handler-event)

This event is supposed to handle the formation of your data and send it to your write adapter

```

                my_module/observer
                writeRow

```

4.) Add cronjob to trigger the event
------------------------------------

[](#4-add-cronjob-to-trigger-the-event)

```

            0 0 * * *

                my_module/observer::initExport

```

Tips
----

[](#tips)

- You can use [n98-magrun](https://github.com/netz98/n98-magerun) to trigger your cronjob from the command line
- You can use [Aoe\_Scheduler](https://github.com/AOEpeople/Aoe_Scheduler) for usage within Magento

License
-------

[](#license)

[MIT License](http://choosealicense.com/licenses/mit/)

Author Information
------------------

[](#author-information)

- [Tobias Schifftner](https://twitter.com/tschifftner), [ambimax® GmbH](https://www.ambimax.de)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8efdb9ca503ce1ca4d650ae51ba85c9a1cc5de950c9a3947adcbed17df991e78?d=identicon)[tschifftner](/maintainers/tschifftner)

---

Top Contributors

[![tschifftner](https://avatars.githubusercontent.com/u/14741874?v=4)](https://github.com/tschifftner "tschifftner (5 commits)")

### Embed Badge

![Health badge](/badges/ambimax-magento-module-ambimax-arrayexport/health.svg)

```
[![Health](https://phpackages.com/badges/ambimax-magento-module-ambimax-arrayexport/health.svg)](https://phpackages.com/packages/ambimax-magento-module-ambimax-arrayexport)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
