Forums / Setting Up Categories, Products, Attributes / Cannot Define Attributes for Products

Cannot Define Attributes for Products

Results 1 to 15 of 15
08 Apr 2011, 11:24
#1
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Cannot Define Attributes for Products

Version: v1.3.9h
Clean install, no addons, not very customized! I'm very new to this and am just finding my feet.

I am just getting round to adding product attributes to my products. I will be, mostly, using drop downs and text boxes.

I have added an Option Name - 'Text required' and I do not need to edit that.

I don't know if this is relevant, but, when I go to the 'Attributes Controller' I see my categories in the drop down menu and all my sub categories are marked with an asterisk.

When I choose the product to add the attribute to I select the attribute, press insert and all I get is 'No Attributes Defined for Product'.

Last week I had a go adding a text box and I could. When I tried to add a dropdown box I got the error '1062 Duplicate entry '1-1' for key 1'. I found this thread and followed it: http://www.zen-cart.com/forum/showthread.php?t=169035

Any help would be appreciated.
08 Apr 2011, 12:10
#2
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

Daisy606:

Version: v1.3.9h
Clean install, no addons, not very customized! I'm very new to this and am just finding my feet.

I am just getting round to adding product attributes to my products. I will be, mostly, using drop downs and text boxes.

I have added an Option Name - 'Text required' and I do not need to edit that.

I don't know if this is relevant, but, when I go to the 'Attributes Controller' I see my categories in the drop down menu and all my sub categories are marked with an asterisk.

When I choose the product to add the attribute to I select the attribute, press insert and all I get is 'No Attributes Defined for Product'.

Last week I had a go adding a text box and I could. When I tried to add a dropdown box I got the error '1062 Duplicate entry '1-1' for key 1'. I found this thread and followed it: http://www.zen-cart.com/forum/showthread.php?t=169035

Any help would be appreciated.

Just to add:

I have added a text box in 'Option Name Manager'. I have gone into 'Attribute Controller' and get the message in a yellow bar at the top of the screen saying: 'No Option Values have been defined'
10 Apr 2011, 14:39
#3
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

If you go into phpMyAdmin and browse the table:
products_options_values

Do you have a setting for:
products_options_values_id 0
language_id 1
products_options_values_name TEXT
products_options_values_sort_order 0

Do you have any add ons?
10 Apr 2011, 14:52
#4
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

I have two database set up, zc1 and zc2.

When I first tried to install zencart I had issues and my host provider's support set up databases and I do not know which one is my shop.

Is there any way I can find out?
10 Apr 2011, 15:04
#5
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

Look at your two configure.php files on the server:
/includes/configure.php
/adin/includes/configure.php

and that will tell you the database that you are using ...
10 Apr 2011, 15:13
#6
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

Thanks, I have figured out my database.

Now there is no 'products_options_values' just 'zen_products_options_values'.

Is that what you mean?
10 Apr 2011, 15:19
#7
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

That is the table ... the zen_ means you are using Database Prefixes on the database tables ...
10 Apr 2011, 15:48
#9
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

You need to have one record with the settings I posted ... this is a built in setting ...

If you browse the table and do not find one you need to run the following in your Tools ... Install SQL Patches ...
INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');


Also check the table:
products_options_types

in your case this will be:
zen_products_options_types

and see what records show up there for the Option Name types ...
10 Apr 2011, 16:26
#11
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

Do you have the TEXT record in:
products_options_values
10 Apr 2011, 17:09
#12
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

I ran the "INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');" in Install SQL Patches.

Here is products_options_values again:
http://www.anniesgifts.co.uk/images/table1.jpg
10 Apr 2011, 17:28
#13
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

Ajeh:

You need to have one record with the settings I posted ... this is a built in setting ...

If you browse the table and do not find one you need to run the following in your Tools ... Install SQL Patches ...


Also check the table:
products_options_types

in your case this will be:
zen_products_options_types

and see what records show up there for the Option Name types ...


Daisy606:

I ran the "INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');" in Install SQL Patches.

Here is products_options_values again:
http://www.anniesgifts.co.uk/images/table1.jpg


I think I'm fixed! Is there anything else that I should do?
10 Apr 2011, 17:30
#14
ajeh avatar

ajeh

Oba-san

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

Re: Cannot Define Attributes for Products

Most likely that missing record was the cause of not being able to work with the Option Names that were Option Type TEXT as there was no value for it to work with ...
10 Apr 2011, 17:32
#15
daisy606 avatar

daisy606

New Zenner

Join Date:
Apr 2011
Posts:
10
Plugin Contributions:
0

Re: Cannot Define Attributes for Products

Thank you very much for your quick replies and all of your help.