1.3.0 Installer Bug
Posted: Mon Jul 20, 2009 11:59 pm
The Opencart installer for 1.3.0 has a bug. Whatever I enter as the DB prefix, it always ends up creating the DB tables using a 'oc_' as the DB prefix. This results in a mismatch between the DB_PREFIX in the config.php, and the actual DB tables (which use 'oc_' as the table name prefix).
Here is my proposed bugfix which should work for the supplied opencart.sql:
Replace lines 23 to 25 in file /install/model/install.php with this:
Here is my proposed bugfix which should work for the supplied opencart.sql:
Replace lines 23 to 25 in file /install/model/install.php with this:
Code: Select all
$query = str_replace("DROP TABLE IF EXISTS `oc_", "DROP TABLE IF EXISTS `" . $data['db_prefix'], $query);
$query = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . $data['db_prefix'], $query);
$query = str_replace("INSERT INTO `oc_", "INSERT INTO `" . $data['db_prefix'], $query);