Forums / Upgrading to 1.5.x / Question about upgrading

Question about upgrading

Views: 1,805

Results 1 to 16 of 16
12 Aug 2013, 2:38 AM
#1
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Question about upgrading

Hi,

We have been planning to upgrade to the latest version. We think the developer might not have done it quite right. Most likely he has copied the existing site to a demo folder and then upgraded it to the latest version. We realised that he should have installed the latest version in the demo folder first and then carried over the customisation. We want to know if we are better off starting in a new demo folder again or trying to fix what he has done?

12 Aug 2013, 11:43 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Question about upgrading

I'd suggest starting over. Most likely the number of file you changed in your cart is small compared to the number of core Zen Cart files which have changed. Start with the latest then bring your customizations over.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Aug 2013, 7:17 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Question about upgrading

Not much really. Just that people get scared because the 2nd one looks daunting. It seems most people just want to click a button and have the upgrade done for them, having been spoiled by Microsoft for too many years.
The 1st is just presented from a different angle, with a few tweaks that I've found make things go more smoothly and minimize risk of lost data.

Read and study both. It's all useful info.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Aug 2013, 11:11 PM
#6
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Hi,

Been trying to import the old database into the new database using phpmyadmin but because the file is very big, it keeps timing out with the message saying connection has reset. Any suggestion?

18 Aug 2013, 11:20 AM
#7
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Have successfully imported the big database using bigdump.

Now working on the two configure.php files (for the demo_shop). Noticed a few changes which I am not sure.

admin/includes/configure.php
define HTTP_CATALOG_SERVER: is this my_domain.com or my_domain.com/demo_shop?
define DIR_WS_ADMIN and DIR_WS_HTTPS_ADMIN: this used to be the admin folder name but what do we put in the latest version since the codes are quite different now?
define DIR_FS_ADMIN: this used to be admin folder path, how do we put in the details in the latest version? It has realpath(dirname(FILE) . '/../') . '/'
define SQL_CACHE_METHOD: this used to be 'database' but do we keep it as 'none' now?
define DIR_FS_SQL_CACHE: is this public_html/cache or public_html/demo_shop/cache

18 Aug 2013, 12:32 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Question about upgrading

waterbender:

admin/includes/configure.php
define HTTP_CATALOG_SERVER: is this my_domain.com or my_domain.com/demo_shop?http://your_domain.com
waterbender:

define DIR_WS_ADMIN and DIR_WS_HTTPS_ADMIN: this used to be the admin folder name but what do we put in the latest version since the codes are quite different now?
define DIR_FS_ADMIN: this used to be admin folder path, how do we put in the details in the latest version? It has realpath(dirname(FILE) . '/../') . '/'Those were changed to allow the file to auto-detect your admin foldername, thus meaning you do NOT need to edit this file when you rename your admin folder.
waterbender:

define SQL_CACHE_METHOD: this used to be 'database' but do we keep it as 'none' now?Either is fine.
waterbender:

define DIR_FS_SQL_CACHE: is this public_html/cache or public_html/demo_shop/cacheIt needs to be the complete server path to your cache folder. So if your store is in a folder named demo_shop then it needs to be set to /var/users/username/public_html/demo_shop/cache
Basically take your DIR_FS_CATALOG value and add /cache to the end.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Aug 2013, 12:55 PM
#9
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Thanks DrByte

So I guess I will leave these intact
define DIR_WS_ADMIN and DIR_WS_HTTPS_ADMIN
define DIR_FS_ADMIN

By the way, regarding define DB_PREFIX, if my existing database uses 'zen_', do I keep using 'zen_' or should I leave it blank?

18 Aug 2013, 1:24 PM
#10
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

I put 'zen_' in the configure.php file. I hope that would be okay. Going through zc_install now

If you wish to change the database table prefixes, enter the new prefix below. NOTE: please verify that the prefix name is not already used in your database, as we do not check for such duplication. Using an already-existing table prefix will corrupt your database.
Enter the NEW Table-Prefix: should I use 'zen_' or blank or new prefix?

18 Aug 2013, 5:08 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Question about upgrading

waterbender:

By the way, regarding define DB_PREFIX, if my existing database uses 'zen_', do I keep using 'zen_' or should I leave it blank?
In order to use the data from another database, you must use the same DB_PREFIX in the new site as you had in the old one.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Aug 2013, 6:23 PM
#12
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Thank you :)

25 Aug 2013, 11:58 AM
#13
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Hi,

When we are happy with the new shop, our next step is to do a backup again of the latest live database live_database2.sql as well as new_database.sql. Then drop the tables in new_database.sql and load live_database2.sql. Then re-run /new_shop/zc_install to upgrade the current data again to include new orders, customers, products etc.

My question is:
Will we lose the third party module changes to database after re-importing live_database2.sql to new_database.sql? If we will, what is the best way to do this so that we don't miss any orders?

25 Aug 2013, 1:44 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Question about upgrading

waterbender:

Hi,

When we are happy with the new shop, our next step is to do a backup again of the latest live database live_database2.sql as well as new_database.sql. Then drop the tables in new_database.sql and load live_database2.sql. Then re-run /new_shop/zc_install to upgrade the current data again to include new orders, customers, products etc.

My question is:
Will we lose the third party module changes to database after re-importing live_database2.sql to new_database.sql? If we will, what is the best way to do this so that we don't miss any orders?

Yes. So make a detailed list of those changes so you can make them again quickly by following a checklist.
You can even do a practice run ahead of time, to be sure you've got a thorough list, and that way your actual down-time for the live site will be minimal ... possibly only a few minutes.

As for going live, I'm a firm believer of using the actual live database for the upgrade ... BUT ONLY AFTER you've first done all the testing you already mentioned. Explained here: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading ... This still has the same issue you mentioned in your last post, but you remove the risk of lost data because you're not dropping anything, and not exporting/importing either. Just safer that way. Of course, having solid backups is important also.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Aug 2013, 5:21 PM
#15
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Question about upgrading

Hi DrByte

Getting a bit confused... Am I right that there are two ways of upgrading?
A. Rebuild everything in a separate folder new_shop. When everything is satisfied, upgrade live site directly based on the changes recorded from the new_shop. This is from this article http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
B. Rebuild everything in a separate folder new_shop. When everything is satisfied, move live site to a separate folder old_shop and change new_shop to live site. This is from this article http://www.zen-cart.com/content.php?148

I am more comfortable with the second method. It might be more tedious but it seems safer and cleaner. So my next questions is that after I drop the tables in the new database and reload the live database a second time, do I simply re-run the install.sql files of 3rd party modules since the files are still in new_shop. Is there anything else to redo or reinstall?

25 Aug 2013, 5:36 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Question about upgrading

waterbender:

So my next questions is that after I drop the tables in the new database and reload the live database a second time, do I simply re-run the install.sql files of 3rd party modules since the files are still in new_shop. Is there anything else to redo or reinstall?
While I can't comment specifically on every change you've made to your site, yes that's the concept. Simply run whatever setup/install process is relevant to the modules/plugins/addons/whatever you've added/changed/upgraded. zc_install takes care of the main core data and structure. And you take care of whatever additional components you've decided to integrate on top of it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.