Hi, Has anyone converted a online store written in oscommerce (a couple years ago) to Rails? Does the database convert over fairly easy? I wrote http://www.gamefest.com a couple years ago in PHP and mysql (using oscommerce as a starting point), and might be rewriting it in in Rails. Just wondering if anyone has done the same. Thanks, Joe
Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> Has anyone converted a online store written in oscommerce (a couple > years ago) to Rails? Does the database convert over fairly easy?I don''t have any experience with osCommerce, but I''m talking to another developer who does. I''d be interested in your conversion experiences when you''re done. :-D Write up a wiki page with what you''ve learned. -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
I''ll do that. It would make an interesting ''case study'' or something. Anyone have anything in particular that they''d like to see? On 9/12/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote:> Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Has anyone converted a online store written in oscommerce (a couple > > years ago) to Rails? Does the database convert over fairly easy? > > I don''t have any experience with osCommerce, but I''m talking to > another developer who does. I''d be interested in your conversion > experiences when you''re done. :-D Write up a wiki page with what > you''ve learned. > -- > Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper > doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
i was actually considering taking a stab at something like this if you want some dev assistance. My only issue so far is the lack of E-comm support (paypal, verisign, etc..). let me know adam Joe Van Dyk wrote:> I''ll do that. It would make an interesting ''case study'' or something. > > Anyone have anything in particular that they''d like to see? > > On 9/12/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: > >>Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: >> >> >>>Has anyone converted a online store written in oscommerce (a couple >>>years ago) to Rails? Does the database convert over fairly easy? >> >>I don''t have any experience with osCommerce, but I''m talking to >>another developer who does. I''d be interested in your conversion >>experiences when you''re done. :-D Write up a wiki page with what >>you''ve learned. >>-- >>Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper >>doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> My only issue so far is the lack of E-comm support (paypal, > verisign, etc..).http://payment.rufy.com/ http://dist.leetsoft.com/api/paypal/
On 9/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > Has anyone converted a online store written in oscommerce (a couple > years ago) to Rails? Does the database convert over fairly easy? > > I wrote http://www.gamefest.com a couple years ago in PHP and mysql > (using oscommerce as a starting point), and might be rewriting it in > in Rails. Just wondering if anyone has done the same. > > Thanks, > Joe >I''m curious, by convert do you mean copy the whole look and feel together with the feature set? IMO you are better off just starting from scratch. Look at the features of competing products, decide what you want and don''t want, and then write it from the ground up. Ruby and Rails has most of the modules you would need to put together a shopping cart system. Also, I''m of the opinion that a lot of the features that oscommerce has are not what the majority of people really want. Most of the merchandising stuff falls into that category (also ordered, etc.). I''ve developed commercial ecommerce systems for about 9 years now, and shopping cart systems for storefronts that have large quantities of shippable products are a fairly small percentage of the market. I would start out by creating a good checkout process combined with a simple buy button approach where merchants put buy buttons on static pages. That gives you something a lot of people can use, it''s simple, and it''s doable in a fairly short time period. Along with this hook in some payment processors and maybe shipping and tax modules. Just this would give you a very popular platform, especially if the checkout process was well done. Then before adding a bunch of merchandising options I might think about subscription membership features or features for electronic delivery. Those are in very big demand right now. Just my 2 cents.. Chris _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 13/09/05, snacktime <snacktime-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m of the opinion that a lot of the features that oscommerce has are > not what the majority of people really want.My reason for learning Rails is that all pre-packaged ecommerce systems are such a compromise. OSCommerce sites, for example, can be spotted immediately, thanks to the rather clunky nature of the interface. IMO, OScommerce isn''t designed to sell - it''s designed to make a set of products available. I''ve seen a little discussion on the web where people suggest that an off-the-shelf ecommerce system created using Rails would be cool. Personally, I think that such a system would offer nothing new over existing systems written in PHP etc. Rails is great but I don''t see the point in yet another generic ecommerce system just because it''s been created in Rails.> I would start out by creating a good checkout process combined with a > simple buy button approach where merchants put buy buttons on static pages.I''d love to see libraries/helpers/generators that can be strung together by a Rails developer. That way, someone like me could create a solution that works for them but perhaps borrow functionality where appropriate. -- Matthew Revell www.understated.co.uk
We''re in the process of switching from oscommerce as our ecommerce solution to rails. I would have to agree with snacktime that doing a copy would be horrible (eps trying to recreate those epic table trees). I''ll assume what you mean is you want to create a new application around the original database. This is definitely doable, you''ll just have to rename some tables and columns, or spend all your time bashing active record into an oscommerce shaped hole. (I think table names are mostly okay, but primary and foreign key names are not in standard rails format) On 9/13/05, Matthew Revell <matthew.revell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 13/09/05, snacktime <snacktime-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m of the opinion that a lot of the features that oscommerce has are > > not what the majority of people really want. > > My reason for learning Rails is that all pre-packaged ecommerce > systems are such a compromise. OSCommerce sites, for example, can be > spotted immediately, thanks to the rather clunky nature of the > interface. IMO, OScommerce isn''t designed to sell - it''s designed to > make a set of products available. > > I''ve seen a little discussion on the web where people suggest that an > off-the-shelf ecommerce system created using Rails would be cool. > Personally, I think that such a system would offer nothing new over > existing systems written in PHP etc. Rails is great but I don''t see > the point in yet another generic ecommerce system just because it''s > been created in Rails. > > > I would start out by creating a good checkout process combined with a > > simple buy button approach where merchants put buy buttons on static > pages. > > I''d love to see libraries/helpers/generators that can be strung > together by a Rails developer. That way, someone like me could create > a solution that works for them but perhaps borrow functionality where > appropriate. > > -- > Matthew Revell > www.understated.co.uk <http://www.understated.co.uk> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 9/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > Has anyone converted a online store written in oscommerce (a couple > years ago) to Rails? Does the database convert over fairly easy? > > I wrote http://www.gamefest.com a couple years ago in PHP and mysql > (using oscommerce as a starting point), and might be rewriting it in > in Rails. Just wondering if anyone has done the same. > > Thanks, > JoeI''ve been a PHP developer for years, and i''ve worked with osCommerce a lot. I made contribs for customers. I think that osCommece is powerful out-of-the-box, but it lacks a lot of features usually needed as well it has some don''t needed. The development team hasn''t released a file for about 2 years, and finally, osCommerce source code is the worst thing ever seen (as you should know). It''s a pain to edit all those html+php files. It does not use MVC or simply templates :S. I would take _only ideas_ from osCommerce, and start totally from scratch with rails. Apart from that, I already knew gamefest.com <http://gamefest.com>, i''m a full-spare-time board gamer :]. Regards, Rodrigo. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 9/13/05, Rodrigo Alvarez Fernández <papipo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 9/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > > Has anyone converted a online store written in oscommerce (a couple > > years ago) to Rails? Does the database convert over fairly easy? > > > > I wrote http://www.gamefest.com a couple years ago in PHP and mysql > > (using oscommerce as a starting point), and might be rewriting it in > > in Rails. Just wondering if anyone has done the same. > > > > Thanks, > > Joe > > I''ve been a PHP developer for years, and i''ve worked with osCommerce a lot. > I made contribs for customers. > > I think that osCommece is powerful out-of-the-box, but it lacks a lot of > features usually needed as well it has some don''t needed. > > The development team hasn''t released a file for about 2 years, and finally, > osCommerce source code is the worst thing ever seen (as you should know). > It''s a pain to edit all those html+php files. It does not use MVC or simply > templates :S. > I would take _only ideas_ from osCommerce, and start totally from scratch > with rails. > > Apart from that, I already knew gamefest.com, i''m a full-spare-time board > gamer :]. > > Regards, > > Rodrigo.Oh yeah, I''m crying now when I''m thinking of the code that''s in that osCommerce site. I added so much stuff to that osCommerce engine (like pre-orders and ability to sell used and worn games) and it''s all hacked together with pMachine (the gamewire part). You think it would be easiest to manually (or, via a script) to convert the database over from the osC format over to a "happy path" Rails format?
On 9/13/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > You think it would be easiest to manually (or, via a script) to > convert the database over from the osC format over to a "happy path" > Rails format? >That could be the way. Since you are starting from scratch with rails, why don''t use the rails database schema convention? I think that doing this will be helpful later. If you keep the osC schema, it could be that you will cry again for that. Besides, i prefer to call ''id'' the primary key, rather than cusromers_id (table name prefix and plural), and the foreign keys are ugly too (customers_id again). If you are used to rails way, i really recommend you to convert the db schema. It could turn into a headache. If you add more tables later... which names should you use for their PKs? Regards, Rodrigo. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 9/13/05, Matthew Revell <matthew.revell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 13/09/05, snacktime <snacktime-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m of the opinion that a lot of the features that oscommerce has are > > not what the majority of people really want. > > My reason for learning Rails is that all pre-packaged ecommerce > systems are such a compromise. OSCommerce sites, for example, can be > spotted immediately, thanks to the rather clunky nature of the > interface. IMO, OScommerce isn''t designed to sell - it''s designed to > make a set of products available. > > I''ve seen a little discussion on the web where people suggest that an > off-the-shelf ecommerce system created using Rails would be cool. > Personally, I think that such a system would offer nothing new over > existing systems written in PHP etc. Rails is great but I don''t see > the point in yet another generic ecommerce system just because it''s > been created in Rails. >I agree that it doesn''t make sense to copy an existing system and rewrite it in Rails. But I''d love for someone to show me a good open source ecommerce platform that would pretty much works out of the box in most cases and is easy to install and customize. I''ve looked for something like this going on 5 years now, and I haven''t found anything as of yet. Rails, especially with it''s ajax capabilities is very well suited as a platform to build an ecommerce framework on. Chris _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I am having a hell of a time getting this code to work properly. I need to do an insert into a table from another query. Here''s the code for what I''m trying to do. The first method is where I call the "find_by_sql" in the Controller. The second method is in the Model. Code: (Controller Code) def inputs do_the_insert = TempLocalNaic.insert_naics(user_id, id, radius) end (TempLocalNaic Model) def insert_naics(user_id, id, radius) find_by_sql(["insert into temp_local_naics select distinct naics, ? from Establishments a cross join (select x, y from municipalities where id = ?) b where (sqrt(square(b.x-a.x)+square(b.y-a.y))/1000)*.62 < + ?", user_id, id, radius]) end When I run this code. The insert actually works, but an error comes up, which stops the app from running anything else.. Here''s the error. undefined method `fetch_fields'' for nil:NilClass The error is raising on the insert_naics method. Any idea what is going on here? Thanks Clint
snacktime <snacktime-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> Also, I''m of the opinion that a lot of the features that oscommerce has are > not what the majority of people really want. Most of the merchandising stuff > falls into that category (also ordered, etc.). I''ve developed commercial > ecommerce systems for about 9 years now, and shopping cart systems for > storefronts that have large quantities of shippable products are a fairly > small percentage of the market. > > I would start out by creating a good checkout process combined with a simple > buy button approach where merchants put buy buttons on static pages. That > gives you something a lot of people can use, it''s simple, and it''s doable in > a fairly short time period. Along with this hook in some payment processors > and maybe shipping and tax modules. Just this would give you a very popular > platform, especially if the checkout process was well done. > > Then before adding a bunch of merchandising options I might think about > subscription membership features or features for electronic delivery. Those > are in very big demand right now.+1 This has been my experience as well (although only about five years compared to yours). One of the advantages of pre-built/pre-packaged e-commerce software is that shop owners and ISPs can just "install and go". I think that''s really a myth though. They do "install and go", but find it doesn''t fit their needs exactly and have to tweak and customize. They try to do it themselves, but end up getting frustrated and call in a contractor. Rails changes the picture a little. Theoretically, it should be fairly straightforward to do what you''ve outlined above. Hopefully that means the overall cost for a custom e-comm site may be on par with setting up/configuring your favorite "off the shelf" e-comm package. -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
snacktime <snacktime-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> But I''d love for someone to show me a good open source ecommerce > platform that would pretty much works out of the box in most cases > and is easy to install and customize. I''ve looked for something like > this going on 5 years now, and I haven''t found anything as of > yet. Rails, especially with it''s ajax capabilities is very well > suited as a platform to build an ecommerce framework on.I think you haven''t found it because it''s not possible. Every business is different. One size doesn''t fit all. Just ask all the SAP/Baan/JD Edwards companies how well those packages fit them right out of the box. I''ve done two completely different cell phone web sites and several iterations of each. You''d think each cell phone web site would be roughly the same, but it''s not. Each company has their own back-end processes and procedures that need to be handled individually. What would a Rails-based e-comm framework look like? The only piece that seems common to every site is the Payment gateway and shipping calculator. I know there is fledgling support for a payment gateway on rubyforge. I''m not sure about shipping. That would be a good community effort. Ruby modules that could look up shipping cost from USPS, UPS, FedEx, etc based on size, weight, source and destination. The rest of the whole e-comm site I believe is unique to the individual store. -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
On 9/13/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote:> I am having a hell of a time getting this code to work properly. I need > to do an insert into a table from another query. Here''s the code for > what I''m trying to do. The first method is where I call the > "find_by_sql" in the Controller. The second method is in the Model. > > Code: > (Controller Code) > def inputs > do_the_insert = TempLocalNaic.insert_naics(user_id, id, radius) > > end > > (TempLocalNaic Model) > def insert_naics(user_id, id, radius) > find_by_sql(["insert into temp_local_naics > select distinct naics, ? from Establishments a > cross join (select x, y from municipalities where id = ?) b > where (sqrt(square(b.x-a.x)+square(b.y-a.y))/1000)*.62 < + ?", > user_id, id, radius]) > end > > When I run this code. The insert actually works, but an error comes up, > which stops the app from running anything else.. > > Here''s the error. > undefined method `fetch_fields'' for nil:NilClass > > The error is raising on the insert_naics method. Any idea what is going > on here? >find() is expecting to get a result set back as a return value, but the insert doesn''t return one. I''d say you should use the execute() method on the database connection itself; it''s good at this sort of thing. --Wilson.
Wilson wrote:>find() is expecting to get a result set back as a return value, but >the insert doesn''t return one. I''d say you should use the execute() >method on the database connection itself; it''s good at this sort of >thing. > >Whoa...I never thought of that. So would I just substitute execute( ) for find_by_sql( )? Man I''m totally stoked. This was giving me problems all day yesterday. Thanks for the help. Clint
On 9/13/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote:> Wilson wrote: > > >find() is expecting to get a result set back as a return value, but > >the insert doesn''t return one. I''d say you should use the execute() > >method on the database connection itself; it''s good at this sort of > >thing. > > > > > > Whoa...I never thought of that. > > So would I just substitute execute( ) for find_by_sql( )? Man I''m > totally stoked. This was giving me problems all day yesterday. > > Thanks for the help. > Clint >No problem. base_connection has some useful methods on it, such as execute(), select_one(), and select_all(). Use execute() for inserts and updates, and the selectors for, well, selects. Heh. I just had an opportunity to use this today, actually.. I wanted to avoid a "select * from areas", but I needed to get a list of unique counties from my areas table: @counties = ActiveRecord::Base.connection.select_all("select distinct county_name from areas").collect do |row| [ row["county_name"], row["county_name"] ] end @counties.unshift(["Please select a county.",""]) Much faster, though there''s probably still a more elegant solution. There usually is. --Wilson.
You do this from the controller? Isn''t it bad coding to do the DB work from the controller? Wilson Bilkovich wrote:>On 9/13/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote: > > >>Wilson wrote: >> >> >> >>>find() is expecting to get a result set back as a return value, but >>>the insert doesn''t return one. I''d say you should use the execute() >>>method on the database connection itself; it''s good at this sort of >>>thing. >>> >>> >>> >>> >>Whoa...I never thought of that. >> >>So would I just substitute execute( ) for find_by_sql( )? Man I''m >>totally stoked. This was giving me problems all day yesterday. >> >>Thanks for the help. >>Clint >> >> >> >No problem. base_connection has some useful methods on it, such as >execute(), select_one(), and select_all(). Use execute() for inserts >and updates, and the selectors for, well, selects. Heh. > >I just had an opportunity to use this today, actually.. I wanted to >avoid a "select * from areas", but I needed to get a list of unique >counties from my areas table: >@counties = ActiveRecord::Base.connection.select_all("select distinct >county_name from areas").collect do |row| > [ row["county_name"], row["county_name"] ] > end >@counties.unshift(["Please select a county.",""]) > >Much faster, though there''s probably still a more elegant solution. >There usually is. > >--Wilson. >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-- Clint Pidlubny clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org 612.590.8343
On 9/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Has anyone converted a online store written in oscommerce (a couple > years ago) to Rails? Does the database convert over fairly easy? > > I wrote http://www.gamefest.com a couple years ago in PHP and mysql > (using oscommerce as a starting point), and might be rewriting it in > in Rails. Just wondering if anyone has done the same.Anyone want to help? I''m going to be doing the bulk of the conversion for free, so it would have to be on a volunteer basis. But I''m going to release the store code as public domain. What would be really great is if I could have someone who I could bounce ideas off of, and who could check the code every once in a while to make sure that I''m not doing something really dumb. This could be a chance to get some full code for a fully functioning, complex e-commerce site out in the open! Thanks, Joe
sorry i''m a bit delayed in responding to this but.... I have worked with osCommerce for years (tons of installs and significant customizations) because it looked so good out of the box...but once we started having to actually mess withe things under the covers we found it to be a horrribly designed piece of crap. The "modules" aren''t modular and frequently overwrite common files. I think the designers believed MVC to be a make of car or something because the more common geek definition is NEVER applied to their system. DON''T PORT IT. Write something new from scratch. Trust me, the pain isn''t worth it. Maybe port some of the logic in the many payment modules but the rest of it is not worth the effort. If you need a starting point try the one in the rails book. It''s simplistic but it''s a good base. Kate On 9/12/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > Has anyone converted a online store written in oscommerce (a couple > years ago) to Rails? Does the database convert over fairly easy? > > I wrote http://www.gamefest.com a couple years ago in PHP and mysql > (using oscommerce as a starting point), and might be rewriting it in > in Rails. Just wondering if anyone has done the same. > > Thanks, > Joe > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -Kate (masukomi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails