OpenERP Magento integration
Published on January 11, 2010
Open Labs is actively involved in the Magento – Open ERP Projects and ever since the development of the new connector we have been helping customers across the globe to migrate and implement it.
At Open Labs we are committed to provide an excellent user experience .The following detailed tutorial will guide you to the installation process of - :
1. Magento (full version)
2. Magento – Open ERP Connector module contributed by Open Labs
3. Magento Extension
Step 1: Required bits & pieces
1. Required Open ERP Addons (Available for download from this site):
2. Xampp 1.6.4
After copying the addons to the Open ERP addons path,
1. Go to a Linux shell and login as the system administrator root:
2. For xampp-linux-1.6.4.tar.gz file follow these steps:-
a) Extract the downloaded archive file to /opt. using sudo tar xvfz xampp-linux-1.6.4.tar.gz -C /opt
3. Open the page http://localhost.It should show xampp on the page.
You may get errors like shown below:
Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4
Above Errors can be Removed by following step - :
Change the permissions by using chmod of the lampp folder in /opt to readable and writable. After this change the permissions of file config.inc.php in /opt/lampp/phpmyadmin to “read-only” and restart lampp.
Step2: Installation of Magento full version
1.Download magento-1.3.2.4.tar.gz and extract it to /opt/lampp/htdocs
sudo tar xvfz magento-1.3.2.4.tar.gz -C /opt/lampp/htdocs
3.To check your Magento installation type http:///magento in the browser.
It should display the “Setup for Magento”/”Magento Installation” for the first time and “Magento Demo Store” from the next time.
Note: Use your IP instead of localhost to avoid issues of magento kicking you from the admin login.
If you get an error: innodb engine Open file xampp\mysql\bin\my.cnf (Using sudo gedit or sudo nano)
Find code:
# Comment the following if you are using InnoDB tables
Skip-innodb
#innodb_data_home_dir = "/xampplite/mysql/"
#innodb_data_file_path = ibdata1:10M: autoextend
#innodb_log_group_home_dir = "/xampplite/mysql/"
#innodb_log_arch_dir = "/xampplite/mysql/"
## You can set._buffer_pool_size up to 50 - 80 %
## Of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
## Set._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
Modify to
#Comment the following if you are using InnoDB tables
#skip-innodb
innodb_data_home_dir = "/xampplite/mysql/"
innodb_data_file_path = ibdata1:10M: autoextend
innodb_log_group_home_dir = "/xampplite/mysql/"
innodb_log_arch_dir = "/xampplite/mysql/"
## You can set._buffer_pool_size up to 50 - 80 %
## Of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
## Set..._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
Reload the magento page, if some error of "mysql.sock not found" comes then change the rights of my.cnf file to read only, than reload the magento page and it should work now.
Step3:Configuring the Bridge
The Magento-Open ERP bridge comprises of two parts:
1. Open ERP Module
2. Magento ERP Extension
Installation of Magento extension
For this in magento admin panel go to:
System >> Magento Connect >> Magento Connect Manager
Key in your username and password again and click on the second tab for settings and change preferred state to 'Beta'. (As of this date the plug-in is beta).Save your settings and select page 1 (Extensions) and paste the following extension key in the box
"Magento-community/Openlabs_OpenERPConnector" without quotes
Now your installation of magento is almost ready to talk to Open ERP
To enable open ERP to access the resources in magento and synchronize, it is necessary to have a web services user. To create a web services user go to : System >> Web Service >>Roles
Create a new role e.g. 'admin'
Save the user and set resources access as: ALL
Save the role and now create a web services user at: System >> Web Services >> Users
Create a user, save the user and set the assigned role as the newly created role, in the above example 'admin'
The same settings have to be entered as credentials in the connector frontend in Open ERP at Magento >> Magento Web
The user id will be the newly created user name and password the newly created password of the web services user.
STEP 4 :Configuration of Magento – Open ERP Connector module
1.Ensure that you have at least 1 Product category in your system or create one. (Required) 2.Install the magentoerpconnect module (For how to install a module refer to doc.openerp.com) (Module available at bzr branch lp: magentoerpconnect and/or bzr branch http://bazaar.launchpad.net/~openlabs-akretion-consortium/magentoerpconnect/magentoerpconnect_generic)
3.Go to Magento Connection > Core Settings > Magento Instances
4.Create a new instance by clicking new
5.Give the connection a name (e.g. My local magento)
6.Referential Type (Only 1.3.2.4 is available now)
7.Location: Your magento URL e.g. (http ://< yourIPaddress>/magento) & Default Product category (Magento allows products without category and those will be classified here)
8.Click on Reload Referential Mapping Templates
9.Enter API Username and password defined in step 4 of magento configuration
10.Click on Synchronize Referential Settings