Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Additional Images Module


Parikesit

Recommended Posts

Hey Having a little problem with Additional Images v2.1.1

 

I added the codes and everthing went fine

but when I goto edit/ or add a product I see 3 upload feilds

but only one is active?

 

also when I upload an images, and go back to the edit the product again I'm getting this:

 

hvp6v4.gif

 

please tell me what am I doing wrong?

Link to comment
Share on other sites

Ellicit,

It took me actually some time to get rid of the 2 (additional) images,,,, it's much better to my opinion to install "thumbs of the fly" if you want to scale images.... The only usefull feature of this contribution is the option to add extra images to the product, but i guess there will be other contributions that can do the same (better).

Paul

Link to comment
Share on other sites

I was looking for a way to add additional images, but I can't seem to find a way to do it with this add-on

I mean I dont see where the option are to add additional images... I now understand why I see the 2 browse button are disabled due to automatically create 3 image set enabled

 

 

but I do I add more images, where do I enable this?

Edited by ellicit
Link to comment
Share on other sites

Ellicit,

It took me actually some time to get rid of the 2 (additional) images,,,, it's much better to my opinion to install "thumbs of the fly" if you want to scale images.... The only usefull feature of this contribution is the option to add extra images to the product, but i guess there will be other contributions that can do the same (better).

Paul

 

The only useful feature? Are you kidding me?

 

Why would you not want the additional images? Obviously you don't know that you don't have to use them.

 

Most people really like the ability to upload one image and get 3 sizes made on the fly. Any size they want. This provides 3 sizes for use throughout the shop thumb, medium, large, that don't show the normal pixalation you would get from stock shop. No fuss, mo muss. Also offers several nice ways to display the images, unlimited in number.

 

So what contribution does what this does better?

Link to comment
Share on other sites

Hey Having a little problem with Additional Images v2.1.1

 

I added the codes and everthing went fine

but when I goto edit/ or add a product I see 3 upload feilds

but only one is active?

 

also when I upload an images, and go back to the edit the product again I'm getting this:

 

hvp6v4.gif

 

please tell me what am I doing wrong?

 

I don't see what is "wrong", looks normal to me.

 

If you want to upload 3 presized images rather then allowing AI to do it for you, you change change the setting to not auto-generate the other two sizes. The settings are in the Configuration -> Additional Images

 

To add more (unlimited) images you need to look in the product summary, right side of the page, in the product/category lists, as described in the documentation.

 

how about describing how you want to use this contribution, maybe I can help you get there.

Link to comment
Share on other sites

Hello people

 

As promised yesterday, I just uploaded a modification that inegrates Additional Images into the STS content pages (including lightbox of course). There are many sts tags defined that you can use directly in your content pages, also a sample product_info.php.html file included, to give you the overview. You can switch light box on or off from your admin panel.

 

You can find it here --->Additional Images for STS content pages - Version 1

 

Enjoy :)

Link to comment
Share on other sites

The only useful feature? Are you kidding me?

 

Why would you not want the additional images? Obviously you don't know that you don't have to use them.

 

Most people really like the ability to upload one image and get 3 sizes made on the fly. Any size they want. This provides 3 sizes for use throughout the shop thumb, medium, large, that don't show the normal pixalation you would get from stock shop. No fuss, mo muss. Also offers several nice ways to display the images, unlimited in number.

 

So what contribution does what this does better?

 

Maybe you did not understand me correct; or i explained it the wrong way; Let me try to give my opinion on this contribution with +/-'s:

+ ability to add additional images to the product (although i have doubts that this is the best way to do it....)

+ the very nice thumb-menu (i missed that one you are correct...)

- The fact that it creates the scaled images for you in a fixed size to be changed in admin. On this point i prefer the thumbs-on-the-fly contribution since there the code simply requests for the image in a given size (aspect ratio and alike are taken care of), much more user-friendly, you are not restricted to only 3 sizes, simply take what is best for the application, no changes in admin required when you want to change the sizes, the images are generated implicitly (and offcourse automatically).

- Also why add 2 columns to the products table for the 2nd and 3rd image AND add a new table for additional images??? The second solution alone would have been much better....

Paul

Link to comment
Share on other sites

Maybe you did not understand me correct; or i explained it the wrong way; Let me try to give my opinion on this contribution with +/-'s:

+ ability to add additional images to the product (although i have doubts that this is the best way to do it....)

+ the very nice thumb-menu (i missed that one you are correct...)

- The fact that it creates the scaled images for you in a fixed size to be changed in admin. On this point i prefer the thumbs-on-the-fly contribution since there the code simply requests for the image in a given size (aspect ratio and alike are taken care of), much more user-friendly, you are not restricted to only 3 sizes, simply take what is best for the application, no changes in admin required when you want to change the sizes, the images are generated implicitly (and offcourse automatically).

- Also why add 2 columns to the products table for the 2nd and 3rd image AND add a new table for additional images??? The second solution alone would have been much better....

Paul

the on-the-fly was not done in this contribution, as I explained in the docs, because that causes a lot of overhead on the server. Particularly when viewing pages with lots of thumbs. Try browsing a site with 50 thumbs on a page with the on-the-fly generator and a shared host on a Sunday afternoon/evening. not pleasant, and the result may be to drive away potential customers with ADD because of a non-responsive shop. You can think of this contribution as doing for images as the page caching does in the base shop.

 

That said, I am considering adding that feature for those folks with smaller shops and faster servers.

 

each image needs the additional presized filenames stored, including the original, which is why two fields were added to the products table. If I had started this contribution from scratch, most assuredly would have been different. The images are store as they are for backward compatibility and upgrade from previous versions. And beyond that, you can add this contribution to an existing shop, run the utility to size the images, and you are off and running without having to reupload all the existing images to the new table. Just a little forethought on my part to make it easy for folks with existing shops get started.

 

do the methods make more sense now? do you have any suggestions for a future version?

Edited by surfalot
Link to comment
Share on other sites

Hi I'm a newbie and having an issue here. I've just install Lightbox for additional images v2.1.0 - version 2 along with Additional Images v2.1.1. The reason I'm using v.2.1.1 is because i think its compatible with Easy Populate 2.76i-MS2 (with attributes) contribution.

 

Anyway after installing everything seems ok but when i click on the image, the pop-up hanged. I mean the image won't load up. All I see is the loading image keep on swirling. Anyone can help me on this?

 

Thanks!! This forum rocks!

Link to comment
Share on other sites

Hi again. Actually the above issue has been solved. I dunno how it happen but when add 2 more photos it seems ok. The image can load up. Seems strange.

 

But now i'm facing another issue. When I turned off the Lightbox effect at the admin panel all the images showed very nicely. But when I switched it off, all the additional images are gone except for the main pic. The additional images not showing up.

 

Help me oh yeah!

Link to comment
Share on other sites

Hi I'm a newbie and having an issue here. I've just install Lightbox for additional images v2.1.0 - version 2 along with Additional Images v2.1.1. The reason I'm using v.2.1.1 is because i think its compatible with Easy Populate 2.76i-MS2 (with attributes) contribution.

 

Anyway after installing everything seems ok but when i click on the image, the pop-up hanged. I mean the image won't load up. All I see is the loading image keep on swirling. Anyone can help me on this?

 

Thanks!! This forum rocks!

 

Hi

 

I can not answer you regarding the compatibility issue. Regarding the pop up issue, I guess you have the issue when being in the lightbox mode, right? How does it work when lightbox is switched off?

Can you post your url?

Link to comment
Share on other sites

My sincere apology to all. I'm a big noob. I'm using XAMPP to test my site and it seems the images took a while to load up. Now the images are showing up. I dunno what i clicked on the admin panel but now the pictures are there. Next time i'll play around more before posting any dumb post. : p . Anyway this is a real cool addon!

 

 

Cheers!

Link to comment
Share on other sites

My sincere apology to all. I'm a big noob. I'm using XAMPP to test my site and it seems the images took a while to load up. Now the images are showing up. I dunno what i clicked on the admin panel but now the pictures are there. Next time i'll play around more before posting any dumb post. : p . Anyway this is a real cool addon!

 

 

Cheers!

 

Great, happy that it works and that you enjoy it:)

Link to comment
Share on other sites

Hi! I installed "Additional Images v2.1.1" and "lightbox effect in AI version 2", the lightbox effect is working fine for additional images, my question is:

 

1) is it possible to apply the same lightbox effect to the "top product image" (the main product image)?

 

If the above is not feasible, then I have the problem below.

 

2) Right now, when I click on the top product image, same as osCommerce default, a popup window shows up, the top product image shows at the top and small additional thumbnail images below it. The roll over image effect (being rolled over image's bigger image will show at the top) is not working, when I click on any thumbnail additional image in the popup, the bigger image of that thumbnail image will show in another new window.

 

I would like to fix this problem but I know nothing about scripting, I tried to search for solutions but I couldn't find any, please see if anyone of you can help me, thanks in advance!

Link to comment
Share on other sites

I remember one thing, at the time I install "additional Images v2.1.1", I found that the file /catalog/admin/backup.php is missing in the zip, don't know if this is related but I just want to point out this one, thanks.

 

 

 

Hi! I installed "Additional Images v2.1.1" and "lightbox effect in AI version 2", the lightbox effect is working fine for additional images, my question is:

 

1) is it possible to apply the same lightbox effect to the "top product image" (the main product image)?

 

If the above is not feasible, then I have the problem below.

 

2) Right now, when I click on the top product image, same as osCommerce default, a popup window shows up, the top product image shows at the top and small additional thumbnail images below it. The roll over image effect (being rolled over image's bigger image will show at the top) is not working, when I click on any thumbnail additional image in the popup, the bigger image of that thumbnail image will show in another new window.

 

I would like to fix this problem but I know nothing about scripting, I tried to search for solutions but I couldn't find any, please see if anyone of you can help me, thanks in advance!

Link to comment
Share on other sites

Hi! I installed "Additional Images v2.1.1" and "lightbox effect in AI version 2", the lightbox effect is working fine for additional images, my question is:

To your questions

 

1) yes, thats the purpose, to have the lightbox effect for all images, not just the additional

2) You can not have both, lightbox AND rolover effect, you need to choose this or that.

 

To your problem: Please answer me to following questions:

a) Do you have in your admin --> configuration --> additional images the lightbox entry? Is is switched to "true"?

b ) Do you have other contributions installed, that affect product_info.php?

c) Do following: Backup your product_info.php and includes/classes/displayimages.php, and upload the 2 files that are in the package. Then post again and tell me the results

Edited by multimixer
Link to comment
Share on other sites

To your questions

 

1) yes, thats the purpose, to have the lightbox effect for all images, not just the additional

2) You can not have both, lightbox AND rolover effect, you need to choose this or that.

 

To your problem: Please answer me to following questions:

a) Do you have in your admin --> configuration --> additional images the lightbox entry? Is is switched to "true"?

b ) Do you have other contributions installed, that affect product_info.php?

c) Do following: Backup your product_info.php and includes/classes/displayimages.php, and upload the 2 files that are in the package. Then post again and tell me the results

 

hi multimixer, thank you for your help.

 

2) actually I don't need the rollover effect, I prefer to show all images by lightbox effect.

a) In my admin, under "configuration", there is a "Additional Images' option, when I click into "Additional Images", there is a "Lightbox effect" option at the bottom, and I set it to true.

B) before I install anything to my shopping cart, I installed "lightbox2.04". Afther that I installed "Additional Images v2.1.1" and then "lightbox effect in AI version 2", besides these I didn't install anything.

c) "2 files that are in the package", you mean the "Additional Images v2.1.1" package? I could find "displayimages.php in "1_files_to_upload" folder, and the "product_info.php" in "2_files_to_compare" folder, do you mean these 2 files? sorry if this is another dumb question...

Link to comment
Share on other sites

B) before I install anything to my shopping cart, I installed "lightbox2.04". Afther that I installed "Additional Images v2.1.1" and then "lightbox effect in AI version 2", besides these I didn't install anything.

 

Ok, so do following

 

1) Upload the file includes/classes/displayimages.php that is in the "lightbox effect in AI version 2" to the same place. Backup the file you have now.

2) Post here the contents of your product_info.php

Link to comment
Share on other sites

1) I uploaded displayimages.php and the result is the same.

2) Below is the code, thank you.

 

<?php

/*

$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

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

 

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<?php // BOF: Additional Images ?>

<script language="javascript"><!--

function showImage(img,width,height) {

if (document.getElementById("mainimage")) {

document.getElementById("mainimage").src = img;

document.getElementById("mainimage").height = height;

document.getElementById("mainimage").width = width;

}

}

//--></script>

<?php // EOF: Additional Images ?>

 

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

 

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

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

?>

<tr>

<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

// 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, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

// EOF: Additional Images

$product_info = tep_db_fetch_array($product_info_query);

 

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

 

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

// BOF: Additional Images

$additional_images = new displayimages ( $product_info['products_id'] );

// EOF: Additional Images

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main">

<?php

// BOF: Additional Images ADDED to if statement: && ADDIMAGES_GROUP_WITH_PARENT == 'false'

if (tep_not_null($product_info['products_image']) && ADDIMAGES_GROUP_WITH_PARENT == 'false') {

// EOF: Additional Images

?>

<!-- // BOF: Additional Images -->

<table border="0" cellspacing="0" cellpadding="2" align="<?php echo ADDIMAGES_TABLE_ALIGNMENT; ?>"<?php if (ADDIMAGES_MENU_LOCATION == 'product_info') { echo ' width="'.($imagemenu->maximagewidth+$extra_window_width).'" height="'.($imagemenu->maximageheight+$extra_window_height).'"'; } ?> style="position: relative;">

<!-- // EOF: Additional Images -->

<tr>

<td align="center" class="smallText">

<?php

// BOF: Additional Images

if (ADDIMAGES_MENU_LOCATION == 'product_info') {

 

if (ADDIMAGES_POPUP_TABLE_LOCATION=='above' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {

echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';

}

 

echo '<table border="0" cellspacing="0" cellpadding="0"><tr>';

if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && (ADDIMAGES_POPUP_TABLE_ALIGNMENT=='left' || ADDIMAGES_POPUP_TABLE_ALIGNMENT=='center') && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {

echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';

}

 

echo '<td valign="middle" align="center" width="' . $imagemenu->maximagewidth . '" height="' . $imagemenu->maximageheight . '">';

if (!empty($_GET['imagesID'])) {

echo tep_image(DIR_WS_IMAGES . (!empty($selected_image['popup_images'])?$selected_image['popup_images']:(!empty($selected_image['medium_images'])?$selected_image['medium_images']:(!empty($selected_image['thumb_images'])?$selected_image['thumb_images']:''))), $selected_image['images_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['images_description'])?$selected_image['images_description']:'');

} elseif (!empty($_GET['pID'])) {

echo tep_image(DIR_WS_IMAGES . (!empty($selected_image['products_image_pop'])?$selected_image['products_image_pop']:(!empty($selected_image['products_image_med'])?$selected_image['products_image_med']:(!empty($selected_image['products_image'])?$selected_image['products_image']:''))), $selected_image['products_image_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['products_image_description'])?$selected_image['products_image_description']:'');

}

echo '</td>';

 

if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && ADDIMAGES_POPUP_TABLE_ALIGNMENT=='right' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {

echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';

}

if (!empty($imagemenu->maximagewidth) && !empty($imagemenu->maximageheight)) { echo '<td>' . tep_draw_separator('pixel_trans.gif', '4', $imagemenu->maximageheight) . '</td>'; }

echo '</tr></table>';

 

if (ADDIMAGES_POPUP_TABLE_LOCATION=='below' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {

echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';

}

 

} else {

?><script language="javascript"><!--

document.write('<?php echo '<a href="java script: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

}

// EOF: Additional Images ?>

</td>

</tr>

</table>

<?php

}

// BOF: Additional Images

if (ADDIMAGES_TABLE_LOCATION=='above' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {

echo $additional_images->altgroupoutput();

} else if (ADDIMAGES_TABLE_LOCATION=='sides' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {

echo $additional_images->groupoutput();

}

// EOF: Additional Images

?>

<p><?php echo stripslashes($product_info['products_description']); ?></p>

<?php

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

?>

<table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>

</tr>

<?php

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

$products_options_array = array();

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

while ($products_options = tep_db_fetch_array($products_options_query)) {

$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

}

 

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

?>

<tr>

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>

</tr>

<?php

}

?>

</table>

<?php

}

?>

</td>

</tr>

<?php // BOF: Additional Images

if (ADDIMAGES_TABLE_LOCATION=='below' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') { ?>

<tr>

<td><?php echo $additional_images->altgroupoutput(); ?></td>

</tr>

<?php }

// EOF: Additional Images ?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$reviews = tep_db_fetch_array($reviews_query);

if ($reviews['count'] > 0) {

?>

<tr>

<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

if (tep_not_null($product_info['products_url'])) {

?>

<tr>

<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

</td>

</tr>

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

1) I uploaded displayimages.php and the result is the same.

2) Below is the code, thank you.

 

Your product_info.php looks like messed up a bit

1) You don't have the necessary entries for the lightbox. Are you sure you installed the fancy lightbox pop up as requested in the prepositions of the installation manual?

2) You did't merged the code properly, so you are missing the "if" condition, you have just the second part of the lightbox addon installed

3) It looks like you have still some old code of the previous lightbox modifications in it

 

What to do now?

 

a) Go and install the fancy lightbox pop up (link in the instructions) as per instructions

b )Do you have a product_info.php backup that is after installing AI and BEFORE installing any other lightbox things? If so, then try to reinstall the AI lightbox addon.

Link to comment
Share on other sites

Your product_info.php looks like messed up a bit

1) You don't have the necessary entries for the lightbox. Are you sure you installed the fancy lightbox pop up as requested in the prepositions of the installation manual?

2) You did't merged the code properly, so you are missing the "if" condition, you have just the second part of the lightbox addon installed

3) It looks like you have still some old code of the previous lightbox modifications in it

 

What to do now?

 

a) Go and install the fancy lightbox pop up (link in the instructions) as per instructions

b )Do you have a product_info.php backup that is after installing AI and BEFORE installing any other lightbox things? If so, then try to reinstall the AI lightbox addon.

 

Thank you for your kindly help, since I know nothing about programming, everytime I follow instructions to modify codes but actually I don't really know what I am doing and don't know if I do it in a right way, that's why my code is messed up, anyway I will try to revise everything first, will let you know if I still can't solve my problem, thank you very much!!

Link to comment
Share on other sites

Ok, so I worked it out for you.

 

1)You need to install the AI lightbox addon properly (including the separate contribution "fancy lightbox pop up) according to instructions.

2) You use the file displayimages.php that is in the AI lightbox package to replace the one you have from the original AI installation

3) For product_info.php you use the one posted below, it's cleaned up a bit. I didn't test it, but it should work

<?php
/*
$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

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


$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
e
ft=150')
}
//--></script>
<?php // BOF: Additional Images ?>
<script language="javascript"><!--
function showImage(img,width,height) {
if (document.getElementById("mainimage")) {
document.getElementById("mainimage").src = img;
document.getElementById("mainimage").height = height;
document.getElementById("mainimage").width = width;
}
}
//--></script>
<?php // EOF: Additional Images ?>
<? /*
<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/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>
*/ ?>
<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>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
if ($product_check['total'] < 1) {
?>
<tr>
<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
} else {
// 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, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
// EOF: Additional Images	
$product_info = tep_db_fetch_array($product_info_query);

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}

if (tep_not_null($product_info['products_model'])) {
$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
$products_name = $product_info['products_name'];
}
// BOF: Additional Images
$additional_images = new displayimages ( $product_info['products_id'] );
// EOF: Additional Images
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main">
<?php
// BOF: Additional Images ADDED to if statement: && ADDIMAGES_GROUP_WITH_PARENT == 'false'
if (tep_not_null($product_info['products_image']) && ADDIMAGES_GROUP_WITH_PARENT == 'false') {
// EOF: Additional Images	
?>
<!-- // BOF: Additional Images -->
<table border="0" cellspacing="0" cellpadding="2" align="<?php echo ADDIMAGES_TABLE_ALIGNMENT; ?>"<?php if (ADDIMAGES_MENU_LOCATION == 'product_info') { echo ' width="'.($imagemenu->maximagewidth+$extra_window_width).'" height="'.($imagemenu->maximageheight+$extra_window_height).'"'; } ?> style="position: relative;">
<!-- // EOF: Additional Images -->
<tr>
<td align="center" class="smallText">
<?php 
// BOF: Additional Images
if (ADDIMAGES_MENU_LOCATION == 'product_info') { 

if (ADDIMAGES_POPUP_TABLE_LOCATION=='above' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';
}

echo '<table border="0" cellspacing="0" cellpadding="0"><tr>';
if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && (ADDIMAGES_POPUP_TABLE_ALIGNMENT=='left' || ADDIMAGES_POPUP_TABLE_ALIGNMENT=='center') && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';
}

echo '<td valign="middle" align="center" width="' . $imagemenu->maximagewidth . '" height="' . $imagemenu->maximageheight . '">';
if (!empty($_GET['imagesID'])) {
  echo tep_image(DIR_WS_IMAGES . (!empty($selected_image['popup_images'])?$selected_image['popup_images']:(!empty($selected_image['medium_images'])?$selected_image['medium_images']:(!empty($selected_image['thumb_images'])?$selected_image['thumb_images']:''))), $selected_image['images_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['images_description'])?$selected_image['images_description']:'');
} elseif (!empty($_GET['pID'])) {
  echo tep_image(DIR_WS_IMAGES . (!empty($selected_image['products_image_pop'])?$selected_image['products_image_pop']:(!empty($selected_image['products_image_med'])?$selected_image['products_image_med']:(!empty($selected_image['products_image'])?$selected_image['products_image']:''))), $selected_image['products_image_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['products_image_description'])?$selected_image['products_image_description']:'');
}
echo '</td>';

if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && ADDIMAGES_POPUP_TABLE_ALIGNMENT=='right' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';
}
if (!empty($imagemenu->maximagewidth) && !empty($imagemenu->maximageheight)) { echo '<td>' . tep_draw_separator('pixel_trans.gif', '4', $imagemenu->maximageheight) . '</td>'; }
echo '</tr></table>';

if (ADDIMAGES_POPUP_TABLE_LOCATION=='below' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';
}

} else {

// BOF lightbox addon
if (ENABLE_LIGHTBOX == 'false') {
// EOF lightbox addon

?><script language="javascript"><!--
document.write('<?php echo '<a href="java script: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
// BOF lightbox addon	  
} else {
?>

			<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>
			<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" 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']:''))), $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
}
// EOF lightbox addon

}
// EOF: Additional Images ?>
</td>
</tr>
</table>
<?php
}
// BOF: Additional Images
if (ADDIMAGES_TABLE_LOCATION=='above' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
echo $additional_images->altgroupoutput();
} else if (ADDIMAGES_TABLE_LOCATION=='sides' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
echo $additional_images->groupoutput();
}
// EOF: Additional Images
?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
</tr>
<?php
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
while ($products_options = tep_db_fetch_array($products_options_query)) {
$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
if ($products_options['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
}

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<tr>
<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</td>
</tr>
<?php // BOF: Additional Images
if (ADDIMAGES_TABLE_LOCATION=='below' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') { ?>
<tr>
<td><?php echo $additional_images->altgroupoutput(); ?></td>
</tr>
<?php } 
// EOF: Additional Images ?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
<tr>
<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}

if (tep_not_null($product_info['products_url'])) {
?>
<tr>
<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_also_purchased(3600);
} else {
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
}
?>
</td>
</tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Hi There

 

I am not very proficient with php and I am having difficulty installing the module. The readme and instal fine is great until you get to the section where you need to compare files? I unfortunatly dont tknow what to look for?

 

Is there a more comprehensive install guide showing exactly what must be found/replaced and copied?

 

Thanks for the help.

 

Damian

Link to comment
Share on other sites

Hi There

 

I am not very proficient with php and I am having difficulty installing the module. The readme and instal fine is great until you get to the section where you need to compare files? I unfortunatly dont tknow what to look for?

 

Is there a more comprehensive install guide showing exactly what must be found/replaced and copied?

 

Thanks for the help.

 

Damian

sorry, no. The easiest way is the compare. If you would like. you can search for it. Everything that need to be changed is marked with "// BOF: additional images" and "// EOF: additional images". That should be no better then if anyone had taken the time to spell it all out but saying "search for this" then "add this after", etc.

 

If I were you, and I was going to do very much of this contribution adding, I would purchase a license of Beyond Compare. It is the best commercial file compare tool available. You can compare entire folders and it gives a nice overview of the work necessary. Just right click one folder, compare, right click another, compare, and away you go. Done right, the changes simply jump right out at you and it is a simple as selecting a section of code and clicking a button that copies it into place.

 

WinMerge is free and does similar things.

 

If you are already working with a heavily modified shop, the tools are invaluable.

 

remember, everything to be changed is clearly marked: "// BOF: additional images" and "// EOF: additional images"

Link to comment
Share on other sites

I don't see what is "wrong", looks normal to me.

 

If you want to upload 3 presized images rather then allowing AI to do it for you, you change change the setting to not auto-generate the other two sizes. The settings are in the Configuration -> Additional Images

 

To add more (unlimited) images you need to look in the product summary, right side of the page, in the product/category lists, as described in the documentation.

 

how about describing how you want to use this contribution, maybe I can help you get there.

 

 

I see what you mean... I got it... thanks.

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