Yo dudes
I need to build web shops, but shop apps don't CMS too well and CMS plugins are heavy-handed shops in my experience, so I'd like to use MODx for the CMS and Opencart or similar for the shop.
Here's the kicker: I could SWEAR I read a good while ago that the MODx core had been engineered in such a way that it granted developers many wonderful benefits. One such benefit sounded (at the time of reading) like you could call an instance of the core from within an unrelated script, and then use it to access certain template chunks of the parent MODx site.
For example, say you had a web shop but you want to render a complete, dynamic, fully functional MODx-powered main menu at the top. You might have a script, or a plugin for your shop app that could then produce just the main menu template code and nothing else. So you could have elements of MODx bleed into the shop pages, or visa-versa, thus allowing you to use MODx to run part of the site, the shop app to run the shop part, but have elements of both on certain pages. Typically I might want the reverse: to have the shop mini-basket appear on the MODx pages.
I've researched long and hard and can find no evidence of what I'm sure I read before. I'd love it if someone to speak to this issue and confirm whether or not it's possible to do what I've described above. Just 'print out' the main menu of a modx site so I can use MODx to make a menu that appears within a different app's theme engine.
Choosing web apps is becoming a real pain. I have clients who are consistently using inconveniently shady crap like Joomla and Virtuemart - a horrible combination if ever I saw one. Suggestions I'm receiving include using WordPress and one of its many plugins in stead, but that just means you don't get the best of either world.
I want the power of MODx, merged with the features of Opencart, without having to customise two cores. I'm SO SURE I read you can use the MODx core in third party apps like this. Anyone know what I'm talking about?
Cheers
Dave
Yes, you can instantiate MODX from any PHP script and use many of its features to do pretty much whatever you want (e.g., $modx->getChunk(), $modx->runSnippet()).
That said, I'm not sure it's the best approach for what you want to do.
I don't generally do e-commerce sites, so I'm not the best guy to advise you. It's my understanding, though, that most people go the other way. Either they Build the site in MODX and integrate the cart software, or they use MODX for the main site and the cart software just for the cart itself (styled to look like the MODX site).
I'm sure someone with more e-commerce experience could give you a much better answer.