Magento Module Documentation
Project supposes simultaneous work of two different systems. On the one part, it is an open-source electronic commerce platform Magento (http://www.magentocommerce.com/), on the other part, it is Drupal CMS (http://www.drupal.org/). Project is called to take the best from each system and unite them in the network of one website. The result of such integration of two systems is a platform, which has Magento as a backend, with all its powerful and easy-to-use means of eCommerce component management. In other words, we use a handy system of store administration from Magento. On the other part, we have Drupal CMS with all its wide range of ready-to-use modules and themes and flexible mechanism of customization (configuration) of website functional. Interaction of these two systems is performed via XML-RPC protocol. An interchange is implemented in both directions. From Drupal part it's a procedure calling for the purpose of acquirement of information of catalog, products, etc., and of quote and order forming. From Magento part it's an XML-RPC methods calling for the purpose of notification about events, happened within Magento system (if such functional is turned on at settings).
Magento part
A special extension has been developed for Magento, which expands a standard Application Programming Interface (API) and allows to use Magento framework as a backend of model and frontend component to be implemented on any other platform, for example, on Drupal CMS. Creation of quote and order has been added as a main functional to API, together with an acquirement of additional data from Magento. Also the mechanism of notification about events, happened within Magento system and related to integration with side frontend system, has been implemented.
Developed extension has a set of settings necessary for synchronization with side system. Configuration panel is available at the main menu of Magento administration system: System -> Configuration -> Magento Extended API. Overview of module for Magento contains more detailed information of settings.
You'll need to create a special webservices user going here : System->Web services -> Users and assign him a webservice role going here : System->Web services -> Roles
Drupal part
Module "Magento", implementing functional of synchronization Magento data to Drupal database, has been developed for Drupal. Thereby, Drupal CMS possesses a set of data for working with catalog and products. Information of promotion rules is synchronized as well. Besides synchronization, module provides with functional for forming of quote (shopping cart) and order. Check/Money Order and PayPal Website Payments Standard are supported as payment methods.
Workflow
First, it's necessary to install and configure Magento module for a website based on Drupal CMS, and Drupal extension for a website based on Magento. Configuration of module for Drupal CMS (Site configuration -> Magento API Settings) contains the setting up of address to XML-RPC server of Magento (as a rule, it is http://magento-host/api/xmlrpc/) and specifying of its username and password (key).
Username and password are necessary to be set up within Magento system at section System -> Web Services -> Users. On the other hand, an address to XML-RPC server of Drupal (an option Remote XML-RPC host url; usually it is http://drupal-host/xmlrpc.php) and username and password of Drupal user, having permissions of creation and management of content, must be specified at section System -> Configuration -> Magento Extended API of Magento settings.
When both of parts are configured, synchronization of data must be performed. To do it, process of synchronization of all data must be run at Site configuration -> Magento Synchronization Settings section of Drupal administration panel (step-by-step clicking of 4 buttons in Manual Synchronization with Magento block). When synchronization is completed, all necessary data of catalog, products, etc. will be saved to Drupal database. Further synchronization of this data will be made automatically, if connection between Drupal server and Magento one is established and notification mode is turned on (Magento administration panel -> System -> Configuration -> Magento Extended API -> Enable event notification). Also synchronization is performed automatically by schedule.
Module for Drupal implements simple catalog of products. A query to Magento about quote forming is made upon adding product to shopping cart. Considering the results of this query, the shopping cart with a cost of products, tax and discounts values and total amount of cart is formed. If cart is not empty, it is possible to checkout order. To do it, forms of customer data and shipping information must be filled and payment method must be selected. Considering the results of this filling, a query to Magento about order checkout is made as well. If PayPal Website Payments Standard is selected as payment method, a redirection to PayPal website for payment processing will be made. If payment is made successfully within PayPal, Drupal will be notified about payment receipt and this notification will be automatically sent to Magento system.
Thereby, an opportunity of using Drupal CMS as a frontend and Magento system as an eCommerce backend is implemented.
Installation procedure
Magento side
Install API extension here http://www.magentocommerce.com/extension/1020/drupal
This extension will offer several API extension that Drupal modules will need to connect to.
Once installed you'll need to configure access to your Drupal installation. Go to System > Configuration. In left sidebar menu, in Services section you'll find Magento Extended API, select it.
Set Event notification to YES. This will send data to Drupal each time you update some configuration in Magento (products, catalog...)
Enter URL of your drupal installation followed by : /xmlrpc.php (http://www.example-drupal.com/xmlrpc.php)
Enter login and password of a user with enough permissions, I woudl suggest, for the test purposes to enter your admin login & pass here.
Drupal Side
Install modules from here : http://drupal.org/project/magento
Module Dependencies (Required):
CCK - http://drupal.org/project/cck
Date - http://drupal.org/project/date
Services - http://drupal.org/project/services
Filefield - http://drupal.org/project/filefield
ImageAPI - http://drupal.org/project/imageapi
Imagecache - http://drupal.org/project/imagecache
Imagefield - http://drupal.org/project/imagefield
Transliteration - http://drupal.org/project/transliteration
Views - http://drupal.org/project/views
Enable them all in Modules administration page.
Go to : Site Configuration > Magento API Settings
Set the URL of your magento installation followed by : /api/xmlrpc/ (http://www.example-magento.com/api/xmlrpc/)
Enter your Magento user & password (special webservice user that you have created System->Web services -> Roles / System->Web services -> Users in those menus in Magento).
Go to: Site Building->Services->Settings
Uncheck "Use keys" setting. "Use sessid" must be checked.

reverse integration of Magento into Drupal?
Hi, this looks really great.
I am building a Drupal site but was wishing for the ecommerce checkout process and the sophisticated search, sort and filter ecommerce capabilities of Magento. This might solve my problem.
However, what I really want to do is use a few key Magento features (search; product views; cart and checkout) on top of my Drupal architecture, rather than having the login and core framework be from Magento with Drupal added on top. Is there a way to do this? Can I set up a dual-registration or just add some Magento features into Drupal, or am I going to need to re-architect my entire Drupal site around Magento registration in order to integrate them? The Drupal site is heavy on community features so I'd like to avoid this if possible.
Also, specifically, I am looking to use the Magento search and sort capabilities to be applied to both content items but also **users** on Drupal. Imagine your Magento Category Products listing page being a list of Drupal user Profiles instead.... but with Magento's sophisticated search,filters and sorts. Instead of pictures of widgets with clicks to BUY, it's Drupal user profile photos and clicks to READ MORE. Is something like this possible?
Any guidance welcome.
Drupal 7
Hi,
Is there a plan for Drupal 7 support?
/ David