Zen Cart Logo

Can't add option values

Views: 1,483

Results 1 to 13 of 13
5 Aug 2011, 6:42 PM
#1
jfenn avatar

jfenn

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Can't add option values

Using 1.3.9h

I'm trying to add option values and keep getting an error. I can add option names just fine. What am I doing wrong?

5 Aug 2011, 8:06 PM
#2
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Can't add option values

jfenn:

Using 1.3.9h

I'm trying to add option values and keep getting an error. I can add option names just fine. What am I doing wrong?

Option Names are the actual names you are going to use for the Option Values which it seems you already figured this out..

So to add Option Values to your Option Names you would do the following

  1. Mouse Over Catalog then click on Attributes Controller then click on "Option Values" button

  2. To add a Option Value to an Option Name see screenshot attached. The Option Name are the ones in the drop down box as shown in the image.

  3. Choose your "Option Name" from the drop down box (example: Color) and inside the field next to it where it says "en:" add a name such as "Orange" (Without Quotations) add sort order number if only desired to, click "insert button"

  4. Go to attribute controller and choose your product and start adding attributes.

Also other resource for information can be found at Tutorial URL https://www.zen-cart.com/tutorials/index.php?article=57

5 Aug 2011, 8:14 PM
#3
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Can't add option values

Forgot to ask for the error you were seeing. :blush:

Can you show us the error your getting?

6 Aug 2011, 10:58 PM
#4
jfenn avatar

jfenn

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Re: Can't add option values

knuckle-101:

Forgot to ask for the error you were seeing. :blush:

Can you show us the error your getting?

This is the error I get:

1062 Duplicate entry '1-1' for key 'PRIMARY'
in:
[insert into bop_products_options_values (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order) values ('1', '1', 'of 1', '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.

6 Aug 2011, 11:02 PM
#5
jfenn avatar

jfenn

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Re: Can't add option values

I should also add that I've set up a zen store before & don't understand why this isn't working for me.

All of my products are digital and will be downloaded right after payment.

I wanted my option names/values to be like:

Download 1 of 1

I had it set up like this before at another store but can't get it to do this here.

Thanks.

8 Aug 2011, 11:13 PM
#6
jfenn avatar

jfenn

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Re: Can't add option values

Does anyone know how to help me set this up?

8 Aug 2011, 11:28 PM
#7
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Can't add option values

jfenn:

Does anyone know how to help me set this up?

Edited*** I seen Ajeh Replying..

8 Aug 2011, 11:30 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Can't add option values

Go to phpMyAdmin and see if you have any records in the table:
products_options_values

If not, then click on SQL and run:

TRUNCATE products_options_values;

Next, in the SQL run:

INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');

See if this clears up the problem ...

NOTE: if your tables use database prefixes you will need to add it to the table name on these ...

8 Aug 2011, 11:45 PM
#9
jfenn avatar

jfenn

New Zenner

Join Date:
Jun 2008
Posts:
19
Plugin Contributions:
0

Re: Can't add option values

Ajeh:

Go to phpMyAdmin and see if you have any records in the table:
products_options_values

If not, then click on SQL and run:

Next, in the SQL run:

See if this clears up the problem ...

NOTE: if your tables use database prefixes you will need to add it to the table name on these ...

Thanks to both of you!!!

Ajeh, I did what you said & now it works just fine :clap:

Thanks again!

8 Aug 2011, 11:55 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Can't add option values

Thanks for the update that this was able to correct the problem ... :smile:

11 Aug 2011, 11:37 PM
#11
sigmali avatar

sigmali

New Zenner

Join Date:
Jun 2011
Posts:
11
Plugin Contributions:
0

Re: Can't add option values

Ajeh:

Go to phpMyAdmin and see if you have any records in the table:
products_options_values

If not, then click on SQL and run:

Next, in the SQL run:

See if this clears up the problem ...

NOTE: if your tables use database prefixes you will need to add it to the table name on these ...

I was able to run the first part in the SQL but when i ran the second part it gave me an error

"1062 Duplicate entry '0-1' for key 1
in:
[INSERT INTO zen_products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');]
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."

what does that mean?

It did however fixed the initial problem but now I have a new one I can't seem to 'insert' attribute to any product at all. I was able to set up name and value but when i try to insert it into a product it just load me back to the home page and the attribute is not added.

12 Aug 2011, 2:28 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Can't add option values

If you look in the table:
zen_products_options_values

do you see one for:
products_options_values_name

with the TEXT value?

What version of Zen Cart are you running?

Clean install or an Upgrade?

12 Aug 2011, 7:32 PM
#13
sigmali avatar

sigmali

New Zenner

Join Date:
Jun 2011
Posts:
11
Plugin Contributions:
0

Re: Can't add option values

Ajeh:

If you look in the table:
zen_products_options_values

do you see one for:
products_options_values_name

with the TEXT value?

What version of Zen Cart are you running?

Clean install or an Upgrade?

yes it is set to TEXT

I have 1.3.9h althought I have in frustration tried to install the 1.5 beta hoping it might fix the problem. I also have dual pricing installed.