Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: SlammedDime on March 13, 2009, 08:01:37 PM

Title: Bridge SMF and Magento eCommerce
Post by: SlammedDime on March 13, 2009, 08:01:37 PM
A bridge to Magento is currently in the works.  Actually it's about 75% complete, just need to finish admin login stuff and bug testing.  What I'd like to layout is what I've done, and get any feedback before I even think about doing a beta test (I need to wait to here from Magento as well on licensing questions too).

Here's what I have so far:
Title: Re: Bridge SMF and Magento eCommerce
Post by: Orstio on March 13, 2009, 10:58:03 PM
QuoteIf a user logs out of SMF, they will still stay logged into Magento.

If a user logs into SMF directly, they will not be logged into Magento until clicking the 'Log in' link or visiting a page that requires login. (both this, and the last bullet, would require code changes to SMF, and in the spirit of bridges released by SMF, a bridge should not make any code changes to core files of either application.  None of what is above these two items has required any core code changes to SMF or Magento.)

These can both be accomplished without code changes to SMF.

One small database change in the settings table:

variable=>value
integrate_pre_include => file.php

That will cause SMF to include the file "file.php" as soon as SMF starts loading settings.  In that file you can define the other integration hooks and functions for them.

Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on March 14, 2009, 12:06:52 AM
Ahh, the one hook that I didn't think about.  Thanks for that, it won't be hard now to do those two bullets or the email issue.
Title: Re: Bridge SMF and Magento eCommerce
Post by: fords8 on March 14, 2009, 12:21:17 AM
Magento is very nice. Any closer to it coming out? Or is it out? I have not looked at it in a while.

SlammedDime, nice work! I will keep a eye on this topic.
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on March 22, 2009, 11:24:11 AM
Ok, after a lot of rewriting after rewriting, I have something stable for a front end bridge.  I still need to do the authentication for admins, and also for profile changes (email addresses).  It's looking quite promising.  The biggest thing that it boils down to is licensing, and I'm still waiting to hear back from Magento on that.  Their support is less than desirable.

Title: Re: Bridge SMF and Magento eCommerce
Post by: Orstio on March 22, 2009, 11:47:18 AM
Execellent.  :)

While I am not a lawyer, reading their license ( http://opensource.org/licenses/osl-3.0.php ), it seems to have a good definition of "derivative works", and I think you can safely distribute a bridge under whatever license you want:

Quoteb) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;

From the people who wrote that license:  http://www.rosenlaw.com/OSL3.0-explained.pdf

QuoteThe definition of Derivative Works in § 1(b) is particularly important. For one thing, that
defined term includes no reference whatsoever to linking or to any other technical manner of
making programs interoperate. The verbs used in § 1(b) ["translate, adapt, alter, transform, modify,
or arrange"] reflect the kinds of activities that we generally do to create derivative literary or other
expressive works, and those things—not functional linking—create Derivative Works as defined in
this license. As a result, linking an unchanged Original Work with another independently-written work does not, absent more, create a Derivative Work subject to § 1(b); such an act is merely the
incorporation of a copy of that Original Work into a collective work, authorized by § 1(a).
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on March 22, 2009, 01:36:57 PM
that's what I was thinking Orstio, and also what I was banking on.  The only thing that concerned me is that there was some stuff on their board saying that you either needed a commercial license to sell extensions under your own license, or they had to be released through MagentoConnect as OSL, but nothing solid from anyone from Varian or Magento.

As it stands, I am not distributing any of their files and make no changes to their code, only the files that I have written that extend and overload classes and functions, and only the functions that I am overloading, that I have rewritten, are in my files.  I do make calls to Magento code, but I believe that would fall under the 'linking' term, just as I 'link' to Magento with the integration file that SMF uses.
Title: Re: Bridge SMF and Magento eCommerce
Post by: Orstio on March 22, 2009, 01:48:54 PM
I believe you are correct.

QuoteThe only thing that concerned me is that there was some stuff on their board saying that you either needed a commercial license to sell extensions under your own license, or they had to be released through MagentoConnect as OSL, but nothing solid from anyone from Varian or Magento.

I think they are referring to selling extensions.  There can't possibly be any restriction on the location from where you release your extension, but I can see there being a restriction on commercial use of Magento.
Title: Re: Bridge SMF and Magento eCommerce
Post by: fords8 on March 23, 2009, 02:06:20 AM
I read some of the stuff on the Magento site. Sounds like if you change the Magento core at all, you will have issues. If you are calling any Magento code, I think that is fine. Since you are not changing Magento code at all.

So you are setting this up so you have to install SMF and Magento like you would any other time. Then your bridge would be installed from the package manager within SMF?

Of course getting them to agree in writing is best. This way they can't question you down the road.
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on March 23, 2009, 06:13:04 AM
The only thing that SMF requires is a 'helper file' that contains the integration functions, and this just needs to be placed in the SMF directory.  I don't think I will do a Package for that for the Package Manager.  Everything else gets installed into Magento, and Magento will fill the appropriate modSettings variables the first time the bridge is enabled.

SMF and Magento do not have to use the same database, they only have to reside on the same domain/subdomain.
Title: Re: Bridge SMF and Magento eCommerce
Post by: fords8 on March 23, 2009, 06:42:22 PM
Quote from: SlammedDime on March 23, 2009, 06:13:04 AM
The only thing that SMF requires is a 'helper file' that contains the integration functions, and this just needs to be placed in the SMF directory.  I don't think I will do a Package for that for the Package Manager.  Everything else gets installed into Magento, and Magento will fill the appropriate modSettings variables the first time the bridge is enabled.

SMF and Magento do not have to use the same database, they only have to reside on the same domain/subdomain.
Sounds like a plan to me. I look forward to testing this out when you are done with it.
Title: Re: Bridge SMF and Magento eCommerce
Post by: brelwit on April 18, 2009, 01:07:09 PM
Any news on the Magento Bridge?
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on April 18, 2009, 03:46:41 PM
It's pretty much complete, however right now I and the team are concentrated on completing SMF's new theme, so once that is complete, I'll be doing further bug testing on this and possibly release a beta.
Title: Re: Bridge SMF and Magento eCommerce
Post by: brelwit on April 18, 2009, 10:24:29 PM
Ok good to hear that.  I am wondering, if your bridge will be compatible with SMF 1.1.2?
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on April 19, 2009, 06:01:16 AM
I have to discuss with the Dev's if I should do a version for SMF 1.1.x (but I could only promise it would work with 1.1.8, and if you're not running 1.1.8, I can't recommend strongly enough that you do, as there have been numerous security fixes).
Title: Re: Bridge SMF and Magento eCommerce
Post by: brelwit on April 20, 2009, 06:24:50 AM
I have long been searching for any SMF bridge with an open source shopping cart system but until now couldn't find any.  So I am anticipating the release of your work. 

I think I may just need to start upgrading my forum to 1.1.8.  That would be a long task if I am starting from 1.1.2 considering that I have so many customized codes and a bridge to Coppermine as well.  Aaarrggh...  >:(
Title: Re: Bridge SMF and Magento eCommerce
Post by: Trekkie101 on April 21, 2009, 05:55:45 AM
Quote from: brelwit on April 20, 2009, 06:24:50 AM
I have long been searching for any SMF bridge with an open source shopping cart system but until now couldn't find any.  So I am anticipating the release of your work. 

I think I may just need to start upgrading my forum to 1.1.8.  That would be a long task if I am starting from 1.1.2 considering that I have so many customized codes and a bridge to Coppermine as well.  Aaarrggh...  >:(

Have a look at http://custom.simplemachines.org/upgrades/ this may be able to help :)
Title: Re: Bridge SMF and Magento eCommerce
Post by: brelwit on April 21, 2009, 09:22:33 AM
Quote from: Trekkie101 on April 21, 2009, 05:55:45 AM
Have a look at http://custom.simplemachines.org/upgrades/ this may be able to help :)

You are a saviour! Thanks! :D  I pray all add-ons I've made will still work after these upgrades.  I guess it's time to get my hands dirty again.
Title: Re: Bridge SMF and Magento eCommerce
Post by: eitai2001 on May 22, 2009, 12:27:15 PM
Hi. Any news on the stable release yet?
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on May 22, 2009, 12:58:25 PM
Not quite... I've been spending some time on working on the new SMF theme, so this has taken a back seat... what I have *is* fairly stable I think, but I do need to do some more bug testing... I've found one bug that really bothers me that I have to work on fixing that this can't be released without fixing.
Title: Re: Bridge SMF and Magento eCommerce
Post by: eitai2001 on May 22, 2009, 01:00:58 PM
Quote from: SlammedDime on May 22, 2009, 12:58:25 PM
Not quite... I've been spending some time on working on the new SMF theme, so this has taken a back seat... what I have *is* fairly stable I think, but I do need to do some more bug testing... I've found one bug that really bothers me that I have to work on fixing that this can't be released without fixing.

And when you fix this bug ... why not put out an alpha or beta and then everyone can help point out bugs.
I have a bug in my Mambo / SMF bridge, but not sure who can help me with that :P
Title: Re: Bridge SMF and Magento eCommerce
Post by: Andre N on November 14, 2009, 07:02:09 PM
Is this available yet anywhere?  :)
will be a guinea pig...

edit:
It looks like this has been forgotten. I'm going to do it using SMF's API and Magento's API. It doesn't look too complicated. I'll post the code here when finished (a week or 2).
Title: Re: Bridge SMF and Magento eCommerce
Post by: zionzz on November 25, 2009, 07:23:41 AM
looking forward to it  :)
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on November 25, 2009, 07:32:56 AM
I haven't really forgotten about it, I simply don't have the time to continue development on it.  On top of that, Magento is a very large, slow ecommerce solution that I wouldn't recommend to the average joe user who uses shared hosting.

I'll see if I can find the tar.gz file I had with all of my work in it to post for anyone to try and pickup on and use.
Title: Re: Bridge SMF and Magento eCommerce
Post by: Andre N on November 25, 2009, 11:52:38 AM
Quote from: SlammedDime on November 25, 2009, 07:32:56 AM
I haven't really forgotten about it, I simply don't have the time to continue development on it.  On top of that, Magento is a very large, slow ecommerce solution that I wouldn't recommend to the average joe user who uses shared hosting.

I'll see if I can find the tar.gz file I had with all of my work in it to post for anyone to try and pickup on and use.

That would be awesome
Title: Re: Bridge SMF and Magento eCommerce
Post by: Krusty on November 26, 2009, 12:29:53 PM
Quote from: SlammedDime on November 25, 2009, 07:32:56 AM
I haven't really forgotten about it, I simply don't have the time to continue development on it.  On top of that, Magento is a very large, slow ecommerce solution that I wouldn't recommend to the average joe user who uses shared hosting.


I am trying again magneto but your right about it being slow and painfull to use..... Prefer oscommerce .. tbh .
Title: Re: Bridge SMF and Magento eCommerce
Post by: Andre N on December 02, 2009, 11:47:44 AM
I think I am done with the code to have Magento communicate with SMF. I have tested the login/logout and it works. The other stuff like registration, change password, etc are written, but I need to test and probably troubleshoot and it will likely be the weekend before I get to it. I was able to (hopefully) accomplish this using a heavily modified version of SMF api and modifying (slightly) 3 files in Magento. I'm trying to change as little as possible so it can be updated.

The SMF to Magento part should be cleaner because of the integration hooks already in place and Magento's API... but I haven't started that yet

SlammedDime, if you still have your files I would love to see them, especially regarding the half I need.

Could we mark this topic as unsolved? Or should I start another topic next time I post about this?

Thanks. Wish me luck
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on December 02, 2009, 05:41:05 PM
Here are the files I was playing with.

Magento.php goes in the main SMF Directory, and you have to add a value to the smf settings table for 'integrate_pre_include' with a value of '$boarddir/Magento.php'
Title: Re: Bridge SMF and Magento eCommerce
Post by: Andre N on December 03, 2009, 10:56:27 PM
Thanks! That looks awesome. I'll see what I can do
Title: Re: Bridge SMF and Magento eCommerce
Post by: JohnKaL- on December 21, 2009, 08:56:06 PM
how can i uninstall it?
Title: Re: Bridge SMF and Magento eCommerce
Post by: SlammedDime on December 22, 2009, 03:31:18 AM
How did you install it?
Title: Re: Bridge SMF and Magento eCommerce
Post by: aED on January 15, 2010, 06:28:47 PM
Is there any updates on this? Can you tell me what other things that needs to be done here as I like to try and fix it myself :)
Title: Re: Bridge SMF and Magento eCommerce
Post by: Andre N on January 15, 2010, 08:08:23 PM
http://www.simplemachines.org/community/index.php?topic=352457
works
Title: Re: Bridge SMF and Magento eCommerce
Post by: aED on January 15, 2010, 10:26:05 PM
thanks :) didnt saw these on the search results