Post by gavin m » Thu Apr 01, 2010 6:27 am

Is there an upgrade script to go form 1.4.x to 1.4.6?

I've had a look but can't find anything.

1.4.6 seems pretty stable, from the look of the lack of bugs so going to run an upgrade on my current store on my test server so could do with a script.

Cheers

Active Member

Posts

Joined
Thu Jun 04, 2009 3:23 pm

Post by allenshea » Thu Apr 01, 2010 9:20 am

So far you can use http://forum.opencart.com/viewtopic.php ... 974#p58671

But it can only upgrade to 1.4.4, if you use this script for 1.4.6, you will have problem for Generate Invoice ID

I'm also hope Q can update this script, allow us to upgrade from 1.4.0 to 1.4.6

Allen

I've successfully use this script with some modification upgrade from 1.4.0 to 1.4.6,

Add below into the script, I also have changed store_id from 1 to 0

Code: Select all

// Add "invoice_id" to order table
$sql = "DESC `" . DB_PREFIX . "order` invoice_id";
$query = $db->query($sql);
if (!$query->num_rows) {
	$sql = "
	ALTER TABLE `" . DB_PREFIX . "order` ADD COLUMN `invoice_id` int(11) collate utf8_unicode_ci NOT NULL Default '0';
	";
}
$db->query($sql);

// Add "invoice_prefix" to order table
$sql = "DESC `" . DB_PREFIX . "order` invoice_prefix";
$query = $db->query($sql);
if (!$query->num_rows) {
	$sql = "
	ALTER TABLE `" . DB_PREFIX . "order` ADD COLUMN `invoice_prefix` varchar(10) collate utf8_bin NOT NULL;
	";
}
$db->query($sql);
I'm not sure if this help you to upgrade your store.

Allen

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by gavin m » Tue Apr 06, 2010 2:04 am

Thanks for that, I'm going to give it a try tomorrow, so will let you know if it works!

Unless someone else has tried it or has a known working script?

Active Member

Posts

Joined
Thu Jun 04, 2009 3:23 pm

Post by Qphoria » Tue Apr 06, 2010 2:36 am

I ran an upgrade yesterday from 1.3.2 to 1.4.6
There were no new db changes that required scripting between 1.4.4 to 1.4.6

Run both scripts, then go through the settings area to add any new fields that may exists

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by HKOCH » Tue Apr 06, 2010 3:09 am

Qphoria wrote:I ran an upgrade yesterday from 1.3.2 to 1.4.6
There were no new db changes that required scripting between 1.4.4 to 1.4.6

Run both scripts, then go through the settings area to add any new fields that may exists

Can you please clarify: what are thoose 2 scripts

New member

Posts

Joined
Sun Dec 20, 2009 3:33 am
Location - near to Copenhagen, Denmark

Post by Qphoria » Tue Apr 06, 2010 3:53 am

oh sorry.. I mean the [BETA] Upgrade Script: 1.4.0 to 1.4.3 to go from 1.4.0 to 1.4.x

and the individual scripts at the top of this forum Installation & Upgrade Support.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by HKOCH » Tue Apr 06, 2010 4:16 am

Can somebody please collect these individual scripts so we can follow the same working road :)

I think that this forum does contain a lot of mess of how to perform a working update from 1.3.4 to 1.4.6.

A receipe in steps - and a correct reference to the real scripts after invoking Q-Phorics's nice script

thanks in advance

Henrik

New member

Posts

Joined
Sun Dec 20, 2009 3:33 am
Location - near to Copenhagen, Denmark

Post by Qphoria » Tue Apr 06, 2010 4:28 am

I am working on a better core solution for upgrades.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by HKOCH » Tue Apr 06, 2010 4:43 am

Thank you very much Qphoria - I like your stile

But right now I'm having problems to get it just to do the shipping part (and maybe reply on orders)- and therefore my focus is how to get it working right now.

I see your solution in the future and not helping me right now - of coarse your scipt is important to stop this mess in the future - I appriciate this very much !!

But some illustration - database map or something could help me to get up running 1.4.6

But again - the sad point is that I need some help to be able to find a way thorough from my stand of view right now. It looks that I'm very near to the working version 1.4.6 !!!

So please correct me if I'm wrong.

I did install OC 1.40 using my on DB. Did copy back my config files (from root and admin)

It seemed to be running OK (did not do a complete test but just small tests)

I then installed OC 1.43 and again copied back by config files. I also installed the script form QP and as the first thing did run the script - I looked OK ? (i belive - now again my problems maybe already was here at that time - did not check thorough

As my last step I did to install to OC 1.4.6 again without running anykind of install files from OC

I now had the problem with the admin_langauge_id missing ?

anyway

1.) should this be the correct passable way ?
2.) Do you have to run the install scripts from each version (I did not !)
3.) Which precise scripts is needed to be run after my installation steps ?

thanks
Henrik


Then installed

New member

Posts

Joined
Sun Dec 20, 2009 3:33 am
Location - near to Copenhagen, Denmark

Post by gavin m » Tue Apr 06, 2010 4:41 pm

Qphoria wrote:I ran an upgrade yesterday from 1.3.2 to 1.4.6
There were no new db changes that required scripting between 1.4.4 to 1.4.6

Run both scripts, then go through the settings area to add any new fields that may exists
Was there any changes between 1.4.3 and 1.4.4 as i already have the database sitting at the 1.4.3 point from last time.

I can't see a script for .3 to .4.

If there wasn't changes, I'll deploy the store and see what happens!!

Active Member

Posts

Joined
Thu Jun 04, 2009 3:23 pm

Post by Qphoria » Tue Apr 06, 2010 7:36 pm

nope

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by gavin m » Wed Apr 07, 2010 12:15 am

sweet.

Active Member

Posts

Joined
Thu Jun 04, 2009 3:23 pm

Post by dragon17 » Wed Apr 07, 2010 1:28 am

Hello,

i2Paq closed another topic where I tried to ask to make a clear step-by-step upgrade process from OC 1.4.4 to 1.4.6... the topic has been locked and forwarded me here.

To be honest, here is the chaos and nothing is clear about what to do!

If OC staff release an update, this is of course welcome but then this has to be clear and with detailed instructions, otherwise I dont see any benefit. Just tons of questions everywhere and days to pass on the forum finding for some useful topic solution ...

If someone understand something here and find some clear directions, please advise ....

Thanks for your support.

New member

Posts

Joined
Thu Mar 25, 2010 7:15 pm

Post by allenshea » Wed Apr 07, 2010 10:14 am

Qphoria wrote:I ran an upgrade yesterday from 1.3.2 to 1.4.6
There were no new db changes that required scripting between 1.4.4 to 1.4.6

Run both scripts, then go through the settings area to add any new fields that may exists

hi, Q, thanks for your hard work, but if you have checked carefully on code google, you will find below changes in 1.4.6
http://code.google.com/p/opencart/sourc ... n104&r=104

Code: Select all

-- Table structure for table `oc_order`
--

DROP TABLE IF EXISTS `oc_order`;
CREATE TABLE `oc_order` (
  `order_id` int(11) NOT NULL auto_increment,
  `invoice_id` int(11) NOT NULL default '0',
  `invoice_prefix` varchar(10) collate utf8_bin NOT NULL,
In before versions you can not find db of invoice_id and invoice_prefix,

Also in opencart1.4.6.zip you can find the file of upgrade.txt, it mentioned
1.4.5 > 1.4.6

To Upgrade:

5. Open your DB manager and run this code:

INSERT INTO `opencart_dev`.`oc_setting` (
`setting_id` ,
`group` ,
`key` ,
`value`
)
VALUES (
NULL , 'config', 'config_language', 'en'
);

1.4.4 > 1.4.5

To Upgrade:

5. Open your DB manager and run this code:

ALTER TABLE `oc_store` DROP `stock_status_id`;
ALTER TABLE `oc_customer` ADD `store_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `customer_id`;
ALTER TABLE `oc_order` ADD `invoice_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `order_id`;
ALTER TABLE `oc_order` ADD `invoice_prefix` VARCHAR( 10 ) NOT NULL AFTER `invoice_id`;
If just upgrade with your [BETA] Upgrade Script: 1.4.0 to 1.4.3, we will still have problems with Invoice

Hope you can help us with this.

Thanks.

Allen

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by japanees » Wed Apr 07, 2010 11:12 am

I am also stuck here,

upgrading from 1.4.4 to 1.4.6
There is a lot of different contradicting information.

In the upgrade files attached to the 1.4.6 download is says

Code: Select all

1.4.5 > 1.4.6

To Upgrade:
1. First off backup your entire site.
2. Goto your opencart's store admin and download a backup of your database.
3. Upload and replace the files from the OpenCart 1.4.4 download to your OpenCart 1.4.5 installation.
4. Copy & replace the config files for bolth the root directory and the admin from your old install to your new installation.
5. Open your DB manager and run this code:


INSERT INTO `opencart_dev`.`shop_setting` (
`setting_id` ,
`group` ,
`key` ,
`value` 
)
VALUES (
NULL , 'config', 'config_language', 'en'
);





1.4.4 > 1.4.5

To Upgrade:
1. First off backup your entire site.
2. Goto your opencart's store admin and download a backup of your database.
3. Upload and replace the files from the OpenCart 1.4.4 download to your OpenCart 1.4.5 installation.
4. Copy & replace the config files for bolth the root directory and the admin from your old install to your new installation.
5. Open your DB manager and run this code:

ALTER TABLE `shop_store` DROP `stock_status_id`; 
ALTER TABLE `shop_customer` ADD `store_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `customer_id`;
ALTER TABLE `shop_order` ADD `invoice_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `order_id`;  
ALTER TABLE `shop_order` ADD `invoice_prefix` VARCHAR( 10 ) NOT NULL AFTER `invoice_id`;
So I ran the database changes, upload the files and now get the error in the /admin area "Error: Could not load language !"

New member

Posts

Joined
Sat Mar 20, 2010 12:34 am

Post by Qphoria » Wed Apr 07, 2010 11:22 am

I didn't use any config_language to config_admin_language change.. thats all I know.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by japanees » Wed Apr 07, 2010 11:49 am

Thanks for the reply,

Would it be an idea to write down which steps to take to upgrade 1.4.4 to 1.4.6, I mean rather then pointing to different threads it seems some people are in the same boat as me, we would surely love to upgrade and enjoy such functions as "copy"

New member

Posts

Joined
Sat Mar 20, 2010 12:34 am

Post by Qphoria » Wed Apr 07, 2010 11:57 am

upload files
edit settings and save
done

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by japanees » Wed Apr 07, 2010 12:12 pm

As soon as I start the upload the following message appears in the admin section

Error: Could not load language !

Any ideas how to fix this?

My store front is fine however, just admin www. ja pa n e e s .(NET)

New member

Posts

Joined
Sat Mar 20, 2010 12:34 am

Post by i2Paq » Wed Apr 07, 2010 1:31 pm

japanees wrote:Error: Could not load language !

Any ideas how to fix this?
[HOW To] Upgrade older languages to latest OC release

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands
Who is online

Users browsing this forum: No registered users and 7 guests