Zen Cart Logo
Forums / General Questions / 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Locked

Views: 2,475

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
9 Apr 2007, 12:24 AM
#1
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Hi,

I tried to run the column_layout_grid.sql file on my admin but I got the following message. What should I do?

1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2
in:
[INSERT INTO zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Product Listing - Layout Style', 'PRODUCT_LISTING_LAYOUT_STYLE', 'rows', 'Select the layout style:
Each product can be listed in its own row (rows option) or products can be listed in multiple columns per row (columns option)', '8', '40', NULL, now(), NULL, 'zen_cfg_select_option(array('rows', 'columns'),');]

9 Apr 2007, 1:13 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Sounds like you already loaded the sql for this and are trying to do it again ...

Check your database configuration table and see if the configuration_keys are already in the configuration table that the sql file wants to load ...

If so, either delete and reload the sql or just make sure none have been missed ...

9 Apr 2007, 1:45 AM
#3
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Hi Ajeh,

Thanks for your help. How do I check my database configuration table and see if the configuration_keys are already in the configuration table that the sql file wants to load?

For your information, I was using the column layout grid display in v1.2.7 and it worked well. I did a test upgrade to v1.3.7 and loaded two the column layout grid files. At first I thought I could skip the step of loading the sql file seeing that it seemed to work for displaying product in grids. But I found out that the category grid view is not working. The last column is not in alignment with the first two (in other words the third one is below the first two). To try and solve the problem, I reinstalled this module by reloading the two files and running the sql file. But I got this 1062 duplicate message. Any idea on how to solve this problem?

9 Apr 2007, 1:49 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Go to your phpMyAdmin and browse the configuration table ...

Sort on the configuration_key and you can scroll through and see what all is already in there ...

Or, you can also use the Tools ... Developer's Tool Kit in your Zen Cart Admin and in the top input box enter a configuration_key such as:
PRODUCT_LISTING_LAYOUT_STYLE

It will locate for you if this is in either the configuration table or the zen_product_type_layout table and show you the value as well as give an edit button to locate it if found ...

9 Apr 2007, 1:59 AM
#5
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Hi Ajeh,

I did a search in the Developer's Tool Kit and got the following. Below this has two buttons, Edit and Reset. What should I do next?

Lookup CONSTANT Definitions
Key: PRODUCT_LISTING_LAYOUT_STYLE
Title: Product Listing - Layout Style
Description: Select the layout style:
Each product can be listed in its own row (rows option) or products can be listed in multiple columns per row (columns option)
Value: columns
Group: ID#8 Product Listing

9 Apr 2007, 2:57 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

That tells you that configuration_key is already in the database table ... hit EDIT and it will take you to where in the Configuration settings it is hidding ...

Reset just takes you back to the list ...

9 Apr 2007, 3:13 AM
#7
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Hi Ajeh,

When I hit Edit, it brought me to Configuration > Product Listing page, where Product Listing - Layout Style field is highlighted. At the moment it is set to Columns. Do I change it to Rows for now and then run the sql again?

9 Apr 2007, 3:31 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

No ... this tells me that the configuration_key that you are trying to add from the sql file that came with the add-on already is in your configuration table ...

If you open that sql file with a TEXT editor, you can look up the other configuration_keys in the same way to make sure that they are all loaded ...

Check on the contribution support thread for this add-on for additional details ...

11 Apr 2007, 3:18 AM
#9
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: 1062 Duplicate entry 'PRODUCT_LISTING_LAYOUT_STYLE' for key 2

Hi Ajeh,

I found out that I didn't have to reload the sql file as it is already there. Eventually I solve the issue as mentioned in the following thread. Thanks.

http://www.zen-cart.com/forum/showthread.php?t=62413