Post by Qphoria » Tue Jan 10, 2012 2:44 am

A big thank you to forum member IBBoard for adding Product Option support to the 14x to 1512 upgrade script! Now you can upgrade from 1.4.x to 1.5.1.2 and KEEP YOUR PRODUCT OPTIONS!


YES, THIS SCRIPT WILL KEEP YOUR PRODUCT OPTIONS!
If your store has no product options, the script will still work for you.



About this script
This script is a collection of all the patches and versions of opencart from version 1.4.0 to version 1.5.1.2.
That means you run this script to bring your store's database to 1.5.1.2
If you want to install a version later than 1.5.1.2, that is fine. Just be sure that after you run this script, you run the installer that comes with the latest version of OpenCart. More info on that below...

READ CAREFULLY:
  1. Only use this script if your store is running OpenCart v1.4.x
  2. DO NOT USE THIS SCRIPT TO UPGRADE EXISTING 1.5.x STORES
  3. This script includes a STEP-BY-STEP readme file. Follow it exactly!
  4. This script will work as far back as OpenCart v1.4.0
  5. This script works! There has never been a confirmed error.
  6. If you see warnings or errors, they are false positives. Just ignore them. This script has been run enough times to know that it has no real errors.
  7. Once you are upgraded, post any functionality bugs in the appropriate thread for your version, not here.
Upgrading to versions later than 1.5.1.2
YOU DO NOT NEED TO INSTALL 1.5.1.2 FIRST. YOU CAN GO DIRECTLY TO THE LATEST VERSION
As I said above, this script will bring your database to version 1.5.1.2
If you are installing straight to a later version, like 1.5.1.3, then you simply need to first follow the upgrade step by step guide from this Beta3, installing the latest version of opencart. Then after you complete this script, you can run the installer that comes with 1.5.1.3 or later.

1. Run this Beta3 Script first by following the step-by-step guide that comes with it
2. After following this Beta3 script, follow the upgrade.txt file that comes with the latest version of OpenCart.
3. Done!

What to Expect after upgrading from 1.4.x to 1.5.x
  1. Your theme will be set to the default opencart 1.5.x theme
  2. You will not see any modules or products on the homepage yet, only the header and footer.
    You need to go into the Admin->Extensions->Modules page and add your modules to see products on the front.
  3. Your products, categories, customers, orders will all be safe and viewable in the admin area
  4. If you had any 3rd party modules from 1.4.x installed, you may see errors like "Document::setTitle". That means the module was not updated yet. You should uninstall it from the modules area and get the latest update from the author of the mod
  5. There are new menus in the admin, so be sure to go through them.

Attachments

Last edited by Qphoria on Fri Jan 17, 2014 12:00 am, edited 11 times in total.
Reason: Made Global

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by eka7a » Wed Jan 11, 2012 5:03 am

Thanks Qphoria and IBBoard for upgrade script.


User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by sgdesign » Wed Jan 11, 2012 6:47 am

And I've managed to break something :)

The upgrade went great, all up and running except the options.. I went in to a product, typed in the option I wanted, click add option value and it populates the option value drop down for me. I set the Quantity to 99 subtract stock to no and leave the rest blank.. click save and get this error message:

Code: Select all

Notice: Error: Unknown column 'quantity' in 'field list'
Error No: 1054
INSERT INTO product_option_value SET product_option_value_id = '0', product_option_id = '368', product_id = '262', option_id = '366', option_value_id = '1416', quantity = '99', subtract = '0', price = '0', price_prefix = '+', points = '0', points_prefix = '+', weight = '0', weight_prefix = '+' in /home/dcbeads/public_html/system/database/mysql.php on line 49
Running 1.5.1.3 after an upgrade from 1.4.9.2 (I think)

Other than that I'm just happy to be on the new platform..

Newbie

Posts

Joined
Tue Nov 30, 2010 1:36 am

Post by FnF » Wed Jan 11, 2012 2:54 pm

Oh man how sweet!
This is going to save tons of time, I have several stores I've been putting off upgrading.
Thanks so much IBBoard

User avatar
FnF
Newbie

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by florinsith » Thu Jan 12, 2012 3:14 am

That is amazing , thank you for great work!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Newbie

Posts

Joined
Fri May 14, 2010 2:36 am


User avatar
Newbie

Posts

Joined
Fri Nov 27, 2009 3:40 pm
Location - Bangkok - Thailand

Post by bafaraj » Thu Jan 12, 2012 3:03 pm

Thanks Qphoria for this nice script..

I have a question regarding [beta 2], but since the thread for beta 2 is closed now, I have to ask here..

after I upgrade my store from version 1.4.9.3 to 1.5.1.3 ( Thanks for your script ) , every thing was working fine.
but recently I was trying to generate reports for my sales and found the result if not rights!

I found that all reports are giving me wrong results . So is there any way I can fix this ?

متجر إنـشــاد | نختصر المسافات
http://www.inshadstore.com


Newbie

Posts

Joined
Fri Nov 12, 2010 12:32 am
Location - UAE

Post by Qphoria » Thu Jan 12, 2012 10:23 pm

bafaraj wrote:Thanks Qphoria for this nice script..

I have a question regarding [beta 2], but since the thread for beta 2 is closed now, I have to ask here..

after I upgrade my store from version 1.4.9.3 to 1.5.1.3 ( Thanks for your script ) , every thing was working fine.
but recently I was trying to generate reports for my sales and found the result if not rights!

I found that all reports are giving me wrong results . So is there any way I can fix this ?
Could be that the reporting system is bugged in 1.5.1.3... not really sure. Order data isn't touched during the upgrade process and there weren't any new calculation measures added so all the data should be generated the same way. Really not sure as I haven't noticed an issue. I only really use the sales report and recently upgraded from 1.4.x to 1.5.1.3 but all my sales look the same.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by leopedia » Fri Jan 13, 2012 7:54 am

Hello really thanks for support.

I got this error message when i wad doing upgraded... Please help

OpenCart 1.x Upgrade Script (BETA)

The following errors occured:

Could not execute this query: INSERT INTO `lp_option_value_description` (`option_value_id`, `language_id`, `option_id`, `name`)SELECT `pov`.`product_option_value_id` , `language_id` , `pov`.`product_option_id` , `name`CREATE TABLE IF NOT EXISTS `lp_product_attribute` (`product_id` int(11) NOT NULL,`attribute_id` int(11) NOT NULL,`language_id` int(11) NOT NULL,`text` text COLLATE utf8_bin NOT NULL,PRIMARY KEY (`product_id`,`attribute_id`,`language_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS `lp_product_attribute` (`product_id` int(11) NOT NULL' at line 1

The above errors occurred because the script could not properly determine the existing state of those db elements. Your store may not need those changes. Please post any errors on the forums to ensure that they can be addressed in future versions!

Leopedia Web Solutions
http://www.leopedia.com
http://www.opencart.com/index.php?route ... e=leopedia


Newbie

Posts

Joined
Fri Jan 13, 2012 7:52 am


Post by Qphoria » Sat Jan 14, 2012 12:56 am

Yea I'm seeing these errors too.. Options are still getting partially ported over but because of the way the process works using just sql.. it assumes too much and I'm not really a fan. Now I have many options with values that have no name so I really don't know what should go there.

Maybe IBBoard can help

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat Jan 14, 2012 2:23 am

Ok I see the problems.. The new options code doesn't maintain the db prefix for one of the FROM and JOIN commands so anyone with a prefix should be having problems. Looking into it now.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat Jan 14, 2012 2:33 am

FIXED.

However, people who have already run into the error about
Could not execute this query: INSERT INTO `lp_option_value_description` (`option_value_id`, `lang...
will not be able to re-run the script again because of the way the options stuff works and blows away the old tables. The only chance you have is if you have a backup of the old 14x db, drop all tables in the database and reimport the old data... then run the installer again.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by IBBoard » Sat Jan 14, 2012 10:19 pm

Sorry, I didn't realise you'd gone live with my changes yet - I'd forgotten to make my final updates!

This version should fix the issues with missing columns (which was caused by a conflict between me trying to modify the definition and Qphoria's checks on whether columns needed to be dropped).

Any issues with the product options section, give me a shout (post here). Hopefully I'll get round to writing something to consolidate all of the entries as well at some point! (That is the only limit of the product options part - if you had 200 products with product options then you'll have 200 options assigned on a 1-to-1 basis to products, but IMO that was better than having 200 options and quantities to put back in!)


[edit] But if I missed a database prefix somewhere (whatever Qphoria fixed earlier) then my attached file may still need a minor tweak. I don't use a prefix (which caused other bugs in the pre-options code) so I wouldn't have noticed if I used "tablename" in a query instead of "oc_tablename".

Newbie

Posts

Joined
Sun Sep 12, 2010 3:30 am

Post by FnF » Mon Jan 16, 2012 2:55 am

Ok, Beta3-upgrade-14x-to-15x-YES-OPTv2 worked beautifully compared to the prior version.
All the options were saved under Catalog >>Options, and they simply need to be re-added to the products. Product >> Option. Not a big deal.

If you had several products using the same options in OC1.4x then the script added an instance for each, under Catalog >>Options, so those options become duplicated. Not a problem there either. De-associate the option with it's product and so all but one of the instances can be deleted. Then just go back and and associate the option with it's products.

Here's the problems I had after that. I'm unable to actually go in and associate the options back to the products. The option is there, everything is available, and it all works as it should, BUT upon saving, I get a blank page. I tried several products, and I tried varying several things. Same results each time, blank page.

Here's what the error log shows after this;
Error: Unknown column 'quantity' in 'field list'<br />Error No: 1054<br />INSERT INTO storproduct_option_value SET product_option_value_id = '0', product_option_id = '340', product_id = '72', option_id = '316', option_value_id = '717', quantity = '500', subtract = '0', price = '0', price_prefix = '+', points = '0', points_prefix = '+', weight = '0', weight_prefix = '+' in /home/xxxxx/public_html/store/system/database/mysql.php on line 49

User avatar
FnF
Newbie

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by Qphoria » Mon Jan 16, 2012 7:03 am

Confirmed..
Run this in phpmyadmin:

Code: Select all

ALTER TABLE xx_product_option_value ADD quantity int(4) NOT NULL DEFAULT '1' COMMENT '' AFTER option_value_id;
change "xx_" to your prefix or
remove "xx_" if not using a prefix

I will see about fixing it in the sql.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by FnF » Mon Jan 16, 2012 7:35 am

Worked like a charm.
I thank you kindly sir ;)

User avatar
FnF
Newbie

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by Qphoria » Mon Jan 16, 2012 9:34 am

OK I added IBBoards latest fix as well as a change to it to fix the missing prefix. All latest changes are in the "v3" zip attached to the first post. I don't see anywhere in the sql that would cause the missing quantity column so I'm not sure why that is happening so that may still be the last lingering piece.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by davey c » Tue Jan 17, 2012 6:10 pm

I just tried to run the script on a 1.4.9 site and got the following error:

Error: Unknown column 'store_id' in 'where clause'
Error No: 1054
SELECT * FROM setting WHERE store_id = '0' OR store_id = '0' ORDER BY store_id ASC

Any idea what caused this?

Newbie

Posts

Joined
Fri Aug 07, 2009 10:52 pm

Post by Bredpitt » Tue Jan 17, 2012 11:26 pm

I fucked everythin up really bad..


I took a backup of FTP directory, also took a backup inside the store(backup panel)

I run into the problem: Could not execute this query: INSERT INTO `lp_option_value_description` (`option_value_id`, `lang...

I then tryed to drop the tables back into database but encountered problems there.
Probably because i only got the backup from within the store.

But i managed to fix it...
Last edited by Bredpitt on Wed Jan 18, 2012 4:37 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Sep 17, 2011 11:08 pm

Post by Qphoria » Wed Jan 18, 2012 12:21 am

davey c wrote:I just tried to run the script on a 1.4.9 site and got the following error:

Error: Unknown column 'store_id' in 'where clause'
Error No: 1054
SELECT * FROM setting WHERE store_id = '0' OR store_id = '0' ORDER BY store_id ASC

Any idea what caused this?
Your inability to follow instructions :)

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 17 guests