Simple Erply and Magento integration plugin

Recently I helped a company to build e-commerce website with Magento. She had existing shops already and she uses Erply with almost 10000 items which she wanted to import into e-shop.

Even though Erply and Magento both are market leaders then importing the data from Erply to Magento was poorly supported. I took existing github project, forked it, upgraded to magento connect version and fixed many issues in it. It is still not fully stable but usable, expert help is still advised. You download the plugin from here

Simplest way to integrate Erply and magento is to:

  1. Install Erply plugin from Magento Connect service
  2. Download source of fixed plugin from
  3. Copy/merge folders design, code and etc from magento-integration-master/erply/app/ to app folder in your magento installatation. This overwrites old broken files.
  4. Enjoy

Issues fixed are:

  1. Missing price, description and some other fields import
  2. Fixed big number of product import
  3. Fixed category import
  4. Many more small things

Issue with large number of product import was that it takes very long time. PHP script execution may time out and process never finishes. You can divide product import into batches so that if one batch finishes then another batch is started. I tried many different settings and process never finished. Issue was that when scheduling new batch takes place then it might have been outdated already. Now there is added stability and new import batch is always scheduled into future not past.

Category import was even more problematic. Magento has concept of Root Category which id is usually 2 and it overlaps with one of the first Category ID-s so all categories were messed up after import. However fix was relatively easy, I just added 10 000 to all category ID-s imported from Erply. Also all products imported from Erply were assigned new category ID-s.

How to use the Erply and Magento integration plugin?

  1. Firstly fill in your Erply login details.
  2. Set Pricelist ID if you want to have prices for some specific list. It is not the name but number.
  3. Set Warehouse ID, to get inventory numbers. It is numeric, not name.
  4. Magento can automatically and periodically import data from Erply for you. Make sure you are using cron to start scheduled jobs in your website. For scheduling updates you need to write cron expressions into the Schedule textfields like shown on picture.
  5. When importing large amounts of data from Erply you need to configure parameters in magento.
    Run Every means number of minutes the Magento waits before running another update. It also requires main cron update to run.
    While in dev/testing mode it can be small number then in final production system the update shcedule can be days without causing much problems. You can also schedule import manually also.Records per run means how many products to ask from Erply with every API call.
    Loops per run means how many times in one PHP script the API call is made before script is ended and new import batch is scheduled.Erply_magento_plugin_settings

This view shows where you can manually schedule Erply import from Magento. I suggest to start with Category import. After shceduling you need to wait for new cron call or manually call https://your-domain/cron.php after shown time to start the import. Please also remember that after import you need to rebuild all indexes from updates to show.

3 thoughts on “Simple Erply and Magento integration plugin

  1. Thanks for feedback. Plugin is tested with current latest version 1.8.1. Sent additional info to email. Erply and magento plugin log file is located at magento root folder and var/log/erply.log. It could also be because of cron scheduling issue.

  2. how did you exactly add 10 000 to all category ID-s imported from Erply. can you describe. i don’t get it.

Leave a Reply

Your email address will not be published.