Post by twiggy » Sun Aug 16, 2009 9:20 pm

A feature that would be good is an auto-update script. Something in the admin panel checks to see if the version being run is the current one and if not then one click update button to do all the work ;D

Just an idea, I have seen similar scripts in other PHP programmes so I guess it possible.

Active Member

Posts

Joined
Fri Aug 14, 2009 4:43 am


Post by jamieleshaw » Mon Aug 17, 2009 8:54 am

This would be great.

Active Member

Posts

Joined
Sun Jul 26, 2009 11:19 am

Post by twiggy » Mon Aug 17, 2009 6:47 pm

Yes it would be grate but it all depends on the developer, I would imagine its quite a large task.

But this would be an awesome feature for opencart and can bring in less experienced users and make opencart grow. Also keeps opencart safer knowing people have the latest bug free version. Also saves the rest of us time to run our shops!

Active Member

Posts

Joined
Fri Aug 14, 2009 4:43 am


Post by Qphoria » Mon Aug 17, 2009 8:14 pm

The problem is how to do it.

SMF uses its plugin system, which isn't "hook" based but instead actually edits the core files based on commands from an XML file. It seems to work, but looks for specific strings for updates

I also had an idea to use .patch files that are generated from udiff to work with a phppatching system. This way when a mod is made, it can generate .patch files automatically and then be executed on the server.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by twiggy » Tue Aug 18, 2009 5:27 am

so.....

You reckon its possible? ;D

Be an awesome feature for lazy people like my self + people who are scared of computers :)

Active Member

Posts

Joined
Fri Aug 14, 2009 4:43 am


Post by Qphoria » Tue Aug 18, 2009 9:06 am

Well look.. I've never tried to update OpenCart 1.x personally because I haven't had the need. But looking at the steps involved, I really can't believe how much trouble people are having with this.

This is definitely a trick that OpenCart could learn from what I did with ChromiumCart.

I made 2 sql files.
default.sql & upgrade.sql

default.sql is the basic stuff that comes with the first version.... first install
upgrade.sql is the stuff that is added subsequently.

BOTH files are run on fresh install, this allows the new installs to get the basics and the updates
Only the upgrade.sql file is run for upgrades between versions.

So now all changes to the db will go here. It also uses full proper sql so that it can even be run standalone in phpmyadmin. In this file I do all my changes, step by step.

So for example, when I released version 0.8.0
1. People did a full install which ran the default.sql & upgrade.sql
2. Upgrade.sql was blank at this time since it was the first version.
Then as I coded 0.8.1, I made changes to the database to add fields to the product table for dimensions, add tables for special products, related products etc.
So in my upgrade.sql file, I added all these steps, and labeled what each step did and what version of the cart it was for.
Then I set the script to autoexecute during the upgrade process, which was simply logging into the admin panel after uploading the files. The script checks the version in the db vs the version in the files and if they don't match, it runs the upgrade script. Simple! It runs the sql and did whatever else it needed so that people didn't have to be involved.
And since I patched the existing db, there was no backup/restore problems. It also meant that it was a static process that I controlled. So it was the same for everyone.

I welcome you to download the latest version of Chromium and look at the install/upgrade.sql file. It's extremely simple and easy to follow each step and it works 100% of the time. This could apparently be very useful in OpenCart as well.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jamieleshaw » Tue Aug 18, 2009 9:16 am

This would be very useful. :)
As I'm scared of stuffing it up ;)

Active Member

Posts

Joined
Sun Jul 26, 2009 11:19 am

Post by Leon » Tue Aug 18, 2009 8:15 pm

Qphoria wrote:Well look.. I've never tried to update OpenCart 1.x personally because I haven't had the need. But looking at the steps involved, I really can't believe how much trouble people are having with this.

This is definitely a trick that OpenCart could learn from what I did with ChromiumCart.

I made 2 sql files.
default.sql & upgrade.sql

default.sql is the basic stuff that comes with the first version.... first install
upgrade.sql is the stuff that is added subsequently.

BOTH files are run on fresh install, this allows the new installs to get the basics and the updates
Only the upgrade.sql file is run for upgrades between versions.

So now all changes to the db will go here. It also uses full proper sql so that it can even be run standalone in phpmyadmin. In this file I do all my changes, step by step.

So for example, when I released version 0.8.0
1. People did a full install which ran the default.sql & upgrade.sql
2. Upgrade.sql was blank at this time since it was the first version.
Then as I coded 0.8.1, I made changes to the database to add fields to the product table for dimensions, add tables for special products, related products etc.
So in my upgrade.sql file, I added all these steps, and labeled what each step did and what version of the cart it was for.
Then I set the script to autoexecute during the upgrade process, which was simply logging into the admin panel after uploading the files. The script checks the version in the db vs the version in the files and if they don't match, it runs the upgrade script. Simple! It runs the sql and did whatever else it needed so that people didn't have to be involved.
And since I patched the existing db, there was no backup/restore problems. It also meant that it was a static process that I controlled. So it was the same for everyone.

I welcome you to download the latest version of Chromium and look at the install/upgrade.sql file. It's extremely simple and easy to follow each step and it works 100% of the time. This could apparently be very useful in OpenCart as well.
I hope to see it done this way in the next release

Active Member

Posts

Joined
Tue Apr 07, 2009 1:20 am

Post by smallpox » Wed Aug 19, 2009 3:19 pm

please.

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm
Who is online

Users browsing this forum: No registered users and 83 guests