CartExpert.net Posted December 28, 2013 Share Posted December 28, 2013 (edited) There's a bug in the upgrade script that will not copy all of your orders. Edit 'install/upgrade/upgrade/php/migrate_orders.php' move lines [spam-filter]92 to line 73, to be before the 'for' loop comment line 93 THESE CHANGES NEED TO BE DONE BEFORE STARTING THE UPGRADE SCRIPT, OTHERWISE THE OLD VERSION HAS TO BE RESTORED FIRST AND RUN THE UPGRADE SCRIPT AGAIN. Regards.Robin.The CartExpert Team Edited January 3, 2014 by CartExpert.net (see edit history) 2 Link to comment Share on other sites More sharing options...
levviking Posted December 30, 2013 Share Posted December 30, 2013 Thanks for help. I have the same problem, after upgrade from 1.4.9 to 1.5.6.1, i have only 8 orders left. But i donțt understand what line can i edit. This is my migrate_orders.php. from line 68 to line 98. $step = 3000; $count_orders = Db::getInstance()->getValue('SELECT count(id_order) FROM '._DB_PREFIX_.'orders'); $nb_loop = $start = 0; if($count_orders > 0) $nb_loop = ceil($count_orders / $step); for($i = 0; $i < $nb_loop; $i++) { $order_res = Db::getInstance()->query('SELECT * FROM `'._DB_PREFIX_.'orders` LIMIT '.(int)$start.', '.(int)$step); $start = intval(($i+1) * $step); $cpt = 0; $flush_limit = 200; while ($order = Db::getInstance()->nextRow($order_res)) { $sum_total_products = 0; $sum_tax_amount = 0; $default_group_id = mo_getCustomerDefaultGroup((int)$order['id_customer']); $price_display_method = mo_getPriceDisplayMethod((int)$default_group_id); $order_details_list = Db::getInstance()->query(' SELECT od.* FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = '.(int)$order['id_order']); while ($order_details = Db::getInstance()->nextRow($order_details_list)) { $values_order_detail = array(); $values_order = array(); $col_order_detail = array(); // we don't want to erase order_details data in order to create the insert query $products = mo_setProductPrices($order_details, $price_display_method); $tax_rate = 1 + ((float)$products['tax_rate'] / 100); $reduction_amount_tax_incl = (float)$products['reduction_amount']; 1 Link to comment Share on other sites More sharing options...
infoseek Posted December 31, 2013 Share Posted December 31, 2013 I wonder if there is a new version release when the new year begins,there comes some bugs since the 1.5.6.1 till now Link to comment Share on other sites More sharing options...
CartExpert.net Posted January 3, 2014 Author Share Posted January 3, 2014 Hi. Lines: $values_order_detail = array(); $values_order = array(); should go before: for($i = 0; $i < $nb_loop; $i++) Line: $col_order_detail = array(); should be //$col_order_detail = array(); You will need to redo the upgrade. Regards.Robin.The CartExpert Team 1 Link to comment Share on other sites More sharing options...
bellini13 Posted January 3, 2014 Share Posted January 3, 2014 Thanks for providing this. I attempted to submit a pull request on github, however I get a 404 page error when submitted the changes. This problem also exists in both alpha releases of v1.6 Link to comment Share on other sites More sharing options...
indus Posted January 5, 2014 Share Posted January 5, 2014 (edited) I have upgraded from 1.4.11 to 1.5.6.1 and i have all my orders, it just doesnt show them unless you select status = some value in back office. Maybe the orders are copied, it just doesnt show them ? Edited January 5, 2014 by indus (see edit history) Link to comment Share on other sites More sharing options...
CartExpert.net Posted January 6, 2014 Author Share Posted January 6, 2014 The upgrade transfers some orders, but not all of them. Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
indus Posted January 6, 2014 Share Posted January 6, 2014 Such a critical bug, have they stopped the 1 click upgrade till this is fixed ? Link to comment Share on other sites More sharing options...
bellini13 Posted January 6, 2014 Share Posted January 6, 2014 the fact that they have not even acknowledged the issue or replied to this thread, I suspect not.. Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 10, 2014 Share Posted January 10, 2014 Such a critical bug, have they stopped the 1 click upgrade till this is fixed ? Hi, This is fixed in the installer https://github.com/PrestaShop/PrestaShop/commit/b16e4b5a8ee6bdab13808f8ab473bda6c060c086 You do not need to report that, please use the upgrade module which fixes that on the fly during an upgrade to 1.5.6.1 https://github.com/PrestaShop/PrestaShop-modules/commit/5bc941d03be121d69120bbaade60d2d74e018445 Best regards 1 Link to comment Share on other sites More sharing options...
levviking Posted January 14, 2014 Share Posted January 14, 2014 Somebody test the upgrade with one click upgrade module? It's work now? Thanks. Link to comment Share on other sites More sharing options...
Pete Nice Posted January 19, 2014 Share Posted January 19, 2014 Don't think it has been resolved using the upgrade module. I used it to test an upgrade from 1.4.7 to 1.5.6.1 and it's only copied across 25 orders. Link to comment Share on other sites More sharing options...
levviking Posted January 19, 2014 Share Posted January 19, 2014 Thank's for your reply. You save one day of my business downtime. You use the new version of one click upgrade module? Probably i will need to edit the migrate_orders.php. Link to comment Share on other sites More sharing options...
Pete Nice Posted January 19, 2014 Share Posted January 19, 2014 Yep - I downloaded the 1 click upgrade module yesterday from Add Ons. Link to comment Share on other sites More sharing options...
indus Posted January 20, 2014 Share Posted January 20, 2014 (edited) I have manually counted , and i seem to have all my orders migrated. I have migrated in Dec. I went through them manually. Also, considering the github changes, it seems the last commits were 2 months ago, and this thread is made in December. Is it possible, some upgrades were made when 1.5.6.1 was released, around Nov 18 maybe. Pete, can you see what is the version number of upgrade module you used? Edited January 20, 2014 by indus (see edit history) Link to comment Share on other sites More sharing options...
Pete Nice Posted January 20, 2014 Share Posted January 20, 2014 I'm using upgrade module version 1.2.6. Looking at the orders that have been migrated there's only 1 in increments of 200: Order No: 200 400 600 etc There's a total of 25. Link to comment Share on other sites More sharing options...
Pete Nice Posted January 20, 2014 Share Posted January 20, 2014 Hmm - I've just looked at the update date of the module in Add Ons and it says 01/20/14 - today - strange. Link to comment Share on other sites More sharing options...
levviking Posted January 20, 2014 Share Posted January 20, 2014 i will test it today, i download again the One click upgrade module. Link to comment Share on other sites More sharing options...
levviking Posted January 20, 2014 Share Posted January 20, 2014 I will test it with the new version 1.5.6.2, released today. Link to comment Share on other sites More sharing options...
levviking Posted January 21, 2014 Share Posted January 21, 2014 I test it and now all my orders is here. I make upgrade from 1.4.9 directly to 1.5.6.2, and broke up, so i need to do a restoration. I try to make in 2 step, from 1.4.9 to 1.4.11, and to 1.5.6.2, and it's ok. It's very rapid upgrade, both step is make in max 30 min. But in the module is a big mess up. After some bug like url settings and image settings, and 8 hour of searching on prestashop forum, all works well. The new prestashop 1.5.6.2, is more configurable and have much more option and settings, but it's hard to upgrade from presta 1.4. 1 Link to comment Share on other sites More sharing options...
indus Posted January 21, 2014 Share Posted January 21, 2014 I have another problem. I dont see the upgrade now button . Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 I have the same problem, with another store. The problem is in upgrade checklist, all need to be green. But i can't pass forward, because the mobil theme is blocking me. I disable it, i delete it, but still get same error: You must disable the mobile theme I disabled all my module, and i delete all themes except the default theme. Any help please. Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 24, 2014 Share Posted January 24, 2014 Hi, You need to unistall it. Not disabling it or delete it by ftp directly. The database and your /config/settings.inc.php must be clean. If your settings.inc.php seems already clean (no if/else about "mobile" in it), you can yhen also look in ps_module table on phpmyadmin to delete the mobile_theme row. DELETE FROM `ps_module`WHERE `name` LIKE 'mobile_theme' LIMIT 1 Regards Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 Thank you very much. You save my day. I search for solution all day, but no luck. Now i will try to upgrade my shop. Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 The upgrade is fast and simple in 2 steps, from 1.4.9 to 1.4.11 and after to 1.5.6.2. But i got this error when i try to acces module tab in BO: [PrestaShop] Fatal error in module AdminTab:Cannot redeclare class AdminTabCore Any advice? Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 24, 2014 Share Posted January 24, 2014 Any file in override/classes/ folder (not the classes folder)? like AdminTab.php ? A module or an override from 1.4 may mess things up. Regards Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 Thank for you reply. What i can do to fix this? 1, To overwrite the classes folder from prestashop 1.5.6.2 fresh download? 2, delete all custom module with ftp? Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 24, 2014 Share Posted January 24, 2014 Not in the classes folder, in the override folder. You can enable mod_dev and in Performances tab, disable third party modules or overrides, to ensure it is one of them. Regards Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 thank you, but it's too much for me, i'm not a programmer. i roll back again to 1.4.9 maybe tomorrow i try again, after i disabled all non native modules. Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 I want to make this upgrade. So, i do back with rollback, to 1.4.9. I uninstall all non nativ module, and delete it. I make upgrade with 1click upgrade, in 2 steps. The problem is still here. Error code on modules tab: Fatal error: Cannot redeclare class AdminTabCore in /home/xxx/public_html/classes/AdminTab.php on line 31[PrestaShop] Fatal error in module AdminTab:Cannot redeclare class AdminTabCore Here is my classes/AdminTab.php /** * @deprecated 1.5.0 */ abstract class AdminTabCore { /** @var integer Tab id */ public $id = -1; /** @var string Associated table name */ public $table; /** @var string Object identifier inside the associated table */ protected $identifier = false; Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 24, 2014 Share Posted January 24, 2014 Hi, Try to delete cache/class_index.php ? Or try to find why this class is already declared ? Never saw this sorry. Regards. Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 And i try the tip with Tools/performance disable and enable the third party modules, and the overrides, but same error. Link to comment Share on other sites More sharing options...
levviking Posted January 24, 2014 Share Posted January 24, 2014 I try with the delete cache/class_index.php The error persist. In override folder, i have only empty folders, and 3 files: .htacces index.php readme_override.txt Link to comment Share on other sites More sharing options...
Gregory Roussac Posted January 25, 2014 Share Posted January 25, 2014 Search for a file called AdminTab.php in modules folders maybe ? otherwise I really have no clue. Regards Link to comment Share on other sites More sharing options...
levviking Posted January 25, 2014 Share Posted January 25, 2014 Thank you very-very much. I find it with filezilla search and i delete it. Now looks ok. You are a Prestashop genius ! Link to comment Share on other sites More sharing options...
markotom Posted January 27, 2014 Share Posted January 27, 2014 Hello, i have updatet my shop from 1.3.1 to 1.5.6.2. Now when i refresh page i can't login to my admin page. Any soloution Regards Marko Link to comment Share on other sites More sharing options...
BrunoBgt Posted September 15, 2014 Share Posted September 15, 2014 Hello, I tried to make an upgrade from 1.2.4.0 to 1.5.3.1. I followed all the steps, but i got this error: Fatal error: Class 'ObjectModel' not found in /homepages/7/d522019184/htdocs/demo/cinema2/classes/Configuration.php on line 28 And I tried everything you posted here but still not working. Could you give me a hand on this? Thanks!! Link to comment Share on other sites More sharing options...
Recommended Posts