Integrating JomSocial and MageBridge
MageBridge 1.2 offers the ability to integrate Magento with JomSocial - the possibilities are covered in this tutorial. Some things will work out-of-the-box, but for instance the profile integration needs more work and only works partially because of missing events in JomSocial.
Features
The JomSocial integration has the following features:
- Magento-links in the JomSocial Profile
- Login integration
- Profile integration
- Selling membership to JomSocial Group
- Selling JomSocial Karma Points
The integration depends on 3 extensions within the MageBridge suite:
- An Joomla! plugin Community - MageBridge which adds a tab to the JomSocial Profile
- A MageBridge JomSocial Profile Connector which allows you to synchronize profile-fields
- A MageBridge JomSocial Product Connector which allows you to sell JomSocial groups or points

Magento-links in the JomSocial profile-tabs
The Joomla! plugin Community - MageBridge offers the functionality to integrate Magento within JomSocial. To install this plugin, you navigate within the Joomla! Administrator to Components > MageBridge > Update, select the JomSocial plugin (in the bottom) and hit the Update-button. This will install the Joomla! plugin needed for JomSocial integration. After installation, the plugin still needs to be actived. Browse to the Joomla! Plugin Manager and enable the Community - MageBridge plugin.

For the tab to work, you also need to publish (or enable) the JomSocial Profile Connector within the MageBridge Connectors overview.
The plugin adds a new tab to the profile-pages of JomSocial, and the plugin parameters only allow you to turn on or off the pages. However, you can change the links or add new links by overriding the default JomSocial Profile Connector configuration. This is explained in the tutorial Overriding the JomSocial Profile Connector configuration.
Integrating user logins
When you login using the JomSocial frontpage, the login is not handled by JomSocial but by the default Joomla! user-component. Because MageBridge already handles these user logins by default, this works without a problem: As soon as you login through JomSocial, you're also logged into Magento and vice versa.
Integrating profiles
Updating profiles needs to be done two-way as well: As soon as you update your profile from within Magento, the MageBridge-module in Magento sends a request through the bridge-API which is received by the Joomla! MageBridge XML-RPC plugin. Next, MageBridge takes care of updating the profile in JomSocial. This is working without a problem.
The other way, JomSocial again uses both native Joomla! events as well as it's own events to synchronize data. When the User Details are modified (email, username, password), the core Joomla! event will be picked up by MageBridge, the basic userdata will be extended with the fields of the JomSocial custom profile, and the data will be synced to Magento. When the User Profile (with extra fields like a mobile or website) is modified, JomSocial will generate a JomSocial-specific event as well as the default core Joomla! event. MageBridge will not pickup on the JomSocial-specific event but will pickup on the default core Joomla! event, to sync data. Therefor, the profile synchronization between JomSocial and Magento will occur any time when the userdata are modified.
Note that the fieldnames of the Magento customer profile need to be matched with the fieldnames of the JomSocial fields. This does not happen automatically, but needs to be configured. The configuration of profile-synchronization is explained in the guide JomSocial profile-synchronization.
Selling JomSocial memberships
Using MageBridge product-connectors you can perform a certain action in Joomla! as soon as a product has been sold in Magento. This allows you for instance to sell JomSocial memberships or JomSocial karma-points.
To set this up, you will first need to configure a product in Magento. There are no special guidelines here, but if you don't want to sell a physical product we recommend configuring a Virtual Product for this purpose.
Also activate the proper event in the MageBridge-module in Magento. Browse to CMS > MageBridge Settings > Settings > Event Forwarding and enable the event checkout_onepage_controller_success_action.
Configuring the JomSocial Group product in Joomla!
In Joomla!, make sure the MageBridge product-connectors for JomSocial are published. There are two different product-connectors: One for JomSocial Groups and one for JomSocial Karma Points. In this example, we will deal only with JomSocial Groups. To activate this connector, browse to MageBridge > Connectors and publish the JomSocial Groups Product Connector.
Next, you need to connect the Magento product to the actual JomSocial Group of your choice. If the product-connector is available and enabled, go to MageBridge > Products and add a new Product Relation. The label of this Product Relation can be anything, but make sure you select a Magento product and select the proper group under JomSocial Group.
If you don't have a group yet, add a new group from within JomSocial - this can only be done from the frontend from your own profile. Make sure you set the group to private. It doesn't make much sense to sell groups set to public so people can freely register anyway.
As soon as a customer is know purchasing this product (identified by a certain SKU) the customer gets added to the specified JomSocial Group. Remember to update the Product Relation in MageBridge, as soon as the SKU is changing in Magento.
Known issues: MageBridge User Plugin must load before JomSocial User Plugin
Make sure to load the MageBridge User Plugin before the JomSocial User Plugin is loaded. Within Joomla!, User Plugins are used to react on the event that a Joomla! user is authenticated (among other events), and to deal with this, each User Plugin is passed a set of userdata. The JomSocial User Plugin modifies this dataset. Therefor it is important to give the MageBridge User Plugin an ordering that is lower than the JomSocial User Plugin.
Created on Monday, 21 September 2009Modified on Friday, 03 February 2012
More tutorials in this section
- Using HM_FeaturedProducts with MageBridge
- Using Layered Navigation Pro with MageBridge
- Related products with the Joomla! Tags component
- Integrating MageBridge with other Joomla! extensions
- Language configuration in MageBridge
- Integrating JomSocial and MageBridge
- JomSocial profile-synchronization
- Overriding the JomSocial-connector configuration
- Working with JomSocial events
- Step-by-step: Configuring sh404SEF [INCOMPATIBLE]
- Integrating MageBridge with other Magento extensions
- Using ARTIO JoomSEF
- Use MageBridge with Advanced Module Manager
- Using OneStepCheckout with MageBridge
- Using Jirafe with MageBridge
- Adding aheadWorks AJAX Cart Pro to MageBridge
- Using EcomDev CheckItOut with MageBridge
- Integrating MageWorx Instant Cart with MageBridge
