Setting the MageBridge URLs in Magento - Yireo

Setting the MageBridge URLs in Magento

In some situations, it is needed to set a hard definition of the MageBridge URLs in Magento. Normally, MageBridge is able to set the right URLs dynamically. But if something is generated in Magento stand-alone, the URL is set to the default Magento URL and not the Joomla! URL - for instance when you send mails from the Magento Admin Panel. This tutorial helps you to reconfigure Magento to solve this.

Making hard definitions of MageBridge URLs

mb_magento_configuration_scopeWhen working with Magento multi-site, it's a common task to change the URLs used by Magento. By defining the exact MageBridge URL within the Magento configuration, you can actually configure the Joomla! URL to be used. This way, MageBridge does not need to be intelligent at all but just loads the right URL as defined in Magento itself.

To configure this, login to the Magento Admin Panel and navigate to System > Configuration. Choose the right Configuration Scope for your MageBridge site. Next, navigate to Web > Unsecure.

Make sure to select a scope, and make sure you do not enter the MageBridge URL in the global scope (Default Config) because this will lock you out of the Magento Admin Panel.

Unsecure and Secure URLs

At the fields of Base URL and Base Link URL, enter the path to MageBridge. This is usually your Joomla! URL plus the Menu-Item alias of the MageBridge Root Menu-Item. In other words, copy the URL of your MageBridge homepage (which is different from your Magento homepage or your Joomla! homepage).

mb_web_baseurls

Both Joomla! URLs as Magento URLs

As you can see, you do not only need to enter the Joomla! URL, but you also need to manually set the Magento URL again. Static content like CSS, JavaScript and images is still served from Magento. But by overriding the default variable {{unsecure_base_url}}, you also override the URLs for the static content. This needs to be corrected by manually entering the Magento URLs again.

Created on Tuesday, 31 August 2010
Modified on Wednesday, 22 December 2010

About Yireo

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

More about Yireo