The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

How to integrate with Modx??

markgmarkg Member
in Bugs & Feature Requests edited March 2009

The tute in the wiki is unfinished, and following the instructions doesn't get you anywhere.

Is there actually any way or guide to do this or are the claims on the FoxyCart site just old-fashioned hype without substance?
  • Mark-
    You are not alone. There is a plug-in (FoxyBack) that was in development for a while but I believe is currently DOA) I have managed a limited integration (I primarily wanted to use the subscription capability) but its definitely hit and miss. I think for a standard cms/cart solution you could fairly easily set something up with a standard modx install, the problem comes with the JSON/XML data integration which the FoxyBack plugin was supposed to handle. Like editing user information, managing subs etc...The plug in itslef I think suffers froma bit of bloat, with the addition of Inventory Management and some other things that make it crazy complex to install.

    On the other hand, since modX is hands-down one of the best CMS's available, and I would hope that the plug-in development continues. Id be willing to help develop, but I'm primarily a front-end guy and only a hunt and peck on the real back end stuff...
  • brettbrett FoxyCart Team
    A few notes, and I don't say any of this to discourage, but to help clarify things.

    - FoxyBack isn't a FoxyCart project. I was personally involved in some aspects of getting it set up, but we (FoxyCart) aren't officially involved in maintaining. We'd love to be, but we're hard at work on FoxyCart itself. The project does need some help, so if anybody wants to help please post on the MODx forum thread. I apologize for the confusion that my involvement has caused, as it's probably created some expectations that can't currently be met. Luke knew this would happen, so he gets the gold star for the week.

    - That said, FoxyBack works, and works well once it's set up, but as the website says, it's "alpha". And in this case, like MODx Revolution itself, alpha means alpha. It's definitely not easy to install and it does require a bit of manual tweaking. So if you're looking for anything other than an alpha you're going to be greatly disappointed.

    - Probably worth repeating, it's alpha. In a world of Google-esque "betas", it's important to understand what alpha really means. (Difficult to install, not feature complete, etc.) I'm not trying to beat a dead horse, but the "alpha" bug kept biting me with MODx Revolution. Every time I go to play with it I think, "Ah, I'll be fine." A week and a barely functional install later, I realize that it's still alpha, just like they say it is. (And I've done this 3 times now, no joke.)

    - We want to make sure there's no "hype" on our website. If you see anything that you feel is inaccurate please let us know. That said, there are a _lot_ of MODx+FC sites live right now, and you can make a _really_ compelling integration using nothing more than Templates, Ditto, TVs, and maybe some PHx. If you want super advanced integration like FoxyBack is capable of (with some work), then, like I said, you'll probably be disappointed. I'm aware of at least a few people have been able to use FoxyBack to do some neat stuff, but they're all fairly advanced users.

    - I'm personally trying to find somebody to adopt FoxyBack as their own, as the current owners don't have the time to make it happen. Again, if anybody's interested please post in the MODx forum thread or whisper me.

    - As far as inventory being "bloat" goes, (not to say you're wrong, because the codebase could be improved, but) I think that's probably a highly subjective subject. The most commonly requested feature for MODx integrations is inventory, so if it weren't in there a lot of people would probably be complaining it was missing. Just saying.

    - MODx is definitely one of the best CMSs available. That's for certain.

    - FoxyCart 050 has some really powerful things to allow even more seamless integration between FoxyCart and MODx, and 051 will have even more. Most notable are the user API and the subscription XML datafeed. Both of these functionalities (and new 051 functionality) can allow FoxyBack to be significantly simplified. Especially for subscription-based access, that is _greatly_ simplified with the subscription XML datafeed in FCv050.

    And again, to address the "hype": You can add FoxyCart to a MODx site in very little time using only TVs and Templates. One user, Flinx777, has done maybe 20 FC+MODx sites in the past year or so. I'm not sure how many FC+MODx sites there are out there, as we don't track that, but it's a lot. All that said, I don't think it's hype, but you're right that there is a lack of documentation. The reason for this is probably that MODx doesn't have great documentation to begin with, and/or that MODx users don't need documentation once they get the hang of it. Or maybe not. Just thinking out loud.

    Sorry to write so much but this comes up a lot and I want to clarify things so we (both the FC community and the MODx community) can be on the same page and hopefully help get the ball rolling in a positive direction.
  • Well then, I guess it's time I do Screencast for integrating MODx and Foxy Cart together. Like Brett said above, I've done quite a few in the last year and 1/2 (I've honestly lost track), but creating video documentation is doable for sure...give me a week or two tops and I'll get those over to Brett.
  • Brett-
    I think you are absolutely correct re: simple integration using tv's and snippets in modx...its dead simple to set up (used in conjuction with other out of the box snippets you can have a functioning cart system in a relatively short time.)

    My comment was basically a "sky is blue" kind of thing. What we currently know is this. ModX is chocolate. Foxy is Peanut Butter. Now how do we get that magic Reese's?

    Like I said I am not a really heavy back end developer (but I can hunt and peck my way through code) but I am willing to contribute to the development/documentation as much as I am able...

    Keep up the good work though...
  • brettbrett FoxyCart Team
    Ha, I just LOL'd for real. (You know, as opposed to me typing LOL but not really LOLing.)

    Fwiw, I'm really trying to get a talented and experienced MODx guy to adopt FoxyBack. Hopefully he'll make something happen, and I'm sure that he'd love to have some help doing it. Most developers are allergic to documentation, so that's always useful ;)
  • brettbrett FoxyCart Team
    edited March 2009
    Here's a quick example of how to set up MODx + FC:

    - Template for category pages, use Ditto to display all child documents (products)
    - Template for product pages, with TVs as necessary to allow easy entering of prices, categories, etc.
    - Optionally, modify the InheritParentTemplate to use your product template when the parent is the category template. This makes it a little easier to create new documents underneath a certain template but to get a different template automatically. Alternately, just disable the InheritParentTemplate plugin and set the default template to the product template.

    Here's a quick example modification to the InheritParentTemplate plugin. This is just the replacement for the switch statement:
    switch($e->name) {
    	case 'OnDocFormPrerender':
    		if(($_REQUEST['pid'] > 0) && ($id == 0)) {
    			if($parent = $modx->getPageInfo($_REQUEST['pid'],0,'template')) {
    				switch ($_REQUEST['pid']) {
    					case 29: // The IDs of the parent documents with alternate inheritance
    					case 30:
    					case 31:
    						$content['template'] = 5; // The ID of the template you want to use
    						$content['template'] = $parent['template'];

    Sticking with the base MODx functionality (TVs, Ditto, Templates) gives you TONS of flexibility.
  • Hey,
    Im a programmer decently versed across the board.
    I would be interested in helping foxyback along.

    Somebody get ahold of me
  • brettbrett FoxyCart Team
    Hi jgauthier.
    I'll respond to you privately. Thanks for posting.
Sign In or Register to comment.