I tested the upgrade process in localhost environment and downloaded the 1.4.0 version because I use other
language than english and this is the latest version for my language. I uploaded some products with their info.
After that I downloaded the 1.4.7 version and followed the upgrade instructions. The upgrade script ran without error.
In the admin menu I change the permission and set the system url location well.
I tried to buy a product and I clicked on the add basket button and the cart was empty. It was always empty.
Well I looked at the code closer and I found that the product query always return empty results because
the weight class and the length classes were null.
See that:
$product_query = $this->db->query("SELECT *, wcd.unit AS weight_class, mcd.unit AS length_class FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "weight_class wc ON (p.weight_class_id = wc.weight_class_id) LEFT JOIN " . DB_PREFIX . "weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) LEFT JOIN " . DB_PREFIX . "length_class mc ON (p.length_class_id = mc.length_class_id) LEFT JOIN " . DB_PREFIX . "length_class_description mcd ON (mc.length_class_id = mcd.length_class_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.date_available <= NOW() AND p.status = '1'");
If I remove all of my uploaded products and fill these classes and upload my product again, it is ok.
I can sell my products and the cart isn't empty. The question is that it is a normal behaviour or do I
need a pluss upgrade sql script or did I a mistake?
Well I made an upgrade language script to make my life easier. I can translate the language difference between
the fresh english version and an other older language version of OpenCart. It helps to minimalize to edit files
by manually.
Hi ,
In my case i get the error ; -
[
Notice: Use of undefined constant DB_PREFIX - assumed 'DB_PREFIX' in /home/acquire/public_html/shop/install/upgrade.php on line 104
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/acquire/public_html/shop/install/upgrade.php on line 104
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 104
]
In my case i get the error ; -
[
Notice: Use of undefined constant DB_PREFIX - assumed 'DB_PREFIX' in /home/acquire/public_html/shop/install/upgrade.php on line 104
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/acquire/public_html/shop/install/upgrade.php on line 104
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 104
]
Regards
Prijesh
Laptop Parts
Now the universal package is available but still I'm getting the database error on line no 104, 108, 111 and so on.
I hv gone through upgrade php file in which I found it give error where the database table is not there. for e.g product to store, product id.
If somebody can help me out from this I'll be really thankful.
Thanks
I hv gone through upgrade php file in which I found it give error where the database table is not there. for e.g product to store, product id.
If somebody can help me out from this I'll be really thankful.
Thanks
Regards
Prijesh
Laptop Parts
Guys, I'm one step ahead got some clue while searching the forum
This is for your reference
you have to udate your config.php file if you are upgrading from OC 1.4.0 or lower
sample:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.domain.com/shop/admin/');
define('HTTP_CATALOG', 'http://www.domain.com/shop/');
define('HTTP_IMAGE', 'http://www.domain.com/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.domain.com/shop/admin/');
define('HTTPS_IMAGE', 'http://www.domain.com/shop/image/');
// DIR
define('DIR_APPLICATION', '/home/domain/public_html/shop/admin/');
define('DIR_SYSTEM', '/home/domain/public_html/shop/system/');
define('DIR_DATABASE', '/home/domain/public_html/shop/system/database/');
define('DIR_LANGUAGE', '/home/domain/public_html/shop/admin/language/');
define('DIR_TEMPLATE', '/home/domain/public_html/shop/admin/view/template/');
define('DIR_CONFIG', '/home/domain/public_html/shop/system/config/');
define('DIR_IMAGE', '/home/domain/public_html/shop/image/');
define('DIR_CACHE', '/home/domain/public_html/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/domain/public_html/shop/download/');
define('DIR_LOGS', '/home/domain/public_html/shop/system/logs/');
define('DIR_CATALOG', '/home/domain/public_html/shop/catalog/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'user');
define('DB_PASSWORD', 'pssword');
define('DB_DATABASE', 'ecommerce');
define('DB_PREFIX', '');
?>
This is for your reference
you have to udate your config.php file if you are upgrading from OC 1.4.0 or lower
sample:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.domain.com/shop/admin/');
define('HTTP_CATALOG', 'http://www.domain.com/shop/');
define('HTTP_IMAGE', 'http://www.domain.com/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.domain.com/shop/admin/');
define('HTTPS_IMAGE', 'http://www.domain.com/shop/image/');
// DIR
define('DIR_APPLICATION', '/home/domain/public_html/shop/admin/');
define('DIR_SYSTEM', '/home/domain/public_html/shop/system/');
define('DIR_DATABASE', '/home/domain/public_html/shop/system/database/');
define('DIR_LANGUAGE', '/home/domain/public_html/shop/admin/language/');
define('DIR_TEMPLATE', '/home/domain/public_html/shop/admin/view/template/');
define('DIR_CONFIG', '/home/domain/public_html/shop/system/config/');
define('DIR_IMAGE', '/home/domain/public_html/shop/image/');
define('DIR_CACHE', '/home/domain/public_html/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/domain/public_html/shop/download/');
define('DIR_LOGS', '/home/domain/public_html/shop/system/logs/');
define('DIR_CATALOG', '/home/domain/public_html/shop/catalog/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'user');
define('DB_PASSWORD', 'pssword');
define('DB_DATABASE', 'ecommerce');
define('DB_PREFIX', '');
?>
Regards
Prijesh
Laptop Parts
still my cart is not ready, Some issue is still there
the below are the error codes and not able to see any product or categories...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 80
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
The following errors occured:
Could not execute this query: ALTER TABLE product ADD measurement_class_id int(11) NOT NULL DEFAULT 0 COMMENT '' AFTER height;
Could not execute this query: ALTER TABLE product ALTER length SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product ALTER width SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product ALTER height SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product_special ADD customer_group_id int(11) NOT NULL DEFAULT 0 COMMENT '' AFTER product_id;
Could not execute this query: ALTER TABLE product_special ADD priority int(5) NOT NULL DEFAULT '1' COMMENT '' AFTER customer_group_id;
Could not execute this query: ALTER TABLE product_special ALTER price SET DEFAULT 0.0000;
Could not execute this query: ALTER TABLE product_special ALTER date_start SET DEFAULT '0000-00-00';
Could not execute this query: ALTER TABLE product_special ALTER date_end SET DEFAULT '0000-00-00';
Could not execute this query: ALTER TABLE product ALTER measurement_class_id SET DEFAULT 0;
Could not execute this query: ALTER TABLE product_option_value ADD quantity int(4) NOT NULL DEFAULT '0' COMMENT '' AFTER product_id;
Could not execute this query: ALTER TABLE product_option_value ADD subtract int(1) NOT NULL DEFAULT '0' COMMENT '' AFTER quantity;
Could not execute this query: DELETE FROM extension WHERE `type` = 'module' AND `key` = 'currency';
Could not execute this query: ALTER TABLE product ADD length_class_id int(11) NOT NULL DEFAULT '0' COMMENT '' AFTER height;
Could not execute this query: ALTER TABLE product_image DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_value DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_value_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_related DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_special DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE stock_status DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: DELETE FROM `extension` WHERE `type` = 'module' AND `key` = 'latest';
Could not execute this query: INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES (NULL, 'module', 'latest') ON DUPLICATE KEY UPDATE extension_id=extension_id;
Could not execute this query: ALTER TABLE `product_special` ADD INDEX ( `product_id` ) ;
Could not execute this query: ALTER TABLE `product_related` ADD INDEX ( `product_id` ) ;
The above errors occurred because the script could not properly determine the existing state of those d
the below are the error codes and not able to see any product or categories...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 80
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/acquire/public_html/shop/install/upgrade.php on line 68
The following errors occured:
Could not execute this query: ALTER TABLE product ADD measurement_class_id int(11) NOT NULL DEFAULT 0 COMMENT '' AFTER height;
Could not execute this query: ALTER TABLE product ALTER length SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product ALTER width SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product ALTER height SET DEFAULT 0.00;
Could not execute this query: ALTER TABLE product_special ADD customer_group_id int(11) NOT NULL DEFAULT 0 COMMENT '' AFTER product_id;
Could not execute this query: ALTER TABLE product_special ADD priority int(5) NOT NULL DEFAULT '1' COMMENT '' AFTER customer_group_id;
Could not execute this query: ALTER TABLE product_special ALTER price SET DEFAULT 0.0000;
Could not execute this query: ALTER TABLE product_special ALTER date_start SET DEFAULT '0000-00-00';
Could not execute this query: ALTER TABLE product_special ALTER date_end SET DEFAULT '0000-00-00';
Could not execute this query: ALTER TABLE product ALTER measurement_class_id SET DEFAULT 0;
Could not execute this query: ALTER TABLE product_option_value ADD quantity int(4) NOT NULL DEFAULT '0' COMMENT '' AFTER product_id;
Could not execute this query: ALTER TABLE product_option_value ADD subtract int(1) NOT NULL DEFAULT '0' COMMENT '' AFTER quantity;
Could not execute this query: DELETE FROM extension WHERE `type` = 'module' AND `key` = 'currency';
Could not execute this query: ALTER TABLE product ADD length_class_id int(11) NOT NULL DEFAULT '0' COMMENT '' AFTER height;
Could not execute this query: ALTER TABLE product_image DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_value DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_option_value_description DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_related DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE product_special DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: ALTER TABLE stock_status DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Could not execute this query: DELETE FROM `extension` WHERE `type` = 'module' AND `key` = 'latest';
Could not execute this query: INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES (NULL, 'module', 'latest') ON DUPLICATE KEY UPDATE extension_id=extension_id;
Could not execute this query: ALTER TABLE `product_special` ADD INDEX ( `product_id` ) ;
Could not execute this query: ALTER TABLE `product_related` ADD INDEX ( `product_id` ) ;
The above errors occurred because the script could not properly determine the existing state of those d
Regards
Prijesh
Laptop Parts
Who is online
Users browsing this forum: No registered users and 42 guests