Post by Qphoria » Mon Jun 13, 2011 12:39 pm

UPDATED VERSION OF THE SCRIPT HERE:
http://forum.opencart.com/viewtopic.php?f=2&t=36519


ATTENTION! CURRENTLY, THIS SCRIPT WILL UPGRADE STORES THAT DO NOT USE OPTIONS OR THAT DO NOT CARE ABOUT THE FEW OPTIONS THEY HAVE. THE SCRIPT WILL RETAIN ALL YOUR EXISTING DATABASE DATA FOR CATEGORIES, PRODUCT, CUSTOMERS, ORDERS, ETC.

HOWEVER, IT WILL BLOW AWAY ANY EXISTING PRODUCT OPTIONS!

DO NOT USE THIS SCRIPT IF YOU HAVE A LOT OF PRODUCT OPTIONS AND NEED TO HAVE THEM CONVERTED TO THE NEW SYSTEM. I AM STILL WORKING ON A VERSION THAT CONVERTS THE OPTIONS. BE PATIENT AS IT IS NOT EASY!

AGAIN, THIS SCRIPT IS MEANT FOR 1.4.x STORES THAT HAVE NO OPTIONS OR DON'T CARE ABOUT THEIR EXISTING OPTIONS! PREVIOUS ORDERS WITH PRODUCTS THAT HAVE OPTIONS WILL JUST APPEAR LIKE PRODUCTS WITH NO OPTIONS, BUT THE ORDER TOTALS WILL NOT BE AFFECTED.

If you get an error that looks like this:

Code: Select all

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/udimore/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77
IGNORE IT. THIS IS SOME WEIRD MYSQL VERSIONING.

If you get an error that looks like this:

Code: Select all

Could not execute this query: DELETE FROM ocextension WHERE `type` = 'module' AND `key` = 'currency'; Unknown column 'key' in 'where clause'
IGNORE IT. THIS JUST MEANS YOU ALREADY RAN THE SCRIPT ONCE.

About this script:
================
The purpose of this script is to allow you to convert your 1.4.x store to 1.5.x without losing database data (orders, products, customers, stores, categories, etc.
  • This is a script that I've tested a handful of times using a 1.4.9.5 default store and upgrading to 1.5.0.3. I've not tested this with 1.5.0.4 but do not think there were any db changes for 1.5.0.4 so it should work just fine.
  • This script uses the same upgrade basis as the last few versions, so it should allow converting from ANY 1.3.x version to 1.5.0.x. That means if you have 1.3.2 or 1.4.0 or 1.4.4 or 1.4.8 or 1.4.9, etc... you SHOULD be able to convert to 1.5.0
  • The usual rules of upgrading still apply, and with even more of an impact of course. 3rd party mods will need to be updated, themes will be reset to default, and in this case, all of your module positions will be reset as the module system has changed.
  • This package comes with 3 files
    1.4.x-to-1.5.x-upgrade-steps.txt
    READ THIS FILE! You must use this file and read it carefully step by step to perform the upgrade!

    upgrade-14x-to-15x.no-opt.php
    Call this script in your browser like:

    Code: Select all

    http://mystore.com/install/upgrade-14x-to-15x.no-opt.php
    upgrade-14x-to-15x.no-opt.sql
    This file is called by the script. DO NOT TRY TO RUN THIS FILE MANUALLY IN PHPMYADMIN!!
THIS IS A BETA! BE SURE YOU BACKUP AND USE THIS ON A TEST COPY OF YOUR STORE BEFORE TRYING IT ON A LIVE STORE!

POST ANY ISSUES IN THIS THREAD
RUNNING THE SCRIPT MORE THAN ONCE WILL LIKELY RESULT IN A LOT OF ERRORS, NOT NECESSARILY IMPORTANT AS MOST OF THEM SHOULD BE WARNINGS THAT TABLES AND COLUMNS NO LONGER EXIST AFTER THE CHANGE.[/s]

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Mon Jun 13, 2011 2:23 pm

:crazy: I just upgraded my store and all my options are gone what's going on? :laugh: ;) :P

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by eline » Mon Jun 13, 2011 2:36 pm

ROTFL :) :P
Any way - great job. This will by most downloaded addon when is ready ;). May by this annoying users should pay a little for yours efforts and stress :P Just like for a beer or ice cream.

Polskie forum OpenCart: http://forum.opencart.com/viewforum.php?f=164


New member

Posts

Joined
Tue Oct 06, 2009 10:52 pm

Post by emq » Mon Jun 13, 2011 6:54 pm

Qphoria <3 thank you very much, I've waited for this early version as I don't use options at all, so I'm gonna test it today for sure, big thanks again!

emq
Newbie

Posts

Joined
Tue Jan 04, 2011 6:42 pm

Post by reynierpm » Mon Jun 13, 2011 8:42 pm

Hi Q, I have some questions regarding the Beta Upgrade Script.
1) This script migrate the data too or just the structure?
2) I have made some changes to OC default database in order to add some new modules which I'm planning to use in near development. Where in the upgrade script I need to write this changes for migrate this tables and data too?

Cheers and great job

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by reynierpm » Mon Jun 13, 2011 9:04 pm

Ok I figure out how to add the new tables and works perfectly I mean the script runs succesfully but this errors show up:
( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Webserver\htdocs\libroria1\install\upgrade-14x-to-15x.no-opt.php on line 86
Cheers

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Mon Jun 13, 2011 11:52 pm

Xsecrets wrote::crazy: I just upgraded my store and all my options are gone what's going on? :laugh: ;) :P
Sorry, thought I mentioned somewhere that the options would be gone. I guess I forgot :joker: :joker: :joker:

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Mon Jun 13, 2011 11:52 pm

reynierpm wrote:Ok I figure out how to add the new tables and works perfectly I mean the script runs succesfully but this errors show up:
( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Webserver\htdocs\libroria1\install\upgrade-14x-to-15x.no-opt.php on line 86
Cheers
Ok regardless of the error, does it look like your store upgraded?

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by reynierpm » Mon Jun 13, 2011 11:58 pm

Aparently yes it does but I have not chance to test all the data I have there around 1000 products and customers and so on I let you know

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Tue Jun 14, 2011 1:43 am

You only need to test 1 product, 1 category, 1 order, 1 customer. In a unified scenario like this, as long as one exists, they all exist.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Tue Jun 14, 2011 3:22 am

This a great Q, thank you for your hard work.

I just made a small donation and I hope that by the time I need this script it will be completed.

Thanks again! :)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by opencartArab » Tue Jun 14, 2011 4:59 am

Qphoria wrote:
reynierpm wrote:Ok I figure out how to add the new tables and works perfectly I mean the script runs succesfully but this errors show up:
( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\Webserver\htdocs\libroria1\install\upgrade-14x-to-15x.no-opt.php on line 86
Cheers
Ok regardless of the error, does it look like your store upgraded?

i have same Warning, and upgraded. :joker:

http://www.opencartarab.com/demo

from 1.4.9.5 to 1.5.0.4

https://www.opencartarab.com
التعليمات باللغة العربية موجودة على الرابط التالي
https://www.opencartarab.com/docs


Expert Member

Posts

Joined
Thu Apr 01, 2010 3:31 am

Post by Orvoo » Tue Jun 14, 2011 5:00 am

Hey I just updated but its not showing much please check out http://www.orvoo.com could you tell me if you know whats wrong please :)

Newbie

Posts

Joined
Tue Jun 14, 2011 4:58 am

Post by oz457 » Tue Jun 14, 2011 5:16 am

Hello,

When doing exactly as mentioned. I think it might have to do with the '-' sign in the web site address?
I get the following error messages when doing the upgrade

OpenCart 1.x Upgrade Script (BETA)

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /export/websites/le-parfumeur/shop/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /export/websites/le-parfumeur/shop/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /export/websites/le-parfumeur/shop/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /export/websites/le-parfumeur/shop/install/upgrade-14x-to-15x.no-opt.php on line 77
SUCCESS!!! Click here to goto your store
OpenCart.com


This is now on my test web site. The page does not display correctly and get the following errors on the home page:
Notice: Use of undefined constant HTTP_SERVER - assumed 'HTTP_SERVER' in /export/websites/le-parfumeur/shop/index.php on line 62

Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /export/websites/le-parfumeur/shop/index.php on line 63
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/index.php on line 171Warning: Cannot modify header information - headers already sent by (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/system/library/currency.php on line 45Notice: Use of undefined constant HTTP_IMAGE - assumed 'HTTP_IMAGE' in /export/websites/le-parfumeur/shop/catalog/controller/common/header.php on line 26

When clicking on one of the links on the home page, it sends me to:
http://www.le-parfumeur.com/shop/HTTP_S ... ommon/home

For those trying to view the above URL, the website will work, but this is not the test environment.




Kind regards.

New member

Posts

Joined
Wed Oct 28, 2009 5:33 am

Post by zhalla » Tue Jun 14, 2011 6:19 am

Hi,

Similar problems here, upgraded from 1.4.9.5:

Code: Select all

OpenCart 1.x Upgrade Script (BETA)


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 74

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/elitekey/public_html/install/upgrade-14x-to-15x.no-opt.php on line 77
The following errors occured:

Could not execute this query: DELETE FROM extension WHERE `type` = 'module' AND `key` = 'currency'; Unknown column 'key' in 'where clause'

Could not execute this query: ALTER TABLE coupon_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin; Table 'elitekey_db.coupon_description' doesn't exist

Could not execute this query: ALTER TABLE product_option_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin; Table 'elitekey_db.product_option_description' doesn't exist

Could not execute this query: ALTER TABLE product_option_value_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin; Table 'elitekey_db.product_option_value_description' doesn't exist

Could not execute this query: DELETE FROM `extension` WHERE `type` = 'module' AND `key` = 'latest'; Unknown column 'key' in 'where clause'

Could not execute this query: INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES (NULL, 'module', 'latest') ON DUPLICATE KEY UPDATE extension_id=extension_id; Unknown column 'key' in 'field list'

Could not execute this query: ALTER TABLE `category_description` CHANGE `meta_keywords` `meta_keyword` varchar(255) NOT NULL COLLATE utf8_bin; Duplicate column name 'meta_keyword'

Could not execute this query: ALTER TABLE `extension` CHANGE `key` `code` varchar(32) NOT NULL COLLATE utf8_bin; Unknown column 'key' in 'extension'

Could not execute this query: ALTER TABLE `order` CHANGE `invoice_id` `invoice_no` int(11) NOT NULL DEFAULT '0'; Duplicate column name 'invoice_no'

Could not execute this query: ALTER TABLE `order` CHANGE `currency` `currency_code` varchar(3) NOT NULL; Unknown column 'currency' in 'order'

Could not execute this query: ALTER TABLE `order` CHANGE `value` `currency_value` decimal(15,8) NOT NULL; Unknown column 'value' in 'order'

Could not execute this query: INSERT INTO `coupon_history` (coupon_id, order_id, customer_id, date_added) SELECT coupon_id, order_id, customer_id, date_added FROM `order`; Unknown column 'coupon_id' in 'field list'

Could not execute this query: ALTER TABLE `order` ADD `reward` int(8) NOT NULL DEFAULT 0 COMMENT '' AFTER total, ADD `affiliate_id` int(11) NOT NULL DEFAULT 0 COMMENT '' AFTER order_status_id, ADD `commission` decimal(15,4) NOT NULL COMMENT '' AFTER affiliate_id, MODIFY `invoice_prefix` varchar(10) NOT NULL COMMENT '' COLLATE utf8_bin, DROP `invoice_date`, DROP `coupon_id`, ALTER `date_modified` DROP DEFAULT, ALTER `date_added` DROP DEFAULT; Can't DROP 'coupon_id'; check that column/key exists

Could not execute this query: ALTER TABLE `product` ADD `upc` varchar(12) NOT NULL COLLATE utf8_bin AFTER sku, ADD `points` int(8) NOT NULL DEFAULT '0' AFTER price, DROP `maximum`, DROP `cost`; Duplicate column name 'upc'

Could not execute this query: ALTER TABLE `product_description` CHANGE `meta_keywords` `meta_keyword` varchar(255) NOT NULL COLLATE utf8_bin; Duplicate column name 'meta_keyword'

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!

Newbie

Posts

Joined
Mon Jun 06, 2011 8:57 pm

Post by Qphoria » Tue Jun 14, 2011 12:20 pm

oz457 wrote: Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /export/websites/le-parfumeur/shop/index.php on line 63
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/index.php on line 171Warning: Cannot modify header information - headers already sent by (output started at /export/websites/le-parfumeur/shop/index.php:62) in /export/websites/le-parfumeur/shop/system/library/currency.php on line 45Notice: Use of undefined constant HTTP_IMAGE - assumed 'HTTP_IMAGE' in /export/websites/le-parfumeur/shop/catalog/controller/common/header.php on line 26
This is actually due to your 2nd grade level of reading comprehension. You didn't read the step by step file, don't bother me with this crap

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Tue Jun 14, 2011 12:21 pm

zhalla wrote:Hi,

Similar problems here, upgraded from 1.4.9.5:
Those aren't similar at all. Those occurred because you ran the script twice. As I said in the first post, running it twice will yield errors like that. Continue with the steps after the upgrade script.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by henke81 » Tue Jun 14, 2011 11:21 pm

Hi, I tried to run the script but only got a bunch of errors, and when I load up my backup files I can't even get in to the admin!
I get the following error message:

Error: Unknown column 'o.currency' in 'field list'
Error No: 1054
SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS name, (SELECT os.name FROM h_order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '2') AS status, o.date_added, o.total, o.currency, o.value FROM `h_order` o WHERE o.order_status_id > '0' ORDER BY o.date_added DESC LIMIT 0,10

What to do??

//Henrik

Newbie

Posts

Joined
Sat Nov 13, 2010 2:03 am

Post by Qphoria » Tue Jun 14, 2011 11:23 pm

"Bunch of errors" means nothing to me. Regardless of the errors you get when running... complete the process, It is likely that the errors are just warnings but the result is still successful.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by henke81 » Tue Jun 14, 2011 11:43 pm

I did go through with the whole process.
The errors showed up at step 16..



PS I'm using the cleaner-by-default-1491 - theme

//Henrik
Last edited by henke81 on Wed Jun 15, 2011 12:16 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Nov 13, 2010 2:03 am
Who is online

Users browsing this forum: No registered users and 8 guests