Tutorials for Magento and Joomla! - Yireo

MageBridge scenarios

With MageBridge there are many setups possible. However each setup has its own challenges, which we try to sum up in this tutorial.

Single Joomla! site, single Magento site

mb_graph_simple2Having a single Joomla! website, which makes use of a single Magento application, is probably the most common setup and also the primary target of MageBridge. While Magento offers multi-site capabilities, it is not always needed.

You're using MageBridge to connect Joomla! and Magento. Note that you are still building a Joomla! / Magento combined website, so knowledge of both applications is required.

Related topics

If you want to know more about how MageBridge deals with user-related issues (like authentication or Single Sign On), please read our tutorial Authentication Guide for MageBridge. This gives you some practical advice on how to implement the user-synchronization.

When developing your own web design, it's also wise to take a look at other papers like the MageBridge Designers Guide. With MageBridge the Magento theme is pushed into the Joomla! template, which requires you to modify either the Magento theme or the Joomla! template, to make things look nice. The easiest way is to modify the Joomla! CSS.

One domain for Joomla! and Magento

mb_graph_mage-in-joomlaJoomla! and Magento can be installed on the same domain. For instance, you can install Joomla! in the main directory and install Magento in a sub-directory called magento. Also the reverse is possible, installing Magento in the main directory and installing Joomla! in a sub-directory - however this is less recommended, because MageBridge is setup to integrate Magento inside Joomla!, not the other way around.

If you want to use Search Engine Friendly URLs (SEF) and want to access MageBridge through a URL like http://JOOMLA/shop/, make sure shop is not a physical directory. Otherwise this will cause a URL-conflict. Foldernames like mageshop or magento are better for this purpose.

Our recommendation is to use separate MySQL databases at all times - for security and performance.

Separate domains for Joomla! and Magento

You could also install Joomla! and Magento on separate domains. MageBridge calls both applications via the web-protocol HTTP, so Magento could be even located on the other side of the world. (Performance-wise that's probably not a good idea.)

mb_graph_two-domains

The multiple-domain setup also includes installing Joomla! and Magento on different subdomains: Your primary Joomla! site could be located on "www.example.com" while Magento is installed on "shop.example.com".

Installing each application in a separate Virtual Host could also lead to a tighter security (f.i. PHP-setting open_basedir), but there are some implications regarding performance and search engine optimization - you need tuning, but in the end this is a smarter setup. There are other whitepapers discussing these matters in more detail.

Note on SSL

Note that for two separate two domains, you will also need install two SSL-certificates (or a wildcard SSL-certificate) - if you wish to apply HTTPS to your shops. There are ways to bypass this problem (by communicating only 1 domain to the browser), but that's for experts only.

Multiple Joomla! sites, single Magento site

Joomla! does not support a multi-site mechanism by itself, but Magento does. So if you need multiple Joomla! sites that use content from the same Magento application, you can. MageBridge supports this, because Magento is supporting this. On every Joomla! site you can install the MageBridge extension and point it to a Magento application.

mb_graph_multiwebsite

You need to configure Magento as you normally would, but when setting up the stores and store-views (through System > Manage Stores) you need to remember the following difference:

  • Websites are used in Magento as collections of Stores. With MageBridge a Joomla! site could point to a specific Magento Website. You can only use one Magento Website per Joomla! website - which is very very logical.
  • Store Groups are actually not used that much and are sometimes also referred to just Stores. Within MageBridge you can easily configured Store Groups just like you would with Store Views (see below).
  • Store Views are used by Magento for various reasons, but the most popular appliance is to support different languages in a single website. Again MageBridge follows this logic by allowing you to connect a Joomla! language-extension like Nooku or Joom!Fish to a specific Magento Store View.

If this is all new to you, we recommend you read the Magento Designers Guide first to understand the difference between these three definitions. We recommend using Store Views for language-configurations and using Store Groups for all other purposes.

Note that it is only possible to display one store at the time inside the Joomla! pages. Multiple stores can not be displayed simultaneously. While MageBridge allows you to configure multiple Store Views for multiple languages, when an user selects the German language only the German store is available.

 

magebridge-world-map

The problem of multiple Joomla! sites

While MageBridge allows you to reuse Magento in multiple Joomla! sites, MageBridge does not support the multi-site principle of Joomla!. Take for example the following setup:

  • Site A: Magento
  • Site B: Joomla!
  • Site C: Joomla!

If both Joomla! sites have MageBridge installed, both sites can display a Website, Store Group or Store View from Magento - they even could be displaying the exact same store. If an user is created in site B, MageBridge will replicate these changes to site A (Magento). If an user is created in site C, again changes are replicated to Magento.

But MageBridge only allows changes from Magento to replicate to one single Joomla! site. If site B is the first site to be configured with MageBridge, this site is configured in Magento as Joomla! site. This means that if a customer is created in Magento, this user will only be created in site B and not site C.

Joomla! multi-site tools

To replicate changes between Joomla! sites, you will need to use a Joomla! multi-site extension to accomplish this. If such an extension is working through regular Joomla! plugins, chances are very big that this works together with MageBridge without a problem. However, we have not tested this and do not officially support such an extension.

Also beware of the fact that Magento customers can be maintained globally but also per store.

Single Joomla! site, multiple Magento sites

Sorry, having one Joomla! site containing multiple Magento applications is currently not supported. Perhaps in the future we will investigate the possibility to include multiple Magento Websites (part of the GWS-system and still contained within a single Magento multi-site application) in a Joomla! site. To be honest, we don't see the reason for this, but if you do, please try to convince us by posting your request on the Yireo Forums.

Created on Thursday, 25 June 2009
Modified on Monday, 05 March 2012

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo