Jump to content
Latest News: (loading..)
redefin

1062 - Duplicate entry '0' for key 'PRIMARY'

Recommended Posts

Hello,

 

I am running OSC 2.3.3 with several addons. When I install the PayPal Standard module, at the checkout_confirmation.php page when making an order with a test client, under the PayPal logo I get:

............................................

1062 - Duplicate entry '0' for key 'PRIMARY'

insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values ('625917', 'Test Amaze', '', 'Somewhere 1', '', 'Someplace', '121212', 'Sameplace', 'Virgin Islands (U.S.)', '1212121212', 'testamaze@e-k-o.net', '1', 'Test Amaze', '', 'Somewhere 1', '', 'Someplace', '121212', 'Sameplace', 'Virgin Islands (U.S.)', '1', 'Test Amaze', '', 'Somewhere 1', '', 'Someplace', '121212', 'Sameplace', 'Virgin Islands (U.S.)', '1', 'PayPal (including Credit and Debit Cards)', '', '', '', '', now(), '31', 'EUR', '1.00000000')

[TEP STOP]

....................................................

 

I have added the same module in other OSC 2.3.3 I have at other site but did not get that issue. Anyone can help?

 

Thank you

Share this post


Link to post
Share on other sites

Check in phpmyadmin that your orders table has orders_id defined as auto increment

 


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
37 minutes ago, BrockleyJohn said:

Check in phpmyadmin that your orders table has orders_id defined as auto increment

 

Hi John, that did the trick. Now it works perfectly. Thanx!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×