Post by JNeuhoff » 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:

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);

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Daniel » Tue Jul 21, 2009 12:25 am

oops I know what I've done!

i'm goign to do a mini update.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Tue Jul 21, 2009 12:42 am

ok i reuploaded 1.3.0 with a fix in.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 19 guests