Jump to content
Sign in to follow this  
nico1814

Multi images extra contribution

Recommended Posts

Hi,

 

I am having the following error message appear on my products pages:

 

 

_______________________________________________________________

1146 - Table 'mysql210ec49b33904e7949b3291ef85.TABLE_PRODUCTS_IMAGES' doesn't exist

 

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pi.products_image1, pi.products_image2, pi.products_image3, pi.products_image4, pi.products_image5, pi.products_image6, pi.products_image7, pi.products_image8, pi.products_image9, 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,TABLE_PRODUCTS_IMAGES pi WHERE p.products_status = '1' AND p.products_id = '24' AND pd.products_id = p.products_id AND pi.products_id = p.products_id AND pd.language_id = '1'

 

[TEP STOP]

 

_______________________________________________________________

 

 

I have installed everything that are in your directions. I have double checked everything.

 

HELP PLEASE!

Share this post


Link to post
Share on other sites

Thank you for nice contribution. You should add this code to check for additional images or you will have problem with preview in admin area

 

$check_query = tep_db_query("SELECT count(*) from " . TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_IMAGES." pi WHERE p.products_id = pi.products_id");

$check = tep_db_fetch_array($check_query);

if ($check['total'] < '1') {

// there is no additional images

$product_query = tep_db_query("SELECT p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . $HTTP_GET_VARS['pID'] . "'");

} else {

// there are additional images

$product_query = tep_db_query("SELECT p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, pi.products_image1, pi.products_image2, pi.products_image3, pi.products_image4, pi.products_image5, pi.products_image6, pi.products_image7, pi.products_image8, pi.products_image9, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id FROM ".TABLE_PRODUCTS." p, ". TABLE_PRODUCTS_DESCRIPTION." pd, ". TABLE_PRODUCTS_IMAGES." pi WHERE p.products_id = pd.products_id AND p.products_id = pi.products_id AND p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

}

 

 

 

 

Add this before

$product = tep_db_fetch_array($product_query);

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

 

trying to make it work with header tags control contribution.... it change the same queries.

Share this post


Link to post
Share on other sites
Hi,

 

I am having the following error message appear on my products pages:

_______________________________________________________________

1146 - Table 'mysql210ec49b33904e7949b3291ef85.TABLE_PRODUCTS_IMAGES' doesn't exist

 

 

Yes, sorry but several bug and missing files in my first post :-(

 

This error message follows the missed definition of tables in catalog\admin\includes\database_tables.php

 

I've just sent a new complete archive tagged "Multi images extra 1.02" with all corrects and patches.

 

 

Nico

Share this post


Link to post
Share on other sites

I have the contribution 'On the Fly' Auto Thumbnailer using GD Library installed. Can I install also this contribution for more pictures? Do they work together?

Could it be possible to use GD libraries also for the extra images?

Share this post


Link to post
Share on other sites

Hello,

 

thanks for this great contribution. I have a problem with the product_info page.

 

It only shows the product's price, description etc. if there is set an extra image! If I have a product without or with only one image it doesn't show the price, description etc.!

 

But if I have added at least two pictures, it shows everything correctly! I don't understand that!

 

Can you help me?

Share this post


Link to post
Share on other sites
Hello,

 

thanks for this great contribution. I have a problem with the product_info page.

 

It only shows the product's price, description etc. if there is set an extra image! If I have a product without or with only one image it doesn't show the price, description etc.!

 

But if I have added at least two pictures, it shows everything correctly! I don't understand that!

 

Can you help me?

 

I've had the same problem. However, I noticed that if you go into to "edit" one of your products that currently has one picture, click "preview" (without really editing anything), and then "update", the product then displays correctly. Not sure why this works, but it does. If you have hundreds of products, this could take some time, but it does fix the problem.

Share this post


Link to post
Share on other sites

Got everything working, except that when I click on any of the additional images to enlarge, I get this error:

 

1054 - Unknown column 'pi.products_image' in 'field list'

 

SELECT pd.products_name, pi.products_image FROM products_images pi, products p, products_description pd WHERE p.products_id = pd.products_id AND p.products_id = pi.products_id AND p.products_status = '1' AND p.products_id = '107' AND pd.language_id = '1'

 

[TEP STOP]

 

This does not happen on the main image when clicking on it to enlarge. Anybody?

Share this post


Link to post
Share on other sites

Hello Nico,

 

thanks for this contribution!

 

It works and I?m glad about it! But I have a question:

 

Is it possible to add the extra Pictures to the product listing box? I?m not good in scripting PHP so far, so maybe you have a Tip how that can be work.

 

Thanks a lot,

 

Chriss

Share this post


Link to post
Share on other sites

Hello

 

I'm having the following error in the admin:

 

images directory doesnt exit

 

I have create the folder /catalog/images/images_extra and allow full access (777)

 

Wat could be wrong...

Share this post


Link to post
Share on other sites

Thank you for this contribution!

 

I got everything working.... Whew!

 

But i did notice that i only had options to upload only 4 extra images. I believe there should be a total of extra 9 images that we can upload right?

 

Could you advise?

 

Maybe I did something wrong along the way or something???

Share this post


Link to post
Share on other sites

oh, managed to find out... i have to set the no. of extra images i want in the admin part. no prob now. love it!

Share this post


Link to post
Share on other sites

How about the contibution 'On the Fly' Auto Thumbnailer using GD Library. Does it work together with this contribution?

Share this post


Link to post
Share on other sites

Hi; I'm having a problem; I'd follow the step and install the ver. 1.02 but when I try to go to my admin it shows

Parse error: parse error, unexpected $ in /home/phoenixt/public_html/osCommerce/catalog/admin/includes/functions/database.php on line 170; but line 170 is the end of the page; anyone can help???

Share this post


Link to post
Share on other sites

Hello,

 

I just finished this long installation and now I'm getting this error:

 

 

Parse error: parse error, unexpected '}' in /home/triadpro/public_html/catalog/catalog/product_info.php on line 288

 

Please advise me some help someone. My company is going to have my head if I can't fix this fast!

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Yes, I have the same problem too. Your solution saves me big time in figuring out what could have gone wrong.

 

Thanks a lot!

 

BTW, GREAT CONTRIBUTION!

 

I've had the same problem. However, I noticed that if you go into to "edit" one of your products that currently has one picture, click "preview" (without really editing anything), and then "update", the product then displays correctly. Not sure why this works, but it does. If you have hundreds of products, this could take some time, but it does fix the problem.

Share this post


Link to post
Share on other sites

Hi,

 

Ive had this installed for a while, is it possible to change the position of the images. ie. at the moment its located on the right, would it be possible to swap sides to the left or better still have the list on the bottom of the product info page.????

 

 

I use firefox 1.5 and when im testing sometimes the popup doesnt show the entire image... is this right? does anyone else have this??

Share this post


Link to post
Share on other sites

hello, my problem with this contrib v 1.02:

pictures will be uploaded, but not written into the sql database table products_images.

if i add the picture manually into the table, all works fine and will be shown in the product page and i also

can delete images.

i`ve checked the modified files a several times, i`ve loaded up the categories.php from the contrib for testing but nothing changed, so the error is in another file. any ideas???

Share this post


Link to post
Share on other sites

Where did you send the corrections to? I just downloaded the contribution and installed it and i am getting the same error.

Share this post


Link to post
Share on other sites

I think I need some help or more info about adding the database registers too, or at least could someone point me to info about how to go about it?

 

Thanks for any help!

Share this post


Link to post
Share on other sites

Do I need to add these registers using my server somehow or do I need to edit a file in oscommerce? I'm a bit lost.

 

this part :

 

2) Run this 2 query on your db(please note that the original table 菟roducts・is not affected):

CREATE TABLE `products_images` (

`products_id` int(11) NOT NULL auto_increment,

`products_image1` varchar(64) default NULL,

`products_image2` varchar(64) NOT NULL default '',

`products_image3` varchar(64) NOT NULL default '',

`products_image4` varchar(64) NOT NULL default '',

`products_image5` varchar(64) NOT NULL default '',

`products_image6` varchar(64) NOT NULL default '',

`products_image7` varchar(64) NOT NULL default '',

`products_image8` varchar(64) NOT NULL default '',

`products_image9` varchar(64) NOT NULL default '',

PRIMARY KEY (`products_id`)

);

 

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 (

'', 'Number of extra images', 'NB_IMAGE_EXTRA', '4', 'Number of extra images (0 to 9)', '4', '9', NULL , '2006-04-17 14:10:42', NULL , NULL

);

 

2 query? huh?

Edited by chimera15

Share this post


Link to post
Share on other sites

Alright, I think I got it, the language confused me a little, it should read "insert these two queries into your database using the sql database query tool on your server" I think?

 

Anyway, thanks :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×