If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / After upgrading where do my old changes go?

After upgrading where do my old changes go?

Started by froldao on 20 Jan 2012, 6:11 PM · Views: 892

Results 1 to 4 of 4
20 Jan 2012, 6:11 PM
#1
froldao avatar

froldao

New Zenner

Join Date:
Nov 2007
Posts:
40
Plugin Contributions:
0

Post #1 by froldao

I've had a problem and my website was off for a few days.

My ISP runs PHP 5.3.

My ISP people told me that in order to correct the errors they made changes to:

/includes/functions/functions_general.php

and

/admin/includes/functions/general.php

The changes were:

if (!function_exists('date_diff')){
function date_diff($date1, $date2) {
//$date1 today, or any other day
//$date2 date to check against

$d1 = explode("-", $date1);
$y1 = $d1[0];
$m1 = $d1[1];
$d1 = $d1[2];

$d2 = explode("-", $date2);
$y2 = $d2[0];
$m2 = $d2[1];
$d2 = $d2[2];

$date1_set = mktime(0,0,0, $m1, $d1, $y1);
$date2_set = mktime(0,0,0, $m2, $d2, $y2);

return(round(($date2_set-$date1_set)/(606024)));
}
}

Now I can see the webshop and the admin but not products, for instance here: http://atxilipu.com/_zen-cart/index.php?main_page=index&cPath=1&language=en

And now the ISP people are saying that I need to upgrade my Zencart to a higher version, since the actual is not compatible with PHP 5.3.

I'm ok to do that, even thought it is a lot of work and trouble. But my question is, what about all the changes I have made over the years to so many Zencart files? Configurations and so on. How do I get them back?
Any help will be apreciated!

20 Jan 2012, 11:15 PM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

Right. The old v1.3.8a version is not compatible with PHP 5.3 That's why an announcement was made about that in November 2009 right here on the forums. And v1.3.9 was released in May 2010 so that people could continue using their stores even if their hosting companies upgraded the servers to the newer PHP version.

You basically need to rebuild your customizations in the new version. As far as templates not a lot has changed, so rebuilding your template should be simple. And any addons you've applied are probably also upgraded with newer versions you can apply. And any customizations/alterations you've done beyond that can be very quickly identified by using a tool like WinMerge to expose them to you so you can replicate whichever of those changes you still need in the new version.

The upgrade instructions are laid out here: https://www.zen-cart.com/upgrade

The store's data (sales, products, customers, orders, etc) are all retained if you follow the instructions.

.
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.

20 Jan 2012, 11:20 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Post #3 by gjh42

If you have saved your modified files in template override folders wherever possible, and kept a record of all changes otherwise, you can compare those to the changelog for v1.5.0 to see what files you need to merge your customizations in. Complete file/folder compares using Winmerge will show you all of the differences - you should compare a clean set of your current ZC version with your actual site files; the clean current version fileset with the v1.5.0 fileset (the 1.5.0 changelog may not show all changes from v1.3.8a); and your site files with the v1.5.0 fileset. Take lots of notes, with specific line numbers and reminders about what is different between files. If you can open those three comparisons in different tabs at the same time, it will make the work easier.

And if you can just reinstall (updated versions of) your current mods in the new ZC version, it will eliminate a lot of the work.

The function changes you posted are covered in v1.5.0, which uses zen_date_diff() instead of date_diff(). The same probably goes for a number of other changes you have made.

Admin configurations will generally carry over when you import and upgrade your old database so no information is lost.

24 Jan 2012, 11:19 AM
#4
froldao avatar

froldao

New Zenner

Join Date:
Nov 2007
Posts:
40
Plugin Contributions:
0

Post #4 by froldao

Thanks for all the input. It seems like a lot of work, but I guess I have no alternative but to do it. I'll return here if I don't succeed. Thanks again.