Zen Cart Logo

Option Value Error

Views: 2,290

Results 1 to 11 of 11
3 Jul 2014, 6:22 PM
#1
dfp111 avatar

dfp111

New Zenner

Join Date:
Nov 2013
Location:
Canada
Posts:
5
Plugin Contributions:
0

Option Value Error

I am setting up a digital scrapbook store and some products have multiple downloads.

I have added Option Name: Download 1 with radio button and order 10.

When I try to add Option Value ie: zip 1 of 6, download 1, or even zip 1 of 6, I get the following error:

WARNING: An Error occurred, please refresh the page and try again.

I have followed http://www.zen-cart.com/content.php?113-how-do-i-make-products-downloadable
to no avail.

Just keep getting the same error.

Please help.

3 Jul 2014, 7:17 PM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,798
Plugin Contributions:
22

Re: Option Value Error

Check the error logs and see what's causing it. You can find it in store_root/logs, looks something like myDEBUG-XXXXXXXX.log
You can post the contents of the file here (please wrap it with the CODE tags) and someone might be able to assist.

3 Jul 2014, 7:18 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: Option Value Error

When you see "WARNING: An Error occurred, please refresh the page and try again.", there's a debug log that gives you more information (like what the errant SQL statement was). When you post the contents of the debug log, make sure to obfuscate your admin folder's name!

3 Jul 2014, 7:39 PM
#4
dfp111 avatar

dfp111

New Zenner

Join Date:
Nov 2013
Location:
Canada
Posts:
5
Plugin Contributions:
0

Re: Option Value Error

I am not sure where the debug logs are found in my shop, but I got this from my "log" folder via ftp.

[[03-Jul-2014 19:23:57 UTC] PHP Fatal error: 1062:Duplicate entry '1-1' for key 'PRIMARY' :: insert into zc_products_options_values
(products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order)
values ('1',
'1',
'zip 1',
'0') in /home/memo92005/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120|

Here is another one from today:

[[03-Jul-2014 19:11:37 UTC] PHP Fatal error: 1062:Duplicate entry '1-1' for key 'PRIMARY' :: insert into zc_products_options_values
(products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order)
values ('1',
'1',
'zip [1 of 6]',
'10') in /home/memo92005/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120]

3 Jul 2014, 7:45 PM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,798
Plugin Contributions:
22

Re: Option Value Error

Are you sure you're using Zen Cart 1.5.1 and not 1.5.0? This was a known problem on 1.5.0, but was fixed in 1.5.1. See the related thread here. Solution is also posted there - no need to copy/paste here. :smile:

3 Jul 2014, 7:48 PM
#6
dfp111 avatar

dfp111

New Zenner

Join Date:
Nov 2013
Location:
Canada
Posts:
5
Plugin Contributions:
0

Re: Option Value Error

Yes I am. Here is a snippit:

Attachment 14232

3 Jul 2014, 8:20 PM
#7
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,798
Plugin Contributions:
22

Re: Option Value Error

You could still try the solution posted there... :smile:

3 Jul 2014, 8:22 PM
#8
dfp111 avatar

dfp111

New Zenner

Join Date:
Nov 2013
Location:
Canada
Posts:
5
Plugin Contributions:
0

Re: Option Value Error

I see the fix, but where where does it go?

Please help a newbie out... thanks

3 Jul 2014, 9:36 PM
#9
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,798
Plugin Contributions:
22

Re: Option Value Error

You can run it from admin->Tools->Install SQL Patches. Please note that this will completely wipe your option values table, including all data you already set up. Make sure you do a database backup prior to running this script!!! It can be done from your cPanel and/or phpMyAdmin (which you can also find in cPanel).

Regards,
Leonard

4 Jul 2014, 3:50 PM
#10
dfp111 avatar

dfp111

New Zenner

Join Date:
Nov 2013
Location:
Canada
Posts:
5
Plugin Contributions:
0

Re: Option Value Error

I am not sure what you mean to run? Is it a script?

Can you point me in the right direction.

Thanks

balihr:

You can run it from admin->Tools->Install SQL Patches. Please note that this will completely wipe your option values table, including all data you already set up. Make sure you do a database backup prior to running this script!!! It can be done from your cPanel and/or phpMyAdmin (which you can also find in cPanel).

Regards,
Leonard

4 Jul 2014, 6:46 PM
#11
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,798
Plugin Contributions:
22

Re: Option Value Error

Well, it's an SQL command that you need to run. So, go to Tools->Install SQL Patches, paste the following code in the text area:

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

and then click the "send" button. That's all.

Just make sure you backup your database first!