Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using phpMyAdmin to load columns controller


Sam Hobbs

Recommended Posts

I am trying to install the Column Controller w Admin v2.1. I think it is installed, except I encountered an error loading the database. I used phpMyAdmin to load the one record for the configuration_group table; it worked. I then selected the configuration table and then copied and pasted the SQL (provided with the contribution) to insert to that table. I got an error; the following is most of it:

 

Error

 

SQL-query : 

 

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )

VALUES ( 182, 'Currencies Box', 'BOX_CURRENCIES_IS_ON', 'true', 'Would you like to display the Currencies Box?', 400, 40, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', 'tep_cfg_select_option(array(''true'', ''false''),' )

 

MySQL said:

 

 

#1062 - Duplicate entry '182' for key 1

 

I assume the answer is simple but if I can get a little help then I do appreciate that. Note that this was the first and only time I tried to execute that SQL.

Link to comment
Share on other sites

see this post Click

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Thank you, I will try that.

 

I assume my question got moved; I had forgotten about this other forum.

 

Now that I look at the SQL, I see that there are about 39 records that got inserted preceding the one that got the error. I assume that I need to remove the hard-coded configuration_id for the remaining few records also.

 

I also assume that the hard-coded configuration_id values (182-186) do not need to be hard-coded; I hope so. I did understand that the error message is saying that the configuration_id already exists, but I was not sure what to do about it.

Link to comment
Share on other sites

I dont know about questions being moved, it just happened that I had just finished giving a post on the exact same error to someone else, when you happened to make your post so I thought it was quicker to send you to that reply.

 

yes you can treat them in the same fashion as the one in the post or you can manually change the numbers to have all of the queries id to run consecutive.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Well, thank you for the help. I did try to find previous answers, but I limited the search and did not search this forum. So I would not have found the (your) other answer.

 

So the remaining records are now inserted and the Column Controller seems to be working now. My modifications to column_left.php and column_right.php are gone, of course; I expected that. So now I have my columns reset to the defaults and now I can proceed to modify the columns using the Column Controller. The Column Controller is under the Administration Tools, so as I said, it seems to be working.

 

This contribution does add some useful flexibility. I wonder if it can be generalized further; I see that there is coding that is specific to each box that perhaps could be generalized somehow. That is another possible project for me to add to my long list of things to try.

Link to comment
Share on other sites

The position would not be afffected in the admin as this is relative to configuration_group table rather than the configuration table to which the error was reporting. ;)

 

It may not have shown in your search as there was not that much time between the other posting and your own post.

 

Anyway glad that you have things in hand now and good luck with your moding :D

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

do you have these entries:

 

 

Would you like to display the Currencies Box?

In which column would you like to display the Currencies Box?

Would you like to display the Currencies Box?

Which Banner Group would you like to display in the Right Banner Box?

In which column would you like to display the Right Banner Box?

 

If not then you will need to run this sql queries.

 

this is because there is more of the sql file that has not been run.

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Currencies Box Column?', 'BOX_CURRENCIES_COLUMN', 'right', 'In which column would you like to display the Currencies Box?', 400, 41, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', 'tep_cfg_select_option(array(''left'', ''right''),');
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Right Banner Box', 'BOX_BANNER_RIGHT_IS_ON', 'false', 'Would you like to display the Currencies Box?', 400, 42, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Right Banner Group', 'BANNER_RIGHT_GROUP_IS', '100X100', 'Which Banner Group would you like to display in the Right Banner Box?', 400, 43, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '');
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Right Banner Box Column?', 'BOX_BANNER_RIGHT_COLUMN', 'right', 'In which column would you like to display the Right Banner Box?', 400, 44, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', 'tep_cfg_select_option(array(''left'', ''right'', ''both''),');

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I have those entries. The problem is the existance of the php file, not the configuration data. See Configuration.png

for a snapshot of the bottom portion of my configuration data. That portion only shows a portion of my Column Controller tool page but it shows the relevant portion.

 

The problem I encountered next is described in the other thread.

Edited by Sam Hobbs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...