integrating magento into joomla!
DESCRIPTION
Presentation on how to integrate Magento into Joomla!, made for the Joomla!Days 2011 Netherlands. A fair comparison between JFusion, JMint and MageBridge.TRANSCRIPT
Joomla! vs Magento
Moogla?
Joomla! vs Magento
Moogla
• Joomla!– Most popular open-source CMS
– Community-driven
– User-friendly; easy architecture
• Magento– Most popular open-source e-commerce system
– Created by company Varien
– Flexible; complicated architecture
Joomla! vs Magento
Magento is hot
Joomla! vs Magento
Magento is hot
• Fast growth– Rapid development of new features
– Quick adaption of market (because there is no good alternative?)
– Buzz
Joomla! vs Magento
Why Magento?
• Highly configurable• Numerous payment gateways and other modules• All HTML can be modified
• Cool frontend features• Layered Navigation (or “Shop by ...”)• One Page Checkout
• Never a need for core-hacks• Parent/child theming• Class overrides• Observable events
Joomla! vs Magento
Serious e-commerce features
• Catalog features• Product comparison• Shop by color / manufacturer / price / ...• Reviews, rating, wishlists• Upselling, cross-selling, gift-certificates
• Ordering features• Multiple shipping addresses• One Page Checkout• Multicurrency, multicountry, multisite, multistore, multilingual• Online order-reviewing by admins
• Backend features• Export / import functionality• APIs for connecting to 3rd party ERP / CRM / bookkeeping
Joomla! vs Magento
Magento is for big shops
• Higher costs• Full implementation easily takes 50 hours of an expert• Cheap shared hosting doesn't work• Majority of Magento extensions is commercial
• Flexibility in favor of user-friendliness• XML layouts in Magento theming• MVC-usage and observer/observables• Clustering capabilities, advanced caching
• Only worth it, if you want to earn money
Joomla! vs Magento
Integrating Magento and Joomla! (1)
• Magento inside Joomla!– JFusion
– JMint
– MageBridge
• Joomla! inside Magento– JFusion (partially)
– MageBridge (partially)
Joomla! vs Magento
Integrating Magento and Joomla! (2)
• Common technologies– Integration over HTTP
• JFusion: HTML webpage• JMint: HTML webpage / SOAP• MageBridge: JSON-RPC / custom API
– Configuration of webservice• API user• API role
– Visual integration or not• IFRAME or integrated through API• Magento blocks reused in Joomla!• Other integrations (search, breadcrumbs)
Joomla! vs Magento
Solution 1: No integration
Joomla! vs Magento
No integration
• Keep Joomla! separate from Magento• No performance loss due to bridging• Building a Magento shop is made neither simple or difficult• No extra benefits from integration (because there is none)• Theming used to optimize
Joomla! vs Magento
Solution 2: JFusion
Joomla! vs Magento
What is JFusion?
• Open-source project
• Latest release 1.5.5 (February 2011)
• Focussed on user-authentication and user-sync• Magento, phpBB, WordPress, SMF, vBulletin, Moodle, Gallery2
Joomla! vs Magento
JFusion architecture
• Parsing of Magento-generated HTML– HTML-blocks are extracted (for instance login-form)
– Form is submitted to Magento
– No API, no Magento extension
• Managing user records– User synchronization (pull from Joomla!)
– Single Sign On between applications
• Joomla! requires access to Magento filesystem
Joomla! vs Magento
JFusion configuration on multiple levels
Joomla! vs Magento
JFusion packages
• Component (1 total)
• com_jfusion
• Plugins (6 total)
• User, Authentication, SystemSearch, Content
• Magelib
• Modules (13 total)
• mod_magecustomblock• mod_mageselectblock• mod_whosonline• mod_login• mod_user_activity
Joomla! vs Magento
Magento inside IFRAME
Joomla! vs Magento
JFusion Magelib plugin
• Load Magento classes inside Joomla! code– Initialize Magento application (partially)
– Call upon any Magento class within Joomla! extensions• Magento blocks built-in Joomla!• Checkout using Joomla! component• Joomla! plugins reacting on Magento events
• Code• Hack of app/Mage.php to prevent redefinition
of DS constant• Hack of app/code/core/Mage/Core/functions.php
to add __autoload() conditionally• $plg = new plgSystemMagelib(); $plg->loadAndStartMagentoBootstrap();
$customer = Mage::getModel('customer/customer');
Joomla! vs Magento
Solution 3: JMint
Joomla! vs Magento
What is JMint?
• Created by Anh Nguyen
• Google Summer of Code 2009 Project
• Latest version 1.0 in August 2009
Joomla! vs Magento
JMint architecture
• Parsing of Magento-generated HTML– HTML-blocks are extracted
– Use Firebug to identify DOM ID
– URLs are dynamically replaced (Magento-to-Joomla!-URL)
• SOAP API– User synchronization (pull from Joomla!)
Joomla! vs Magento
Guru configuration
• Modify PHP-code of Joomla! class-file
Joomla! vs Magento
JMint packages
• Component• com_jmint
• Plugins• JMint User Plugin• JMint Authentication Plugin
• Modules• mod_jmint_content• mod_jmint_head
• Templates• Magento lookalike
Joomla! vs Magento
Component: User synchronization
Joomla! vs Magento
Module “mod_jmint_content”
• Any HTML-identifier (“CSS selector”) can be used
• Built-in caching
Joomla! vs Magento
Joomla! vs Magento
Solution 4: MageBridge
Joomla! vs Magento
What is MageBridge?
• Created by Yireo
• Commercial package, free SVN-access
• Latest major version 1.6 in February 2011
Joomla! vs Magento
MageBridge architecture
• JSON / JSON-RPC API– All API-requests in one single HTTP-request
– HTML-blocks combined with API-data
– No usage of stand-alone Magento frontend
• Extra features– “Easier” setup and checks
– Menu-Items with Lightbox-popups
– JCE integration
– Template-patches to make Magento / Joomla! combo easier
Joomla! vs Magento
MaeBridge packages
• Component (1 total)
• com_magebridge
• Plugins (10 total)
• User, Authentication, System, Content• Search, Magento, MageBridge
• Modules (13 total)
• mod_magebridge_block• mod_magebridge_menu• mod_magebridge_products
• Connectors (29 total)
• Specific MageBridge plugins
• Templates (1 total)
• Magento lookalike
Joomla! vs Magento
Frontend integration
Joomla! vs Magento
Creating Menu-Items
Joomla! vs Magento
MageBridge Magelib plugin
• Load Magento classes inside Joomla! code– Initialize Magento application (partially)
– Call upon any Magento class within Joomla! extensions• Magento blocks built-in Joomla!• Checkout using Joomla! component• Joomla! plugins reacting on Magento events
• Code• No hacks• Works only under Joomla! 1.6• Autoloading all classes when plugin is activated
$customer = Mage::getModel('customer/customer');
Joomla! vs Magento
Comparison
Joomla! vs Magento
Comparison (1): General
JFusion JMint MageBridge
Type Free Free Commercial
License GPL GPL / OSL GPL / OSL
Joomla! 1.5 compatible Yes Yes Yes
Joomla! 1.6 compatible Yes No Yes
Configurat ion Backend PHP-class Backend
Joomla! extension(s) Yes Yes Yes
Magento extension(s) No Yes Yes
Ease-of-setup Difficult Xtra difficult Fairly difficult
Documentat ion Yes Yes Yes
Joomla! vs Magento
Comparison (2): Users
JFusion JMint MageBridge
Authent icat ion from J to M Yes Yes Yes
Authent icat ion from M to J No Yes
User synchronizat ion Yes
Usergroup synchronizat ion No Yes
Single Sign In (integrated) Yes Yes Yes
Single Sign On (separate apps) Yes No Yes
Password synchronizat ion Yes No Yes
No
No (#1)
Yes (auto) Yes (manually)
Yes (partially)
Shadow Joomla! users (#2) Yes (optionally) Yes (optionally)
#1: JFusion assumes integration of Magento into Joomla! (to my knowledge)#2: In other words: Users with an empty password, that require remote authentication
Joomla! vs Magento
Comparison (3): Visual integration
JFusion JMint MageBridge
Visual integrat ion Integrated Integrated
Magento blocks Yes Yes Yes
Search plugin Yes No Yes
Menu-Items No No Yes
Breadcrumbs No No Yes
Extra modules (cart , products) No No Yes
Hacks in Joomla! core No No
IFRAME (#1)
Yes (#2)
#1: JFusion 2.0 will introduce “Frameless Integration” of Magento#2: This could have been done through a simple System Plugin instead
Joomla! vs Magento
Comparison (4): Advanced
JFusion JMint MageBridge
Output caching No Yes Yes
Database integrat ion No No
Support for mult isite Yes No Yes
Backend integrat ion No Yes Yes
Full Magento bootstrap Yes Yes No
HTTP requests Mult iple Single Single
Install in same directory Yes No No
Yes (partially)
Joomla! vs Magento
Comparison (5): Extras
JFusion JMint MageBridge
JCE integrat ion No No Yes
Mult ilingual integrat ion No
Magento code inside Joomla! No
Joomla! after-sales act ions No No Yes
ACLs to apply private sales No No Yes
Yes (#1) Yes (#2)
Yes (#3) Yes (#4)
#1: JoomFish#2: JoomFish, Nooku Content, m17n#3: Requires some small core-hacks inside Magento code#4: Only works with Joomla! 1.6
Joomla! vs Magento
Questions?