Upgrading Heavily Customized Sites to Newer Versions of AC

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Upgrading Heavily Customized Sites to Newer Versions of AC

Post by sohaib » Thu Mar 12, 2009 12:02 pm

Updating heavily customized sites to the latest versions of AbleCommerce could be challenging. You want to preserve your customizations but you also want to make use of the latest updates in the new version.

Using version control systems the process can be made easier.
Here I am proposing a solution using Subversion.

(Lets assume you are at 7.0.0 and you want to upgrade to 7.0.2. )

- Setup Subversion on your local system. The quickest way to get started on windows is to install VisualSVN server
http://www.visualsvn.com/server/

- Setup a Subversion client that you can use for performing various operations. Recommended is TortoiseSVN. http://tortoisesvn.net/downloads

- Create a repository in SVN to be used as workspace.

- In the main trunk of the repository, add the original un-modified 7.0.0 store from where you started the customizations. Commit this to SVN.

- Create a new branch from the main trunk and name it 7.0.2. At this time you will have 7.0.0 files in the new branch. Now copy and paste all files from latest version 7.0.2 to this branch, replacing/updating all the files. Commit the changes to the new branch. Say the changes are committed at revision number X.

- In the main trunk, which is still at 7.0.0, update/replace all files using your updated customized store. Do not commit these changes.

- Now use merge feature of SVN and merge revision number X from 7.0.2 branch to main trunk. All files that need to be updated will be automatically be updated in your local workspace of main trunk. All files that will have any conflicts will be notified to you. You could simply go through each of the conflict and resolve it after checking the changes that you made vs the changes that were made in 7.0.2 update. If you use TortoiseSVN and WinMerge you could do all the conflict resolution visually.

- Once all the conflicts are resolved you can try to compile your website to verify the changes. If you get any compilation errors, fix them.

- Once all errors are fixed you are at 7.0.2. Do some testing before updating the live site. You may have made some mistakes in merging and conflict resolution.


The above instructions will be easy to follow for those who are used to version control systems especially Subversion. If you are new to version control systems, you can get started today. Download and install subversion and read the getting started book that comes with the download.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by jmestep » Sat Mar 14, 2009 7:54 am

Thank you for posting it. I had looked at Subversion before, but didn't have time to figure it out. Can you post some screenshots of what you are referring to above? For example, I can't find a command to commit and I'm not sure I've got my folder structure correct.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by mazhar » Mon Mar 16, 2009 8:21 am

First you need to create repository and then setup your branches in it and finally importing projects into their respective branches. Read the Repository Creation and Daily Use Guide sections in help of SVN's local install.

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by Robbie@FireFold » Tue Mar 17, 2009 7:33 am

Thanks for the post! This will hopefully help FireFold in our current situation. We have heavy heavy modded and must make the leap to 7.0.2 for the Google Check out fix.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by sohaib » Wed Mar 18, 2009 8:47 am

jmestep wrote:Thank you for posting it. I had looked at Subversion before, but didn't have time to figure it out. Can you post some screenshots of what you are referring to above? For example, I can't find a command to commit and I'm not sure I've got my folder structure correct.
I will hopefully post a detailed message with screen-shots soon.

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by Robbie@FireFold » Wed Mar 18, 2009 9:18 am

sohaib wrote:
jmestep wrote:Thank you for posting it. I had looked at Subversion before, but didn't have time to figure it out. Can you post some screenshots of what you are referring to above? For example, I can't find a command to commit and I'm not sure I've got my folder structure correct.
I will hopefully post a detailed message with screen-shots soon.
This would be great... as we got lost in step 1!
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by jmestep » Wed Mar 18, 2009 10:23 am

Great, I'm not the only one! I've read the docs in Subversion and Tortoise and haven't been able to nail the procedure down completely.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by Robbie@FireFold » Thu Mar 19, 2009 1:41 pm

jmestep wrote:Great, I'm not the only one! I've read the docs in Subversion and Tortoise and haven't been able to nail the procedure down completely.
Yeah they are -well- documented. Information overload for us.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by sohaib » Sat Mar 21, 2009 5:50 am

Assuming that you have downloaded and installed VisualSVN Server and TortoiseSVN Client.

Here are screen-shots of the process that you are likely to follow.

1. Create a new SVN Repository in VisualSVN Server
0-visualsvn-create-repository.PNG
1-visualsvn-create-repository_1.PNG
2-visualsvn-AC7-repository.PNG
2. Copy the URL for repository trunk
3-visualsvn-AC7-repository_trunk.PNG
3. Checkout trunk to a working directory
Create a new directory in a workspace. Right Click on the directory and proceed as shown. You will see the SVN related menu items if you have installed TortoiseSVN.
4-TortoiseSVN-checkout.PNG
Paste the URL copied in step 2 to the URL for repository field.
5-TortoiseSVN-checkout_1.PNG
Checkout completed. You will see success messages like this in steps we do later. But screen-shots for those messages will be omitted.
6-TortoiseSVN-checkout_2.PNG
4. Add the original un-modified version 7.0 files to the directory. Select them all and add them to SVN as shown
7-TortoiseSVN-Add.PNG
5. Commit the files to SVN
8-TortoiseSVN-Commit.PNG
6. Create a branch for 7.0.2
9-TortoiseSVN-Branch.PNG
10-TortoiseSVN-Branch_1.PNG
7. Checkout the new branch to a new directory AC7.0.2
11-TortoiseSVN-Checkout_72.PNG
12-TortoiseSVN-Checkout_72_b.PNG
8. Update All the files in the new branch with files from latest 7.0.2 version from AC
You can replace/update all existing files.
13-Update_with_72_files.PNG
9. Commit 7.0.2 updates to SVN
14-Commit_72_updates.PNG
Make sure to chose all files to commit to SVN. There will be some new files. If you don't chose all files option the new files may not get included.
15-Commit_72_select_all.PNG
10. In AC7.0 main trunk update all the files with the files form your customized store.
Get everything updated to your customized version.
16-Make_Customizations.PNG
11. Merge the changes from 7.0.2 branch to trunk
17-TortoiseSVN_merge.PNG
18-TortoiseSVN_merge_1.PNG
19-TortoiseSVN_merge_2.PNG
20-TortoiseSVN_merge_3.PNG
When you merge, new files will be added, some files will be automatically merged and some will be in conflict.
21-TortoiseSVN_merge_4.PNG
Resolve conflicts manually.
22-TortoiseSVN_merge_5.PNG
23-TortoiseSVN_merge_6.PNG
Once all conflicts are resolved, your trunk is your store updated to 7.0.2 version.

Conflict resolution can be a painstaking process. Also some of the files merged automatically may not be valid. You will have to verify the changes by at least looking at what has changed. After the merge you should try to compile the website files and remove any compilation errors. You may also have to remove some other errors that you may detect by testing your application.

User avatar
batmike
Commander (CMDR)
Commander (CMDR)
Posts: 123
Joined: Tue Sep 04, 2007 10:46 am
Location: Minneapolis, MN
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by batmike » Wed Jun 03, 2009 1:23 pm

I came across this not too long ago and found it to be very helpful when upgrading to 7.0.3. In the end, the only trouble I ran into was with my SQL Express 2008 Database. This certainly helped me keep all my customizations in place with a lot less work than the beta upgrades and the 7.0.2 upgrade.

Thanks, Sohaib!


Mike

User avatar
WylieE
Captain (CAPT)
Captain (CAPT)
Posts: 281
Joined: Tue Mar 25, 2008 8:26 am
Location: Puyallup, WA
Contact:

Re: Upgrading Heavily Customized Sites to Newer Versions of AC

Post by WylieE » Thu Jul 02, 2009 12:45 pm

I've been attempting to get subversion working on our development server off and on for a few weeks now and continue to have subversion crashing on me after about 45 minutes of trying to commit the trunk files. Does it normally take so long to commit and entire site?

We've been using Beyond Compare to map out all of our customizations. (FYI.)

One thing I do not see addressed here are db updates. Apparently the 7.0.3 upgrade also makes several table changes. Where would running the installer script fall in the process as described above? Do you install your customizations and *then* run the installer? What about data encryption? Are any changes necessary there?

Thanks,
Eric Wylie
Warmoth Guitar Products, Inc.
http://www.warmoth.com

Post Reply