Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi images extra contribution


nico1814

Recommended Posts

  • Replies 90
  • Created
  • Last Reply

Top Posters In This Topic

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!

Link to comment
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.

Link to comment
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

Link to comment
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?

Link to comment
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?

Link to comment
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.

Link to comment
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?

Link to comment
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

Link to comment
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???

Link to comment
Share on other sites

  • 2 weeks later...

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???

Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
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.
Link to comment
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??

Link to comment
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???

Link to comment
Share on other sites

  • 2 weeks later...

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
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...