Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

More Pics 6, V1.3b/1.2c


ColorsbyLiza

Recommended Posts

Posted

Been trying to work this out for the past 3 days. :'(

 

I recently installed (first) "more pics V1.3b" and since I got errors I then installed "more pics V1.2c". Both versions gave me the same outcome.

 

The issues are as follows...

 

1. MYSQL gave me this error:

 

Error

SQL query:

ALTER TABLE `products` ADD `products_subimage1` VARCHAR( 64 ) AFTER `products_image` ;

MySQL said: Documentation
#1060 - Duplicate column name 'products_subimage1' 

 

2. The Catalog page shows the thumbnail image, but when I click on it I go to product_info.php page with the product desription, no image appering here. But when I click the "review button" on the bottom, I get the thumbnail image and the "click to enlarge" button which opens the popup window with the arrows and images. :'(

 

3. In the admin area there is a "More Pics" tab, but no pics displayed.

 

4. The "remove image" function in admin, product update doesnt work.

 

 

Please,please,please....I need your help. :'(

Posted

Hi Liza,

 

The SQL error means you have tried to input the same query twice. The other errors I am not sure about offhand but I just installed More Pics 6 on a new store and it worked fine. You have probably not installed it correctly. Did you merge all the files in the contribution with your own, as well as add the two other code snips?

Posted
Hi Liza,

 

The SQL error means you have tried to input the same query twice. The other errors I am not sure about offhand but I just installed More Pics 6 on a new store and it worked fine. You have probably not installed it correctly. Did you merge all the files in the contribution with your own, as well as add the two other code snips?

 

 

Hello again Peter!

 

Thanks for responding. Sad to say I just did just check and made sure that I wasn't wasting any body's time.

 

So, I shouldn't worry about the SQL.

 

I actually used windiff and saw there was not to many differences and proceeded to just copy-over/ transfer the files that came with the package. So, for now I still have the same problem. Except, I guess the SQL.

 

 

<_<

Posted

You do have perplexing problems, don't you? :huh:

 

Liza, go into your database and make sure you have the 6 new subimage columns in the products table. We should check that is ok first.

 

I'm not here for a few hours but I'll check back later. Let's see if we can achieve that eureka moment on this one. ;)

Posted
You do have perplexing problems, don't you? :huh:

 

Liza, go into your database and make sure you have the 6 new subimage columns in the products table. We should check that is ok first.

 

I'm not here for a few hours but I'll check back later. Let's see if we can achieve that eureka moment on this one. ;)

 

Yup, I sure know how to mess them up big time. :blush:

 

The data base hase the the 6 subimage in the products table. But looking through the 'More Pics' thread, I saw a screen shot of the admin/configuration/more pics table which is supposed to have like a control panel. Mine is totally blank. No on/off switch or anything.

 

Now I'm thinking maybe it's the multiple times I tried to load the "database_additional" to mysql. Knowing absolutely nothing about the way php works, I just kept on loading the text everytime i changed or reloaded files to see if it changed the error. :blush: What do you think? If it is, is there any way to reverse this? (I'm really hoping you say yes). :'(

 

Keeping my fingers crossed....

 

Liza

Posted

Oh, also, as I was reading though the same thread, someone had the same else had the same error message the the contributer (surfalot) gave this code to reverse it. Of course I tried it and got a different error. :blink:

 

The FIX IT code:

DELETE FROM `configuration` WHERE `configuration_group_id` = 6124;
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Show All MorePics on Product Info page', 'MOPICS_SHOW_ALL_ON_PRODUCT_INFO', 'true', 'Show All extra images from the MorePics contrib on Product Info page.', 6124, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Use SMALL_IMAGE_ Restrictions', 'MOPICS_RESTRICT_IMAGE_SIZE', 'true', 'Restrict product images to SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT values.', 6124, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Table Alignment', 'MOPICS_TABLE_ALIGNMENT', 'right', 'Align Pics table to the left or to the right of the products description.', 6124, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''left'', ''right'', ''center''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Table Location', 'MOPICS_TABLE_LOCATION', 'sides', 'Align Pics table to the sides, above or below description.', 6124, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''sides'', ''above'', ''below''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Number of Columns', 'MOPICS_NUMBER_OF_COLS', '1', 'Number of columns to display.', 6124, NULL, now(), now(), NULL, NULL);
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Number of Rows', 'MOPICS_NUMBER_OF_ROWS', '2', 'Number of rows to display.', 6124, NULL, now(), now(), NULL, NULL);

 

The ERROR code:

 

Error

SQL query: Documentation

INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Show All MorePics on Product Info page', 'MOPICS_SHOW_ALL_ON_PRODUCT_INFO', 'true', 'Show All extra images from the MorePics contrib on Product Info page.', 6124, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);

MySQL said: Documentation
#1062 - Duplicate entry '0' for key 1 

Posted
the contributer (surfalot) gave this code to reverse it. Of course I tried it and got a different error. :blink:

 

:lol: :lol: :lol:

 

Well, there's nothing wrong with that query, other than it has a couple of rows missing. It was probably from a while back.

 

Being as that query stopped, that is probably why you have nothing showing admin side. Do you have a backup set of files and database backup from before attempting this mod?

Posted

Well, yes I did. :rolleyes:

 

Now, another question.... (but of course). The admin is suggesting to use the mysql to restore "after unpacking from the archive". :huh: Do I just hit restore in the mysql for the last backup and that's it? I seem to remember doing this the last complicated issue around and it didn't restore my files, which is why this is actually a second package I am working on.

 

Oh, also is there anyway to duplicate my store, do you think I need to do this? I have 300gb with server.

 

Again, thank you so much Peter for your time. :)

Posted

I just tried to restore my backup, and the backup didn't seem to change anything. The database still has the 6 sub_images and the website is still the same. :wacko: :(

Posted

Woops!

 

A little premature there... I now get this message:

1054 - Unknown column 'p.products_subimage1' in 'field list'

select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name

 

What do I do now? :'( :'(

Posted

Doh!!!

 

Actually, it would seem you have removed the fields ok so lets try the query again. Run this from phpmyadmin:

 

ALTER TABLE `products` ADD `products_subimage1` VARCHAR(64) AFTER `products_image`;
ALTER TABLE `products` ADD `products_subimage2` VARCHAR(64) AFTER `products_subimage1`;
ALTER TABLE `products` ADD `products_subimage3` VARCHAR(64) AFTER `products_subimage2`;
ALTER TABLE `products` ADD `products_subimage4` VARCHAR(64) AFTER `products_subimage3`;
ALTER TABLE `products` ADD `products_subimage5` VARCHAR(64) AFTER `products_subimage4`;
ALTER TABLE `products` ADD `products_subimage6` VARCHAR(64) AFTER `products_subimage5`;

INSERT INTO `configuration_group` (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (6124, 'More Pics', 'Configuration Options for More Pics', 20, 1);

INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Show All MorePics on Product Info page', 'MOPICS_SHOW_ALL_ON_PRODUCT_INFO', 'true', 'Show All extra images from the MorePics contrib on Product Info page.', 6124, 2, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Group parent image with sub-images', 'MOPICS_GROUP_WITH_PARENT', 'false', 'Set to true to group all images with parent (original) image.', 6124, 4, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Use SMALL_IMAGE_ Restrictions', 'MOPICS_RESTRICT_IMAGE_SIZE', 'true', 'Restrict all product images to SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT values.', 6124, 6, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Restrict parent image size', 'MOPICS_RESTRICT_PARENT', 'false', 'Restrict parent image size to SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT values. This setting overrides "Use SMALL_IMAGE_ Restrictions" setting.', 6124, 8, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Table Alignment', 'MOPICS_TABLE_ALIGNMENT', 'center', 'Align Pics table to the left or to the right of the products description.', 6124, 10, now(), now(), NULL, 'tep_cfg_select_option(array(''left'', ''right'', ''center''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Table Location', 'MOPICS_TABLE_LOCATION', 'below', 'Align Pics table to the sides, above or below description.', 6124, 12, now(), now(), NULL, 'tep_cfg_select_option(array(''sides'', ''above'', ''below''),');
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Number of Columns', 'MOPICS_NUMBER_OF_COLS', '3', 'Number of columns to display.', 6124, 14, now(), now(), NULL, NULL);
INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ( 'Number of Rows', 'MOPICS_NUMBER_OF_ROWS', '2', 'Number of rows to display.', 6124, 16, now(), now(), NULL, NULL);

Posted

I got this error message:( :

 

 

Error

SQL query: Documentation

INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Show All MorePics on Product Info page', 'MOPICS_SHOW_ALL_ON_PRODUCT_INFO', 'true', 'Show All extra images from the MorePics contrib on Product Info page.', 6124, 2, now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);

MySQL said: Documentation
#1062 - Duplicate entry '0' for key 1 

Posted

Liza, can you check you configuration table and make sure the configuration_id is set for auto_increment.

Posted

Ok, run this SQL:

 

ALTER TABLE `products`  DROP `products_subimage1` ,
DROP `products_subimage2` ,
DROP `products_subimage3` ,
DROP `products_subimage4` ,
DROP `products_subimage5` ,
DROP `products_subimage6`;

 

Then this:

 

DELETE FROM `configuration` WHERE `configuration_group_id` =6124;

 

Then this:

 

DELETE FROM `configuration_group` WHERE `configuration_group_id` =6124;

 

Then run that SQL I posted before to put it all back again.

 

You could run it all together but this way should make sure it is all removed first. If you get an error saying a column doesn't exist, that is ok.

Posted

:rolleyes:

Okay, I can see your magic happening now. I FINALLY got the "more pics" table in the admin/configuration area. :D

 

I have these showing up:

 

how All MorePics on Product Info page true Info

Use SMALL_IMAGE_ Restrictions false Info

Table Alignment right Info

Table Location sides Info

Number of Columns 3

Number of Rows 2 Info

 

And this is the error in the product_info page.....

 

1054 - Unknown column 'p.products_subimage1' in 'field list'

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id = '18' and pd.products_id = p.products_id and pd.language_id = '1'

Posted

:D

I guess it won't be long now...

 

 

and this was what I got when I ran the mysql:

 

Your SQL query has been executed successfully
SQL query: DELETE FROM `configuration` WHERE `configuration_group_id` =6124;# MySQL returned an empty result set (i.e. zero rows).
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Show All MorePics on Product Info page', 'MOPICS_SHOW_ALL_ON_PRODUCT_INFO', 'true', 'Show All extra images from the MorePics contrib on Product Info page.', 6124, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);# Affected rows: 1
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Use SMALL_IMAGE_ Restrictions', 'MOPICS_RESTRICT_IMAGE_SIZE', 'true', 'Restrict product images to SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT values.', 6124, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);# Affected rows: 1
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Table Alignment', 'MOPICS_TABLE_ALIGNMENT', 'right', 'Align Pics table to the left or to the right of the products description.', 6124, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''left'', ''right'', ''center''),'
);# Affected rows: 1
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Table Location', 'MOPICS_TABLE_LOCATION', 'sides', 'Align Pics table to the sides, above or below description.', 6124, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''sides'', ''above'', ''below''),'
);# Affected rows: 1
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Number of Columns', 'MOPICS_NUMBER_OF_COLS', '1', 'Number of columns to display.', 6124, NULL , now( ) , now( ) , NULL , NULL
);# Affected rows: 1
INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'Number of Rows', 'MOPICS_NUMBER_OF_ROWS', '2', 'Number of rows to display.', 6124, NULL , now( ) , now( ) , NULL , NULL
);# Affected rows: 1

Posted

Actually, that isn't the SQL I posted. There should be 9 different queries on that bit, which explains why your admin is only showing 5 options instead of 8

Posted
No they are not there anymore, and so is the more pics column in admin.

 

Are you saying all the database updates you just made have vanished?

Posted

The sub_images are not under the table of products. And the more pics is not in the admin are anymore either. Do I start over?

Posted

not sure I know what you're referring to but the configuration table that says "more pics" in the admin area is not there.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...