Overriding the JomSocial-connector configuration
MageBridge uses connectors to add new functionality easily to the MageBridge-core, and for instance customer profiles can be modified using profile-connectors.
This tutorial explains you how to modify the default configuration of the JomSocial Profile Connector. This is very advanced functionality and most MageBridge customers will not need this at all. Make sure you have read and understood the Integrating JomSocial and MageBridge guide before jumping into this.
The JomSocial Profile Connector
The MageBridge JomSocial Profile Connector handles two things:
- It maps JomSocial profile-fields to Magento profile-fields (and vice versa), and there for allowing for profile-synchronization between JomSocial and Magento.
- It adds some MageBridge-links to the JomSocial Profile tab.
Configuration-file "jomsocial_default.php"
Both configurations (tab-links and profile field-conversions) are hard-coded. Because we felt only a few people need to change these settings, we did not want to offer yet another complete configuration-panel just for that. The GUI would basically get too complicated.
Instead, these configurations are based on (simple) PHP-arrays saved in a default configuration-file. But this configuration-file can be easily overridden with your own custom configuration-file.
The default configuration-file is located in the folder components/com_magebridge/connectors/connectors/profile and is called jomsocial_default.php.
Overriding the default configuration-file
You can just create a new copy of this configuration-file inside the same directory, as long as the copy starts with "jomsocial_" and ends with ".php". For instance you could choose the naming suffix "custom" and create a new file called "jomsocial_custom.php".
To activate this new configuration-file, navigate to Components > MageBridge > Connectors and open up the JomSocial Profile Connector. On the right, change the parameter Configuration from "default" to "custom" and save the connector. That's it.
Modifying tabs
The configuration-file contains a simple array called $tab. Do not change the name of this variable. Overriding the configuration-file is only ment to add or remove links within the array-element $tab['children'].
Modifying field-conversions
The array $conversion contains a list of JomSocial-fields and their Magento equivalents. You could change or remove JomSocial-fields, but note that JomSocial also allows you to change or remove the fieldcodes through the backend: If you want to remove a field from the synchronization, it's perhaps a smarter idea to just rename the fieldcode in JomSocial.
Created on Friday, 23 October 2009Modified on Sunday, 06 December 2009
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
