magento_users module


Module automatically synchronizes Drupal users to Magento. Upon any action with Drupal user (creation, edition or removal), similar event is performed at Magento.
Also module allows to set up correspondences between user roles at Drupal and user groups at Magento. Each Drupal role is set up in correspondence with Magento user group at admin page.

Module's installation process

During installation, module creates magento_groups table in Drupal database used to store the correspondences between Drupal roles and Magento user groups.

Functions description


Description: Function calls magento_users_roles_propagation_form form.
This form is used to set up to set up correspondences between user roles at Drupal and user groups at Magento. Drupal makes a query about getting the list of user groups to Magento. It's possible to select one user group from the list for each user role. Upon form (magento_users_roles_propagation_form_submit) submission, all the correspondences are saved to database table (new entries are created or existing are updated).


Arguments: $id is the ID of user role
Return value: $group_id is the ID of user group
Description: Using received user role ID, function figures corresponded user group at Magento.

magento_api : internal methods


Return value: session ID
Description: Function returns ID of XML-RPC session if it has already been established.
If session has not been established yet or it has expired, function establishes it and returns its ID.


Return value: Hostname
Description: Function returns hostname for connection to Magento via XML-RPC.


Description: Function checks for errors of connection via XML-RPC.


Description: Function checks if XML-RPC session is expired.


Description: Function nulls XML-RPC session.


Description: Function retrieves tree of Magento catalogues and forwards it to magento_api_synchronize_tree function.


Arguments: $tree is categories tree
Description: Function synchronizes forwarded tree to Drupal taxonomy.
Basing on forwarded tree of categories, function figures made changes and performs appropriate changes in Drupal taxonomy.

magento_api_synchronize_to_delete($value, $key, $cid)

Arguments: $value is the ID of category for Drupal taxonomy term
$key is the key
$cid is the ID of Magento category

magento_api module

magento_api : Detailed module description

magento_api is intended to perform two-way connection of Drupal and Magento.
Also it synchronize Magento catalogue to Drupal taxonomy.

Installation of module

During installation the module creates the vocabulary of taxonomy terms in order to store Magento catalogue.
Additionally module creates the table magento_catalog, which is for storing the correspondences of Drupal taxonomy terms and Magento catalogue categories, in the Drupal database.

API methods


Description: Login/password form for connection to Magento via XML-RPC.


Description: Form for management of synchronization settings.
It allows to enable/disable the logging, set up the time of automatic synchronization and also to perform synchronization forcibly.


Description: Function checks the validity of timestamp entered to the form in magento_api_synchro_settings.
An error occurs if enter negative number of non-digit.


Arguments: $customerData is data, required for customer creation
Return value: $new_customer is the ID of created customer

Magento Module Documentation

Project supposes simultaneous work of two different systems. On the one part, it is an open-source electronic commerce platform Magento (, on the other part, it is Drupal CMS ( 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

Providing a way to skip navigation

Skip navigation links are one of the easiest ways to quickly improve the accessibility of your site. Skip links allow site visitors to jump or "skip" over repetitive page elements and are most useful to users confined to using their keyboard for navigating web pages.

There are a couple of important points to know when implementing skip navigation:

  • Skip links should be the first thing on the page, right below the body element.
  • You can use more than one.
  • Do not use display: none to hide the link.
  • Use the pseudo :focus and :active classes to highlight links for tabbed navigation.

Parameter formats in the browser

The browser provides three formats for use with the complex parameter types struct and array. These formats are JSON, serialized PHP and comma-separated values. Comma-separated values are only applicable to the array parameter type.


Subscribe with RSS Subscribe to RSS - Programmers