Coming up: 24 Sep - Magento PWA Studio training

Yireo - Trainings & extensions

Open main menu

MageBridge and newsletter subscriptions

For some time now, MageBridge is offering the mechanism of Product Connectors, which allow you to enhance your after-sales process. Part of this was also that you could also subscribe customers to newsletters. This functionality is now enhanced.

About product connectors

For those of you not familiar with MageBridge Product Connectors: These are a MageBridge-specific extension-type (so not a plugin, not a component, not a module, but a connector), which allow you to trigger something when a Magento product is sold. For instance, if the Magento product is actually a virtual dummy, you can sell memberships, download-access, etcetera. But you can also optimize after-sales by subscribing the user who made the purchase to a post-sales usergroup (customer segmentation), or subscribe that customer to a product-specific newsletter.

Not product connectors, but newsletter connectors

Magento also has its own newsletter functionality, but it lacks many of the features offered by dozens of Joomla! newsletter-extensions. The product-connectors sound like a cool replacement, but actually they are not: They are triggered only when a product is sold, but not when the newsletter-checkbox is checked within the Magento checkout or when a customer modifies its newsletter-settings under its own account.

These shortcomings asked for a new connector-type. But when thinking things over, we came to the conclusion that we might just as well use the Joomla! plugin-architecture for this. Therefor, a new plugin-group "magebridge.newsletter" has been created. Plugins of this type can call upon the event onNewsletterSubScribe (with arguments $user and $state) to subscribe a Joomla! user to their specific system.

The power of event forwarding

With MageBridge, connecting Magento logic to Joomla! logic is made simple by using the events-mechanism available in both applications (Magento observers and Joomla! plugins). A Magento event can be forwarded using MageBridge to Joomla! to become a Joomla! event. This architecture made it fairly easy to implement a Magento observer listening to newsletter-events in Magento, forward them over the bridge, and call upon specific Joomla! plugin-events. Part of the new MageBridge 2.0 approach will be to heavily document this approach for other developers.

Migrating existing connectors to plugins

All product-connectors that are actually connecting to Joomla! newsletter-extensions will be migrated to this new plugin-architecture in August / September 2012. After that, we will work also on migrating the entire product-connector technology to Joomla! plugins instead.

Posted on 30 June 2012

Looking for a training in-house?

Let's get to it!

Do not miss out on what we say

This will be the most interesting spam you've ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Sign up for the Yireo newsletter


Legal information

Other Yireo sites

Get Social

About Yireo