If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / Issue Option Value to Option Name

Issue Option Value to Option Name

Started by greglr59 on 10 Mar 2012, 7:06 PM · Views: 799

Results 1 to 7 of 7
10 Mar 2012, 7:06 PM
#1
greglr59 avatar

greglr59

New Zenner

Join Date:
Mar 2012
Posts:
3
Plugin Contributions:
0

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.

10 Mar 2012, 7:15 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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:

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:

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!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Mar 2012, 7:30 PM
#3
greglr59 avatar

greglr59

New Zenner

Join Date:
Mar 2012
Posts:
3
Plugin Contributions:
0

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?

10 Mar 2012, 7:36 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Mar 2012, 7:43 PM
#5
greglr59 avatar

greglr59

New Zenner

Join Date:
Mar 2012
Posts:
3
Plugin Contributions:
0

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?

10 Mar 2012, 11:05 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Apr 2012, 12:03 AM
#7
aperfecthost avatar

aperfecthost

New Zenner

Join Date:
May 2005
Location:
Rockwood, Tennessee, United States
Posts:
97
Plugin Contributions:
0

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!