Post by YARTES » Wed May 13, 2009 6:14 am

I'm trying to install OpenCart and when I type in all the information about the Database I get this error: "Duplicate entry '25' for key 1".

Does anyone know how can I fix this problem?

Thanks

Newbie

Posts

Joined
Wed May 13, 2009 6:12 am

Post by phpuk » Wed May 13, 2009 7:16 am

Check you opencart.sql file which can be found in install/opencart.sql

Look at line starting 563

it should read this:

Code: Select all

INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES
(23, 'payment', 'cod'),
(14, 'total', 'coupon'),
(22, 'total', 'shipping'),
(63, 'total', 'low_order_fee'),
(57, 'total', 'sub_total'),
(58, 'total', 'tax'),
(59, 'total', 'total'),
(76, 'shipping', 'free'),
(77, 'module', 'cart'),
(78, 'module', 'category'),
(79, 'module', 'currency'),
(80, 'module', 'information'),
(81, 'module', 'manufacturer'),
(82, 'module', 'bestseller');

-- --------------------------------------------------------
See if you have any duplicates in the column on the left.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by djbrock » Thu May 14, 2009 9:58 am

I have received this error too (Hostmonster). I have no duplicate entries and even removed the section and others but it still gave me the error. Finally, I dropped all the tables in the opc02 database and ran the opencart.sql through PHPAdmin, then it worked. I imported my backed up .sql and the info is there but the checkout is broken. Both the Paypal and the Cheque modules do not work. I'm getting

http://www.ka-tees.com/index.php?route=checkout/confirm

Warning: mysql_query() [http://www.mysql.com/doc]: Unknown column 'coupon_id' in 'field list' in /home/xxx/public_html/katees/system/database/mysql.php on line 22
Error: Unknown column 'coupon_id' in 'field list'
Error No: 1054

The good news is that the error I was getting at checkout (see http://forum.opencart.com/viewtopic.php?f=22&t=3976 ) has gone away.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by YARTES » Thu May 14, 2009 10:54 am

Thanks for your reply. I fixed the problem but I had to backup my Database info and create a new one again. Now it's working. :-) Thanks for your help.

Newbie

Posts

Joined
Wed May 13, 2009 6:12 am

Post by djbrock » Fri May 15, 2009 9:46 pm

I have given up and reverted to 1.2.6. Simply by copying the files back it worked flawlessly. Every time I see a new version of OC posted I fear the update because it is always a problem and wastes many hours of my time. There has to be a better way to update.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by djbrock » Fri May 29, 2009 6:35 am

Creating a new database and doing a new install seems to be the only way around this. You can import your sql data from the backup you make. If it gives you any "duplicate" import errors, just Drop all the existing tables before trying to import again.

Even this is not a perfect fix. I still get errors at the checkout page but once I choose an address they go away, the errors were not there in 1.2.6. Some images may not show, too.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by biz0wn » Fri May 13, 2011 2:45 am

I removed primary key from product_to_category. Is caused duplicates in table, but works properly.

Newbie

Posts

Joined
Sun Nov 14, 2010 5:57 pm
Who is online

Users browsing this forum: Amazon [Bot] and 13 guests