Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

contribution install system - ideas - help?


lybrary

Recommended Posts

There are so many interesting contributions to osCommerce which I would like to try and checkout, but each contribution needs editing of files, some are interdependent, there is no easy remove of one contribution if several ones have been installed afterwards, a.s.o. And if a new milestone release is done it is back to modifying everything again.

 

Since osCommerce already uses MySQL, why don't we write a contribution install system that remembers what was modified and allows an easy install, uninstall, and conflict checking. If anybody wants to help me with this or make suggestions, please contact me.

 

Here is an outline for how we could do that:

 

1) Each contribution has to conform to the following format:

 

PATH: filename_to_be_changed.php

bytelocation1 bytelocation2 text_being inserted

 

(if bytelocation1 == bytelocation2 it is a simple insert of text at that location)

 

2) The text being inserted and being replaced is entered into the database for later rollback

 

Installing the first contribution is straight forward. Installing the second contribution, one checks prior installed packages and modifies the bytelocations accordingly - then the system does the actual insert. This would also allow to detect conflicts where two contributions modify the same part of the file.

 

With this system uninstalls can be done in any order and it would be easy to try out a package and remove it if it doesn't work.

 

New files are easy to handle. They are copied and deleted. I am sure we could also handle modifications to the database itself such as new tables or similar.

 

I would like to know if anybody has done something similar or would like to help me with this. It doesn't seem to be that big of an effort. Most of the work is to get all the contributions into this format, but this could happen bit by bit with the best and most popular contributions first.

 

Chris

Link to comment
Share on other sites

Tall order for this code. I have to be honest here, I don't think it's practical based on what little I know about the structure of OSC. Don't get me wrong, this would be awesome! For a great example of how this can work, take a look at Mambo. If osC could implement the kind of modular structure and include an API for installing components, it would be the finest platform on the planet. (IMO, it's already the best e-commerce solution)

Link to comment
Share on other sites

One the one hand, this would be the greatest thing ever, and on the other hand, it would be a pain. I think this would only be useful to people who never make manual changes to the code. Otherwise, you'd have to make entries for all the little tweaks and changes you make as you go along or the installer would possibly break the code and/or rollback to a state before you made manual changes.

 

Certainly an installer system would make the lives of non-technical and new owners much easier.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

I agree that for users who do lots of code modifications, this would be perhaps not as useful. But with a little discipline, they could integrate all their modifications with such a system making it much easier to remove a feature they are not happy with anymore, for example.

 

If a new release comes out, the ones that modfied a lot will have a hard time to update to the new release. With such a system it would be easier.

 

I program a lot and have no problem hacking the php scripts, but I rather install-uninstall contributions safely with one click than mess around, make errors, a.s.o. Lots of time is wasted that way. With such a system it would be very fast and painless. And given the amount of contributions available this would help tremendously.

 

In any case, this post is mainly to check who would be able to help code this, or who has ideas to make this better. Ultimately, this could be a general tool to modify text files (html, php, perl, python, tcl ...) in an orderd fashion, allowing one to do add and remove parts safely and out of order. I could think of hundreds of projects which would want to have this.

 

Chris....

Link to comment
Share on other sites

Well, this is about the 100th iteration of this idea.

 

So far, none have gotten even remotly close to anything even resembling anything functional. With as many alterations as are made to the core file, and an infinate number of variations and modifications that have been made, this idea simply wouldn't be practical for anything other than a very basic, unmodified store.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Hi there,

 

Beyond compare and kdiif3 compare files to the original setup.

I'm not sure what else you want to do.

 

Claire

 

It would be very different to kdiff3. First it would be database driven and remember all changes you did and where you did them, alowing you to remove one change at a time in any sequence (as long as there are no conflicts). Being database and webdriven it would be a point and click interface. Install this module or remove that one. This would me much more user friendly than running kdiff3 several times with different contributions against your current code base.

Link to comment
Share on other sites

With as many alterations as are made to the core file, and an infinate number of variations and modifications that have been made, this idea simply wouldn't be practical for anything other than a very basic, unmodified store.

 

Sure, if you already have a custom modified store, you couldn't use this system. But I would assume that any new users would start from the latest stable release and could then use such a tool to quickly and safely install all the mods they desire, rather than spend weeks to install the modules by hand.

 

I looked through more than 1000 contributions posted and there are about 40-50 that I would probably want to have and another 30 or so that I would want to test. Such a system would allow me and any other new users to do the same just as quickly. And if I use the same system for any of my own modifications, I can rollback easily anytime or uninstall another earlier installed modification without problems. And once a new stable release comes out we would as a community update each contribution to work with the new release and then everyone can do a quick and safe install against that new release.

 

I already figured out a simple algorithm to do a safe install/uninstall. Maybe I spend a few days and see what emerges from that.

 

Chris....

Link to comment
Share on other sites

Actually, that's not really a case. From those 40-50 comtributions you want to install, I'd say at least a good third of them make alterations to the exact same code. Even if you used a tool that kept track of the changes you made, it is *very* likely that some of these contributions cannot be 'merged' in a programatical fashion. Simply keeping track of where the changes were made is not nearly enough.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

If that is the case, that many contributions change the same code, then yes, this would not be a useful tool. But at least it would detect such conflict very easily. And then one can either combine these contributions, or make one depend on the other. Then one would have to install module A before module B could be installed.

 

I guess we have to see what will happen. It could very well be that the whole thing is not useful. I will spend a few hours on it. It appears to me fairly straightforward to do, but maybe I am mistaken.

 

Chris....

Link to comment
Share on other sites

Best of luck, and keep us informed.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

I'm currently working on a contrib that does exactly what is being described. I came up with the idea independently a while back and just found this thread. I already have the basic functionality done, so hopefully it will be done in a less than a few weeks, keep a lookout for an announcement in the contrib announcements.

 

I also have a few enhancements to the idea of a basic contrib installer in the areas of avoiding conflicts. This contrib will also be based on an XML file format for describing how it should be installed and will also have support for SQL queries.

 

- Rinon

Link to comment
Share on other sites

and you guys checked out the SIF contribution and didn't like it ?

http://www.oscommerce.com/community/contri...,all/search,SIF

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I've just finished my version of a contribution installer. For more info see: http://www.oscommerce.com/forums/index.php?showtopic=156667

 

Download here: http://www.oscommerce.com/community/contributions,3286

 

I really need help making packages for this installer. Please see the example_contribution inside the zip file for an example.

 

- Rinon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...