Zen Cart Logo
Forums / Upgrading from 1.2 to 1.3.x / Upgrading from v1.1

Upgrading from v1.1

Views: 17,677

Results 1 to 18 of 18
06 May 2014, 13:29
#1
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Upgrading from v1.1

I have an old website running Zen Cart 1.1 I'm trying to upgrade. I tried going to 1.5 but do not have an upgrade button on the zc_install page. It has the message

Previous Zen Cart® Installation Found
Database appears to be Zen Cart® v1.1.4

Should I first upgrade to 1.2, then 1.3 and then 1.5?

06 May 2014, 14:02
#2
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Upgrading from v1.1

urgentprog:

I have an old website running Zen Cart 1.1 I'm trying to upgrade. I tried going to 1.5 but do not have an upgrade button on the zc_install page. It has the message

Previous Zen Cart® Installation Found
Database appears to be Zen Cart® v1.1.4

Should I first upgrade to 1.2, then 1.3 and then 1.5?

How many changes have you made to your site from the original file set? Personally I'd seriously consider a full rebuild.

06 May 2014, 16:30
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrading from v1.1

You can rebuild your site on the v1.5.1 fileset while importing (and upgrading) your existing database so you keep all customer and product information. With such an old version, any alterations you had are likely not directly applicable to modern versions of the relevant files anyway. There have been fundamental changes to the way the template system works in the last 10 years. Also, a 10 year old site probably looks 10 years old and out of date, making a redesign advisable.

07 May 2014, 12:05
#4
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

picandnix:

How many changes have you made to your site from the original file set? Personally I'd seriously consider a full rebuild.

If I can import my order history and product catalog into the database, it will be a success. I can update the HTML files.

I exported the zen_orders table from 1.1 in phpmyadmin, and imported it into 1.5 and got this error:

Unknown column 'delivery_telephone' in 'field list'

I saw a plugin for importing products from an excel sheet, but did not see one for the orders.

07 May 2014, 13:31
#5
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Upgrading from v1.1

you are not going to be able to do this on a table by table basis. You will be missing loads of information. The actual orders are in zen_orders and there is another file called zen_order_details that contain the line items. The customer tables would be needed as well and that is in multiple tables as well.

07 May 2014, 14:52
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrading from v1.1

Did you see the tutorial on upgrading?
http://www.zen-cart.com/content.php?140-how-do-i-upgrade-my-site
There are other articles which explain more details.
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
What you would best do for such a steep upgrade is just install v1.5.1 in a subfolder with its own database, then "drop" the tables in that database and "import" the backup copy you made of the old db. Then zc_install should give you the "upgrade" option as it will detect the old db version. This keeps all of your old information and properly brings it in line with the new structure. Then you can work on redoing the template to look as you want.

07 May 2014, 17:33
#7
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

gjh42:

Did you see the tutorial on upgrading?
http://www.zen-cart.com/content.php?140-how-do-i-upgrade-my-site
There are other articles which explain more details.
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
What you would best do for such a steep upgrade is just install v1.5.1 in a subfolder with its own database, then "drop" the tables in that database and "import" the backup copy you made of the old db. Then zc_install should give you the "upgrade" option as it will detect the old db version. This keeps all of your old information and properly brings it in line with the new structure. Then you can work on redoing the template to look as you want.

When I drop 1.5 tables, and import 1.1 tables I get a white page saying zen_admin_activity_log table does not exist.

I ran the create table command from my 1.5 backup. The error went away and the zen cart install page showed but it does not have the DB Upgrade option, just Install, Upgrade Config Files and Recheck.

It says this same message, so it's connecting to the db.

Previous Zen Cart® Installation Found
Database appears to be Zen Cart® v1.1.4

I've also tried importing the 1.1 data without dropping the 1.5 files. I got the DB Upgrade option then, but the versions only went back to 1.2.7. What I'm going to try next is finding a prior version of zen-cart, see if I can get the DB up to 1.2.7, and then try the 1.5 upgrade.

07 May 2014, 19:57
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrading from v1.1

To upgrade your database, first upload the /includes and /zc_install folders for v1.3.9h ... then run zc_install to do the database upgrade to 1.3.9h

Then repeat for v1.5.1 to upgrade the rest of the way.

That will preserve your data.

Then build your new site's template in 1.5.1 to suit your present-day needs.

08 May 2014, 13:38
#9
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

I used 1.3.9h but still do not have the database upgrade option in zc_install.

I doubled check. After not getting the option I reinstalled 1.3.9h database and looked in admin server info:

Zen Cart 1.3.9h
Database Patch Level: 1.3.9h
v1.3.9h [2014-05-08 06:26:24] (Fresh Installation)
v1.3.9h [2014-05-08 06:26:24] (Fresh Installation)

After that, I dropped 1.3.9 tables, exported database from live site, imported to 1.3.9 but still get this message in zc_install without any db upgrade option:

Previous Zen Cart™ Installation Found
Database appears to be Zen Cart™ v1.1.4

In my live site the zen_email_archive table is very large, about 2.2 GB. I dump data for all tables except for this one, which creates structure only.

Should I try a lower zencart version, less than 1.2.7 ?

08 May 2014, 17:06
#10
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Upgrading from v1.1

urgentprog:

I used 1.3.9h but still do not have the database upgrade option in zc_install. ...
Zen Cart 1.3.9 will not be default allow an upgrade from before Zen Cart 1.2.0.

You can try upgrading the database from Zen Cart 1.1.4 to 1.2.7 first...

  • Run under PHP 5.2 (or disable error reporting of deprecated messages under PHP 5.3/5.4).
  • May need to remove " TYPE=MyISAM" from the SQL upgrade files and some other files in the "zc_install" folder.
  • May need to copy "/includes/dist-configure.php" to "/includes/configure.php" and edit to match your server configuration.

Then upgrading the database from Zen Cart 1.2.7 to 1.3.9h...

  • Run under PHP 5.2 (or disable error reporting of deprecated messages under PHP 5.3/5.4).
  • May need to remove " TYPE=MyISAM" from the SQL upgrade files and some other files in the "zc_install" folder.
  • May need to copy "/includes/dist-configure.php" to "/includes/configure.php" and edit to match your server configuration.
  • May need to change the DB_CHARSET (rare) in "/zc_install/includes/installer_params.php".

Then finally upgrade the database from Zen Cart 1.3.9h to 1.5.1...

Note: Pay close attention to any "warnings / ignored" lines which contain "CHECK PREFIXES". These could indicate something went wrong during the "database upgrade". If you see one of these, additional hand updates to the database may be required...

08 May 2014, 17:16
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrading from v1.1

lhungil is right. I was wrong. You need to upgrade to the latest 1.2.x first, then the latest 1.3.x, and then the latest 1.5.x

If it is not presenting you the option for "Database Upgrade", then you've probably got a different DB_PREFIX set in your old site configure.php vs your new site's configure.php, thus it can't find the required table names.

12 May 2014, 16:58
#12
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

I used 1.2.7 and got the upgrade option but now getting this error on a white page:

1062 Duplicate entry '1-1' for key 'PRIMARY'

These are the options selected:

Upgrade DB from 1.1.4 to 1.1.4-patch1
Upgrade DB from 1.1.4-x to 1.2.0
Upgrade DB from 1.2.0 to 1.2.1
Upgrade DB from 1.2.1 to 1.2.2
Upgrade DB from 1.2.2 to 1.2.3
Upgrade DB from 1.2.3 to 1.2.4
Upgrade DB from 1.2.4 to 1.2.5
Upgrade DB from 1.2.5 to 1.2.6
Upgrade DB from 1.2.6 to 1.2.7

I tried on Ubuntu 8 running PHP 5.2 and also PHP 5.3 with a new zc_install folder I received by lhungil via PM (ty)

I tried unchecking different versions but got a different error that mysql install file does not exist or paypal table does not exist.

Also I used a database import from the live site each time. I imported every table except email_archive because it's over 2 GB.

13 May 2014, 03:30
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrading from v1.1

There are 90+ tables in the database, and the error you posted doesn't have enough detail to help you determine what INSERT query is triggering a duplicate-record situation.

Add the error-logging tool here: http://www.zen-cart.com/downloads.php?do=file&id=606
and use it as described here: http://www.zen-cart.com/content.php?124-blank-page
Then in the logs it creates you can find out what query is being used by what part of the code so you can fix the problem in your database.

13 May 2014, 12:20
#14
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

I couldn't get the debugger to output new errors.

What I did was go through "mysql_upgrade_zencart_114_to_120.sql" and looked at the INSERT statements. I emptied the tables for each insert which could cause the duplicate PK. I ended up emptying all these tables:

TRUNCATE zen_paypal_ipn_address_status;
TRUNCATE zen_paypal_ipn_payment_status;
TRUNCATE zen_paypal_ipn_payment_type;
TRUNCATE zen_paypal_ipn_mc_currency;
TRUNCATE zen_paypal_ipn_pending_reason;
TRUNCATE zen_paypal_ipn_reason_code;
TRUNCATE zen_paypal_ipn_txn_type;
TRUNCATE zen_product_types;
TRUNCATE zen_project_version;
TRUNCATE zen_query_builder;
TRUNCATE zen_configuration;
TRUNCATE zen_layout_boxes;
TRUNCATE zen_product_type_layout;
TRUNCATE zen_configuration_group;

and the db upgrade was able to run up to 1.2.7. I'm going to try the 1.3.9 next.

13 May 2014, 16:38
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrading from v1.1

urgentprog:

TRUNCATE zen_product_types;
TRUNCATE zen_project_version;
TRUNCATE zen_query_builder;
TRUNCATE zen_configuration;
TRUNCATE zen_layout_boxes;
TRUNCATE zen_product_type_layout;
TRUNCATE zen_configuration_group;
Bad idea on emptying those critical tables.

14 May 2014, 03:06
#16
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

DrByte:

Bad idea on emptying those critical tables.

Perhaps an earlier db upgrade attempt was made on this site?

I am now upgraded to 1.5.1 successfully. Thank you all for your help.

I did it once before but got a white screen on admin login.

I went back and commented out the insert statements which created primary key conflicts in the tables you highlighted.

I got the same error, but now was getting the error logs showing up in cache. It was about a missing japanese language pack. I uploaded that and now it's working.

Also, during the db upgrade when I encountered a mysql error, I dumped the database and re-imported, instead of trying to fix the primary key conflicts and continuing. I also got some errors because TYPE=MyISAM was used. The files I got from PM had these changed to ENGINE=MyISAM.

Thanks again for all your help.

19 May 2014, 14:00
#17
urgentprog avatar

urgentprog

New Zenner

Join Date:
Jun 2011
Posts:
32
Plugin Contributions:
0

Re: Upgrading from v1.1

Is there anything in the database import and upgrade process which may interfere with the display of Japanese characters?

I am getting special characters on my new site which should be Japanese. I checked everywhere I could, includes/configure.php, languages/japanese.php with mb_language, mb_internal_encoding, mb_http_output functions and CHARSET constant, and mysql table and database collation,

When I exported and imported from phpmyadmin, I just exported the tables and data. Will attempting the database upgrade with full database definition export get me anywhere? Or is there another place in zen cart I should check, like other files I still need to upload from old site?

When I uploaded my modules files I kept the newer versions if there was a name conflict.

19 May 2014, 16:35
#18
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Upgrading from v1.1

urgentprog:

Is there anything in the database import and upgrade process which may interfere with the display of Japanese characters? ...
When you do the database upgrade one will probably need to specify "latin1" or "iso 8859-1" as the database character set (character data will probably be stored using these, as older versions typically used these character sets / encodings). Also see the article from iso-8859-1 to utf8.

After upgrading the database to the latest version one can choose to convert all of the language files (including html_define files), database storage, and character data in the database to UTF-8 and set the store to use UTF-8. I probably would if the old store was not using UTF8 and needed support for multiple languages (not supported natively by the previously used character set). One may need to handle the data for each file / database row differently depending upon language...

urgentprog:

... When I uploaded my modules files I kept the newer versions if there was a name conflict.
With an upgrade from such an old version, it is probably best to start with a nice clean fileset from the latest version (after updating the database using the clean filesets). This will avoid lots of headaches. Then add customizations such as a new template, updated language files, etc.

NOTE: The database "upgrade" should only be run against the database once (when successful). Running it multiple times may have undesired side effects.