Upgrading the Storefront

Since Znode Storefront is fully customizable, upgrading from one version to the next will require updates to the database schema and source code. Here we will outline just one strategy that you can use to do the upgrade your application.

Basic Concepts

Znode does not support automatic upgrades for storefronts that have been customized or changed by the client.
You can upgrade your storefront code-base by using a merge utility such as Beyond Compare or WinMerge
You can upgrade your storefront database by using data compare utilities from Red Gate Software. Since version 5.0, Znode provides scripts for upgrading the database schema from one version to the next. These scripts should be considered just the starting point of your migration. Some reference tables may need to be updated according to your particular application.
We do not recommend that you upgrade your storefront code simply to get bug fixes. Znode provides patch files for fixing bugs that pose a much lower risk to an existing production web site than a full upgrade.

Step 1: Back Up your Database and Source Code

This is the most important step. Znode is not responsible for any loss of data or code. When backing up your database we suggest using the Backup function that is built into the SQL Server Management studio rather than copying the database MDF files.

Step 2: Upgrade the Database

Use the scripts provided by Znode in the Maintenance directory to upgrade your database. You may need to apply several scripts, one for each version number between your current version and the version you want to upgrade to. Alternatively you can use a tools from Red Gate Software. This will give you finer control over what is upgraded.

Step 3: Separate out Your Code Changes

You can use a tool like WinMerge to create a zip file containing only the changes you have made to the storefront. Let's assume in this example that we will be upgrading the code from Version 5.0.0 to Version 5.2.1.

 

Create a fresh install of Znode Storefront from the version you based your current code on. In our example you will use the MSI installer to create a clean Version 5.0.0 installation on your development system.
If you applied any Znode supplied patches to your current web site then also apply them to the clean v5.0.0 installation as well.
Use WinMerge to compare your current web site source code with the v5.0.0 clean install. For this example make your current web site the first directory to compare and the clean v5.0.0 directory as the second to compare. This will show your code on the left pane and the clean v5.0.0 install in the right pane.
In general you will want to filter out any files that do not have the aspx, ascx, asax, master or cs file extension. You can also right click on any files that you know should not be migrated and choose "Hide Items". You should be left with only the files that you have changed.
From the Edit menu in WinMerge choose "Select All".
Right click on the selected files and choose the "Zip" menu and then select "Left". This will package up only the files that you have changed into a Zip file with their directory structure intact.

Step 4: Create a New Web Site

Now it is time to create a new web site based on the latest version of the code.

 

Use the MSIs from the latest version of the code to create a clean installation on your local development system.
Start up the demo store on your new installation to be sure that it is working correctly.
Restore your upgraded database from Step 2 over your new development database and test the storefront again. This will confirm that your database upgrade is correct.

Step 5: Merge in Your Code Changes

Now that you have the latest storefront working with your data, it is time to move over any specific template or code changes that you have made.

 

Unzip the file that you created in Step 3 to an empty directory.
Use WinMerge to compare this new directory with the upgraded development directory created in Step 4. For this example select your Zip file directory first and your v5.2.1 directory second.
In WinMerge go to the "View" menu and make sure that everything is unchecked in the first section except "Show Different Items" and "Show Left Unique Items". This will display only the files that need to be merged which should be a small subset of the total files in the project.
Double click on each line item to see what the differences are. You may need to merge the files but in many case you may just be able to copy your version of the file to the v5.2.1 directory.
Once you merge these changes in your should be ready to test your upgraded storefront.

 


See Also:

Guidelines for Customization