Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2012
    Posts
    3
    Plugin Contributions
    0

    Default Issue Option Value to Option Name

    When I try to add a color option in the Option Value field to my product I get the following error message after clicking Insert.

    1062 Duplicate entry '1-1' for key 'PRIMARY'
    in:
    [insert into zen_products_options_values (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order) values ('1', '1', 'white', '0')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,697
    Plugin Contributions
    6

    Default Re: Issue Option Value to Option Name

    Go to your Control Panel for your domain to phpMyAdmin and look to see if you have any records in the table:
    products_options_values

    If not, run it the SQL:
    Code:
    DROP TABLE IF EXISTS products_options_values;
    CREATE TABLE products_options_values (
      products_options_values_id int(11) NOT NULL default '0',
      language_id int(11) NOT NULL default '1',
      products_options_values_name varchar(64) NOT NULL default '',
      products_options_values_sort_order int(11) NOT NULL default '0',
      PRIMARY KEY (products_options_values_id,language_id),
      KEY idx_products_options_values_name_zen (products_options_values_name),
      KEY idx_products_options_values_sort_order_zen (products_options_values_sort_order)
    ) ENGINE=MyISAM;
    Then run in the SQL:
    Code:
    INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');
    see if this corrects the problem ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Mar 2012
    Posts
    3
    Plugin Contributions
    0

    Default Re: Issue Option Value to Option Name

    Thanks for your reply, but yes products_options_values is in the tables. What would be my next step?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,697
    Plugin Contributions
    6

    Default Re: Issue Option Value to Option Name

    how many records are in there?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Mar 2012
    Posts
    3
    Plugin Contributions
    0

    Default Re: Issue Option Value to Option Name

    this is all new to me, but when I click on Browse and look in the Options section I see 2. Line 1 says TEXT and line 2 says Black.

    Should I delete both of these?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,697
    Plugin Contributions
    6

    Default Re: Issue Option Value to Option Name

    First, check this table:
    products_attributes

    Do you have any records in it?

    If not, try running the two SQLs that I posted and see if that corrects the problem ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    May 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: Issue Option Value to Option Name

    I don't know what happened to the person who asked the question, but thanks for the answer. I was experiencing the same problem and running the SQL's you provided fixed my problem!

    ThANKS!

 

 

Similar Threads

  1. Issue with Option Value
    By konzo in forum General Questions
    Replies: 15
    Last Post: 26 Nov 2012, 11:04 PM
  2. Adding copied option names and option valuesto product pricing
    By Derek Bryant in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 29 Apr 2009, 06:31 PM
  3. Replies: 3
    Last Post: 1 Aug 2007, 04:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •