Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

Hi,

 

This is a very cool contribution. I've installed the latest version and it works just fine! Thank everyone who made the efforts!!

 

I do have a question: I set the "Product Image behavior" to product_info.php. The placement I want is similar to Amazon - one big image on top and several thumbnails below the big image. The AI use the value of "Small Image Width" and "Small Image Height" set in Configuration -> Images. The small image size is 180x180 which is perfect for me for the index.php page presentation. However it's way too big to be displayed as thumbnail on product_info.php.

 

Is there any way to make the thumbnail size smaller (50x50 for product_info.php) but still keep 180x180 on index.php?

 

Thank you!!

unfortunately that is the way it is at present.

Share this post


Link to post
Share on other sites

unfortunately that is the way it is at present.

 

Thank you Surfealot! How about is it possible to use the setting of "Heading Image Width/Height" or "Subcategory Image Width/Height" instead of the "Small Image Width/Height"?

Share this post


Link to post
Share on other sites

Hi,

 

i have found an error in product_info.php

 

at line 244 find

 

// lightbox addon
?><script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_pop']) . '"target="_blank" rel="lightbox[group]"  title="'. $product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), addslashes($product_info['products_name']), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>

 

Replace by this

 

// lightbox addon
?><script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '"target="_blank" rel="lightbox[group]"  title="'. $product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), addslashes($product_info['products_name']), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>

 

I hope this can be help an other person.

 

Bye

Share this post


Link to post
Share on other sites

Seems to be nice contribution, something is not working at all, something is buggy...

 

but I was wondering:

 

If there is any normal installation instruction for this contribution?

 

Like step by step?

 

 

THX!


1) Backup before you make changes on osC.

2) Backup between addon installs on osC.

 

p.s. Usually you can meet me in osC chat for free help and advice ;)

Share this post


Link to post
Share on other sites

Seems to be nice contribution, something is not working at all, something is buggy...

 

but I was wondering:

 

If there is any normal installation instruction for this contribution?

 

Like step by step?

 

 

THX!

 

I don't think that there is anything that is not working at all. What do you mean?

 

Regarding buggy, it would be very constructive if you could report what bugs exactly you found

 

Installation step by step

Step 1 Run the sql file

Step 2 Upload all files from folder files to upload

 

Step 2 you open your file comparisson program

Step 3 you load your file to the left

Step 4 you load the addon file to the right (from folder files to compare)

Step 5 You merge from right to left whatever is marked with BOF EOF

Step 6 Save and upload you file

Repeat steps for all files in folder "files to compare"

 

If you think the "find this" replace that" way easier, or "normal", maybe you could write such a installation file after you are done, just an idea

Share this post


Link to post
Share on other sites

I don't think that there is anything that is not working at all. What do you mean?

 

Regarding buggy, it would be very constructive if you could report what bugs exactly you found

 

Installation step by step

Step 1 Run the sql file

Step 2 Upload all files from folder files to upload

 

Step 2 you open your file comparisson program

Step 3 you load your file to the left

Step 4 you load the addon file to the right (from folder files to compare)

Step 5 You merge from right to left whatever is marked with BOF EOF

Step 6 Save and upload you file

Repeat steps for all files in folder "files to compare"

 

If you think the "find this" replace that" way easier, or "normal", maybe you could write such a installation file after you are done, just an idea

 

I was thinking about that, but can`t get it run property... otherwise i would not ask... and Yes i was thinking about that - "find this" "replace that"


1) Backup before you make changes on osC.

2) Backup between addon installs on osC.

 

p.s. Usually you can meet me in osC chat for free help and advice ;)

Share this post


Link to post
Share on other sites

I was thinking about that, but can`t get it run property... otherwise i would not ask... and Yes i was thinking about that - "find this" "replace that"

 

The files are that clearly marked with BOF EOF that it is very easy to merge with a file comparison program.

 

PS By the way, that looks much more "normal" to me, question of taste probably

Share this post


Link to post
Share on other sites

Hi There,

 

I've been successfully using additional images v1 with ms2.2 for years now. I just upgraded from ms2.2 to rc2a and from mySQL 4 t5o mySQL 5. I couldn't upgrade to additional images v2 because I've completely restructured the product_info page and I couldn't get it to deconflict. v1 works fine from my customers perspective, but on the admin side, I can no longer upload new additional images. Here's the error messages I get when trying to add a second image (first one through normal OSC interface works fine, problem is when using the v1 "add image" button). Has anyone seen this before? I've posted the code snippets corresponding to the error messages at the bottom, but I realize it could actually be somewhere else. Any/all replys are appreciated - I've been working on this for many hours now, but my php and sql skills are both very limited.

 

Thanks in advance!

Adrienne

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/admin/categories.php on line 440

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/mysite/admin/includes/functions/database.php on line 55

 

Warning: Variable passed to each() is not an array or object in /home/mysite/admin/includes/functions/database.php on line 58

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/mysite/admin/includes/functions/database.php on line 62

 

Warning: Variable passed to each() is not an array or object in /home/mysite/admin/includes/functions/database.php on line 63

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') values)' at line 1

insert into additional_images) values)

 

categories.php line 440 code:

     case 'add_images':
       $products_id = $HTTP_GET_VARS['pID'];
       $add_images_error = true;
       if ($popup_images = new upload('popup_images', DIR_FS_CATALOG_IMAGES)) {
         $add_images_error = false;
         $sql_data_array = array('products_id' => tep_db_prepare_input($products_id),
                                 'images_description' => tep_db_prepare_input($HTTP_POST_VARS['images_description']),
                                 'popup_images' => tep_db_prepare_input($popup_images->filename));
         $sql_data_array = array_merge($sql_data_array, $add_data_array);
       }
       if ($add_images_error == false) {
         tep_db_perform(TABLE_ADDITIONAL_IMAGES, $sql_data_array);
       } else {
         $messageStack->add_session(ERROR_ADDITIONAL_IMAGE_IS_EMPTY, 'error');
       }
       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
       break;

 

database.php code:

 function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
   reset($data);
   if ($action == 'insert') {
     $query = 'insert into ' . $table . ' (';
     while (list($columns, ) = each($data)) {
       $query .= $columns . ', ';
     }
     $query = substr($query, 0, -2) . ') values (';
     reset($data);
     while (list(, $value) = each($data)) {
       switch ((string)$value) {
         case 'now()':
           $query .= 'now(), ';
           break;
         case 'null':
           $query .= 'null, ';
           break;
         default:
           $query .= '\'' . tep_db_input($value) . '\', ';
           break;
       }

Share this post


Link to post
Share on other sites

Hi there.

 

I have installed this add on today and everything looks to be ok, other than the category product listing page.

 

The images displayed in that table are showing full size so its obviously messing the layout up.

 

Can anyone help.

 

Thanks,

 

Craig


Craig Shaw

Linden Design

Share this post


Link to post
Share on other sites

I just tried to install this add-on, but I got stuck on 2_files_to_compare. I used Notepad++ to compare side by side, but I wasn't sure what to add in my original file :|

 

Please make some changing guide, like is for Featured Products , in this way will be more users happy with this add-on.

 

Here is a printscreen with one of many ambiguities: http://img689.imageshack.us/img689/9822/compared.jpg

 

What I need is a way to upload an additional (different !) image to show it on mouse over. Maybe is a more simple add-on for this? I really don't need everything what Additional Images Module offers.

I just installed Featured Products with tooltip.

 

Thank you.

Share this post


Link to post
Share on other sites

I just tried to install this add-on, but I got stuck on 2_files_to_compare. I used Notepad++ to compare side by side, but I wasn't sure what to add in my original file :|

 

Please make some changing guide, like is for Featured Products , in this way will be more users happy with this add-on.

 

Here is a printscreen with one of many ambiguities: http://img689.imageshack.us/img689/9822/compared.jpg

 

What I need is a way to upload an additional (different !) image to show it on mouse over. Maybe is a more simple add-on for this? I really don't need everything what Additional Images Module offers.

I just installed Featured Products with tooltip.

 

Thank you.

 

If i did all right this might be a solution for you!

 

here is a LINK for step by step instalation, i think i haven`t make any mistakes! ;) Cheers!


1) Backup before you make changes on osC.

2) Backup between addon installs on osC.

 

p.s. Usually you can meet me in osC chat for free help and advice ;)

Share this post


Link to post
Share on other sites

Still haven't gotten a solution to the images in the reviews section working with lightbox. This is a part of the contribution and it would be nice to have it working.

 

I have posted the code that I have in all 3 of the areas that this add-on isn't working and am hoping something can be pointed out as to why it isn't working. I have compared the files yet still the lightbox part isn't working.

 

I have the following code above if (!tep_db_num_rows($product_info_query)) {

 // BOF: Additional Images: Added: , p.products_image_med, p.products_image_pop, p.products_image_description
 $product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
 // EOF: Additional Images

 

 

 

I have the following above the </head> and I also have a setup without it but both are behaving the same

 

<?php if (ENABLE_LIGHTBOX == 'true') { ?>
<!-- BOF: Lightbox Contribution -->
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<link rel="stylesheet" href="lightbox/lightbox.css" type="text/css" media="screen">
<script type="text/javascript" src="lightbox/builder.js"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>
<!-- EOF: Lightbox Contribution -->
<?php } ?>
<?php // EOF: Additional Images ?>

 

 

 

 

And I have this code just below the line <?php if (tep_not_null($product_info['products_image'])) { ?>

 

<?php // BOF: Additional Images: ?>
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_ADD_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), addslashes($product_info['products_name']), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), $product_info['products_name'], (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>
</noscript>
<?php /* OLD CODE
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
*/
// EOF: Additional Images: ?>

Share this post


Link to post
Share on other sites

Then I try to set the option "Type" to product_info I get some style issues

 

westsideclothing.co.uk/alpha/product_info.php?products_id=127

 

If I set the option to popup the page is displayed like normal. i.e. navigation aligned with background.

 

Thanks

 

Ben

Share this post


Link to post
Share on other sites

Hi there.

 

I have installed this add on today and everything looks to be ok, other than the category product listing page.

 

The images displayed in that table are showing full size so its obviously messing the layout up.

 

Can anyone help.

 

Thanks,

 

Craig

 

you are missing the step "D" in the instructions: D. More FILES MODIFICATION (Search and Replace)

Share this post


Link to post
Share on other sites

I just tried to install this add-on, but I got stuck on 2_files_to_compare. I used Notepad++ to compare side by side, but I wasn't sure what to add in my original file :|

 

Please make some changing guide, like is for Featured Products , in this way will be more users happy with this add-on.

 

Here is a printscreen with one of many ambiguities: http://img689.images...22/compared.jpg

 

What I need is a way to upload an additional (different !) image to show it on mouse over. Maybe is a more simple add-on for this? I really don't need everything what Additional Images Module offers.

I just installed Featured Products with tooltip.

 

Thank you.

if you are looking for a mouseover, I believe this is the only images contribution that offers that kind of display. There are other simpler contributions that will do the additional images, but you will have to code the mouseover yourself.

 

you should get use to using a compare tool. once your shop gets to the point where using a compare tool seems difficult, doing a "find this, change that" method is impossible since the "find this" part has most likely changed.

 

You can try comparing to the stock osC shop for each page first, then it should be very clear what need to be inserted in your code. Beyond Compare software (purchased) has been great for me. WinMerge is another that is free.

Share this post


Link to post
Share on other sites

Then I try to set the option "Type" to product_info I get some style issues

 

westsideclothing.co.uk/alpha/product_info.php?products_id=127

 

If I set the option to popup the page is displayed like normal. i.e. navigation aligned with background.

 

Thanks

 

Ben

you should examine why <table width="900px"> is in your code just above the images. it will cause problems

Share this post


Link to post
Share on other sites

AI admin problems after moving to subfolder

 

Hello,

 

I have moved my OSC installation to subfolder and done all necessary corrections in config files. AI works great in catalog.

It also appears in admin. But when clicking on 'Delete' button for AI image - it just take me to previous page.

 

Also in admin area instead of all AI images an image broken link shows. It seems that AI module relates to old place, before moving OSC it to subfolder.

 

My question: Where the heck do I need to update AI admin settings to point to new OSC location? So that I can work with AI panel in admin again.

 

Cheers!

Share this post


Link to post
Share on other sites

AI admin problems after moving to subfolder

 

Hello,

 

I have moved my OSC installation to subfolder and done all necessary corrections in config files. AI works great in catalog.

It also appears in admin. But when clicking on 'Delete' button for AI image - it just take me to previous page.

 

Also in admin area instead of all AI images an image broken link shows. It seems that AI module relates to old place, before moving OSC it to subfolder.

 

My question: Where the heck do I need to update AI admin settings to point to new OSC location? So that I can work with AI panel in admin again.

 

Cheers!

 

my bet is a problem in your admin configure.php.

 

for deleting, it will look for the file by combining the DIR_FS_CATALOG_IMAGES from your config plus the image name in the database. DIR_FS_CATALOG_IMAGES is a concatenation of DIR_FS_CATALOG + 'images/' (stock). DIR_FS_CATALOG is usually a concatenation of DIR_FS_DOCUMENT_ROOT + DIR_WS_CATALOG.

 

You need to make sure the combination of all those items equals the correct path to your images. Equally important is not having duplicate slashes in the path. DIR_WS_CATALOG usually has a leading slash and a trailing slash. one of the more common mistakes is to also add a trailing slash to DIR_FS_DOCUMENT_ROOT, which is incorrect.

 

Hope that helps. PM me your admin configure file if you need further help.

Share this post


Link to post
Share on other sites

my bet is a problem in your admin configure.php.

 

for deleting, it will look for the file by combining the DIR_FS_CATALOG_IMAGES from your config plus the image name in the database. DIR_FS_CATALOG_IMAGES is a concatenation of DIR_FS_CATALOG + 'images/' (stock). DIR_FS_CATALOG is usually a concatenation of DIR_FS_DOCUMENT_ROOT + DIR_WS_CATALOG.

 

You need to make sure the combination of all those items equals the correct path to your images. Equally important is not having duplicate slashes in the path. DIR_WS_CATALOG usually has a leading slash and a trailing slash. one of the more common mistakes is to also add a trailing slash to DIR_FS_DOCUMENT_ROOT, which is incorrect.

 

Hope that helps. PM me your admin configure file if you need further help.

Yes, you nailed it! The trick was to update DIR_WS_CATALOG value with subfolder name. But with double slashes: /foldername/

 

Thanks again.

 

Cheers.

Share this post


Link to post
Share on other sites

Hi,

 

I've been using this contrib for a while but can anyone help with a couple of snags I have come across?

 

First, when selecting the DELETE IMAGE button in Categories / Products listing I don't want the image file deleted from the server, only the entry from the database. I've tried changing or deleting code in admin/categories.php to no avail. Any pointer to what I should try would be much appreciated.

 

Second, after selecting EDIT to amend an existing product, the image upload directory path seems to be added to the existing one thus corrupting it even if the dir path is entered manually (this happens with both TRUE and FALSE selected in configuation 'pre-fill upload dir..') and so the image is not found. On the second time around with a manual entry of the dir path, it all works OK but it does mean that I have to go through the edit procedure twice. For minor corrections of product info it's easier to change the raw db entry!

 

Thanks for any ideas,

 

Mike

Share this post


Link to post
Share on other sites

I was trying to upgrade to AI 2.2, and I ran into a problem with Additional Images Thumbnail Utility ( admin/additional_images.php), which is under catalog -> additional images. The page didn't display any options for running configuration utility - no buttons, etc. It would only show text:

"Additional Images Thumbnail Utility

 

This utility will create thumbnails for products. To prevent time-outs, the number of thumbnails created at one time is limited. You may select the number of products to be shown before doing the thumbnail processing."

 

which is the title of the page and the first paragraph.

 

Running this Utility is required to complete the update.

 

It happened with the file from AI2.2 upgrade, and the file from 2.1.1 upgrade (March 20, 2009). I tried to post the file from AI 2.0, and the page looks all right, but I didn't risk to run the utility with an old file.

 

I'm using version MS 2.2 of OSCommerce. I currently have AI 2.1.0 installed with lightbox addon and STS upgrade.

 

Thank you for any ideas. I'm html coder, not php, annd to me it looks like a table tag missing, but the page looks fine in dreamweaver.

 

:-"

Edited by anyav77

Share this post


Link to post
Share on other sites

Hi, this code is causing me a empty shoppingcard on product_info.php

 

// BOF: Additional Images
 if (empty($_GET['pID'])) { $_GET['pID'] = $_GET['products_id']; }

if (ADDIMAGES_MENU_LOCATION == 'product_info') { 
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_POPUP_ADD_IMAGE);

// $navigation->remove_current_page();

 if (!empty($_GET['imagesID'])) {
   $products_query = tep_db_query( "SELECT ai.products_id, ai.images_description, ai.thumb_images, ai.medium_images, ai.popup_images, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description FROM " . TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.additional_images_id = '".(int)$_GET['imagesID']."'");
   $selected_image = tep_db_fetch_array($products_query);
 } elseif (!empty($_GET['pID'])) {
   $products_query = tep_db_query( "SELECT products_id, products_image, products_image_med, products_image_pop, products_image_description FROM " . TABLE_PRODUCTS . " WHERE products_id = '".(int)$_GET['pID']."'");
   $selected_image = tep_db_fetch_array($products_query);
 }

 $imagemenu = new displayonpageimagemenu ( $selected_image['products_id'] );

 // calculate menu size in pixels
 $extra_window_width = 24;  // space for web browser
 $extra_window_height = 86;  // space for web browser

 if (ADDIMAGES_POPUP_SHOW_ON_POPUP == 'true' && ($imagemenu->addimages_count > 1)) {
   list ($menu_width, $menu_height) = $imagemenu->boxsize();
   if (ADDIMAGES_POPUP_TABLE_LOCATION == 'sides') { 
  $extra_window_width += $menu_width; 
  if ($imagemenu->maximageheight < $menu_height) { $imagemenu->maximageheight = $menu_height; }
}
   if (ADDIMAGES_POPUP_TABLE_LOCATION == 'above' || ADDIMAGES_POPUP_TABLE_LOCATION == 'below') { 
  $extra_window_height += $menu_height; 
  if ($imagemenu->maximagewidth < $menu_width) { $imagemenu->maximagewidth = $menu_width; }
}
 }
 if(!empty($selected_image['products_image_description'])) { 
   $imagemenu->maximageheight += 22; // add space for large image description text height
 }
}
// EOF: Additional Images


 

Somebody knows why?

 

Without the script the buy now button works o.k.

Share this post


Link to post
Share on other sites

Hi, this code is causing me a empty shoppingcard on product_info.php

 

// BOF: Additional Images
if (empty($_GET['pID'])) { $_GET['pID'] = $_GET['products_id']; }

if (ADDIMAGES_MENU_LOCATION == 'product_info') { 
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_POPUP_ADD_IMAGE);

// $navigation->remove_current_page();

if (!empty($_GET['imagesID'])) {
$products_query = tep_db_query( "SELECT ai.products_id, ai.images_description, ai.thumb_images, ai.medium_images, ai.popup_images, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description FROM " . TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.additional_images_id = '".(int)$_GET['imagesID']."'");
$selected_image = tep_db_fetch_array($products_query);
} elseif (!empty($_GET['pID'])) {
$products_query = tep_db_query( "SELECT products_id, products_image, products_image_med, products_image_pop, products_image_description FROM " . TABLE_PRODUCTS . " WHERE products_id = '".(int)$_GET['pID']."'");
$selected_image = tep_db_fetch_array($products_query);
}

$imagemenu = new displayonpageimagemenu ( $selected_image['products_id'] );

// calculate menu size in pixels
$extra_window_width = 24; // space for web browser
$extra_window_height = 86; // space for web browser

if (ADDIMAGES_POPUP_SHOW_ON_POPUP == 'true' && ($imagemenu->addimages_count > 1)) {
list ($menu_width, $menu_height) = $imagemenu->boxsize();
if (ADDIMAGES_POPUP_TABLE_LOCATION == 'sides') { 
$extra_window_width += $menu_width; 
if ($imagemenu->maximageheight < $menu_height) { $imagemenu->maximageheight = $menu_height; }
}
if (ADDIMAGES_POPUP_TABLE_LOCATION == 'above' || ADDIMAGES_POPUP_TABLE_LOCATION == 'below') { 
$extra_window_height += $menu_height; 
if ($imagemenu->maximagewidth < $menu_width) { $imagemenu->maximagewidth = $menu_width; }
}
}
if(!empty($selected_image['products_image_description'])) { 
$imagemenu->maximageheight += 22; // add space for large image description text height
}
}
// EOF: Additional Images


 

Somebody knows why?

 

Without the script the buy now button works o.k.

double check that all the included files actually got uploaded to your site. Then double check that PHP errors are turned on with your host so that you may be able to debug future issues.

Share this post


Link to post
Share on other sites

Hi all,

 

I have a strange problem.

I can see the uploaded image when I view the product in my admin panel, but I can upload en delete the image but there is no preview picture.

 

previewvm.jpg

 

Everything else works.

 

Maybe something wrong in categories.php?

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  

×