Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My first Customer


Guest

Recommended Posts

1062-Duplicate entry '0' for key 1

Please call so we can complete this order

 

 

What is causing this error?

 

I hope that it's nothing serious. He was trying to check out with the Paypal IPN that I installed.

 

Please let me know!

 

Thanks!!!!!

Link to comment
Share on other sites

which table did it say

 

try and complete a test order on your own store

How ingenious of you!

 

Here is the whole error -

1062 - Duplicate entry '0' for key 1

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, orders_status, date_purchased, last_modified, currency, currency_value) values ('4', 'Joel Test Gallant', '', '24 Lydia St', '', 'Dieppe', 'E1A4Z5', 'New Brunswick', 'Canada', '506-870-0054', '[email protected]', '1', 'Joel Test Gallant', '', '24 Lydia St', '', 'Dieppe', 'E1A4Z5', 'New Brunswick', 'Canada', '1', 'Joel Test Gallant', '', '24 Lydia St', '', 'Dieppe', 'E1A4Z5', 'New Brunswick', 'Canada', '1', 'PayPal', '', '', '', '', '4', now(), now(), 'CAD', '1.00000000')

[TEP STOP]

 

Where did I go wrong?

Link to comment
Share on other sites

Do you have access to phpmyadmin?

 

if so look at your ID Feild of the Orders Table (should be the Top one) and mack sure "auto_increment" is turned on....

 

what is happening is order number "0" is tring to be logged but mysql shows there is already and order with that id.. there probally is not since it is "0" but..

 

and returns the error because the feild is set to not duplicate

 

normally the orders go 1,2,3,4,5,6 etc which mysql automatically generates based on the auto_increment command

Link to comment
Share on other sites

crap... that's it! The order ID # is 0... But I dont' get it. I had another customer purchase something and the order id was # 9. How does that make any sense? I also installed the random order number.

 

Anyone have a suggestion to fix it?

Link to comment
Share on other sites

Ok, so I installed Random order number & I wasn't supposed to turn on the auto_increment back on, so how am I supposed to fix this error?

Link to comment
Share on other sites

Ok, so I installed Random order number & I wasn't supposed to turn on the auto_increment back on, so how am I supposed to fix this error?

not to sould like an ass, but did you install it write?

 

adding the new "order_id" feild to the Intsert query?

Link to comment
Share on other sites

not sounding like an ass at all... I probably didn't install it properly.... i had no real idea how to create those databases....

 

 

So, what do you need from me to help figure this out....

Link to comment
Share on other sites

you are better off to uninstall the random order # generator as it is more a pain in the neck than it is worth it. if you have a product customers want and you are a trusty vendor, they dont care what your order numbering system is like. they dont even see the order number until after the order is placed anyway, so what is the use?

personally, i uninstall that contribution on any of my customers, else they are on their own.

Link to comment
Share on other sites

you are better off to uninstall the random order # generator as it is more a pain in the neck than it is worth it. if you have a product customers want and you are a trusty vendor, they dont care what your order numbering system is like. they dont even see the order number until after the order is placed anyway, so what is the use?

personally, i uninstall that contribution on any of my customers, else they are on their own.

yes and no

 

I dont like how the Random Generator work in the Contribution

 

but I also dont like how the Defualt scheme is

 

I will probally come up with my own at some point down the road

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...