Jump to content
Sign in to follow this  
tractormad

Support Thread For Fancy Lightbox Popup Contribution

Recommended Posts

Dont worry problem fixed :)

 

 

Argh Stupid IE!!!

 

We uploaded lightbox and everything is fine in FF works like a CHARM...tried it in IE and when the product_info.php page begins to load we get an "Operation Aborted" error and then the page displays a "Page cannot be displayed" error message.

I have even tried uploading the product_info.php that came with the package but still getting this error in IE7 ... PLEASE help someone, we're dying to use this on our site.

 

 

Cheers.

 

Help! I pm'ed you. Apparently, I've got the same exact problem. Anyone else bump into this 'Operation Aborted' error using IE7? Works on Firefox but dies on IE7. Would appreciate the help =]

Edited by dan3005a

Share this post


Link to post
Share on other sites
Help! I pm'ed you. Apparently, I've got the same exact problem. Anyone else bump into this 'Operation Aborted' error using IE7? Works on Firefox but dies on IE7. Would appreciate the help =]

 

Sent you a PM mate :)

Share this post


Link to post
Share on other sites

Hi all i think i need to edit this part of my java script to include max width and hight as my image when clicked to inlarge sometimes it is far to big, i have to many images to go and rezise them so can i just stop them being made any bigger than x amount?

 

think the relivant code is:

 

Object.extend(Element, {
getWidth: function(element) {
	   element = $(element);
	   return element.offsetWidth; 
},
setWidth: function(element,w) {
	   element = $(element);
	element.style.width = w +"px";
},
setHeight: function(element,h) {
	   element = $(element);
	element.style.height = h +"px";
},
setTop: function(element,t) {
	   element = $(element);
	element.style.top = t +"px";
},
setLeft: function(element,l) {
	   element = $(element);
	element.style.left = l +"px";
},
setSrc: function(element,src) {
	element = $(element);
	element.src = src; 
},
setHref: function(element,href) {
	element = $(element);
	element.href = href; 
},
setInnerHTML: function(element,content) {
	element = $(element);
	element.innerHTML = content;
}
});

 

any ideas would be great cheers everyone.

Edited by wilson210484

If it wasn't for people like you helping people like me where would we all be?

Share this post


Link to post
Share on other sites

Thanks very much for this excellent contribution.

 

It was easy to install and works well with the first product image. But i'm also using the "multi images extra 1.02" contribution and i failed to get both working together. Sadly I'm not a PHP / MySQL Pro. According to the code in the popup_image_extra.php file i assume this file asks the details about the image to be open from the database. So this must be included into the product_info.php when calling the lightbox link, right?. Any clue how to change that code?

 

my product_info.php (starting at line 115)

		<td class="main">
<?php
if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="0" align="right">
		<tr>
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="0"') . /*'<!--- <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="0"') . /*'<!--- <br> --->' . TEXT_CLICK_TO_ENLARGE . */' </a>'; ?>
</noscript>
	  </td>
		</tr>
<?php
}

for($nb=1; $nb <= NB_IMAGE_EXTRA; $nb++) {
	$var_products_image = "products_image".$nb;
	if (tep_not_null($product_img[$var_products_image])) {
	?>		
				<tr>
				  <td align="center" class="smallText">
	<script language="javascript"><!--
	document.write('<?php echo '<a href="java script:popupWindow(\\\'' . 
	tep_href_link(FILENAME_POPUP_IMAGE_EXTRA, 'pID='.$product_info['products_id']).'&id='.$nb.'\\\')">'.
	tep_image(DIR_WS_IMAGES_EXTRA . $product_img[$var_products_image], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="0"') . '<!--- <br> --->' . /* TEXT_CLICK_TO_ENLARGE . */'</a>'; ?>');
	//--></script>
	<noscript>
	<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES_EXTRA . $product_img[$var_products_image], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="0"') . '<!--- <br> --->'. /* TEXT_CLICK_TO_ENLARGE . */'</a>'; ?>
	</noscript> 
				  </td>

The first portion that calls the main images works perfectly but i couldn't get the NB_IMAGE_EXTRA part doing the same. When adding the same code as above it opens the products main image, so i tried modifying it with adding the "pID" code but didn't get it working. I noticed that pID is interpreted from the popup_image_extra.php but i failed to include that coe to the product_info.php.

 

popup_image_extra.php that shows the additional images

<?php
/*
 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 $navigation->remove_current_page();
 $id = $_REQUEST['id'];
 $products_query = tep_db_query("SELECT pd.products_name, pi.products_image".$id." 
  FROM ".TABLE_PRODUCTS_IMAGES." pi, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd
  WHERE p.products_id = pd.products_id 
  AND p.products_id = pi.products_id 
  AND p.products_status = '1' 
  AND p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' 
  AND pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_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 $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
if (navigator.appName == 'Netscape') i=0;
 if (document.images[0]) window.resizeTo(document.images[0].width +35, document.images[0].height+80-i);
 self.focus();
}
//--></script>
</head>
<body onload="resize();" bgcolor="#333333">
<a HREF="#" onClick="window.close();return false"><?php
$products_image = "products_image".$id;
echo tep_image(DIR_WS_IMAGES_EXTRA . $products[$products_image], $products['']); // products_name
?></a>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

 

Any help is appreciated.

Share this post


Link to post
Share on other sites

HI all

 

I've had two emails in the past 3 days from customers asking "Am I stupid?!" because they are saying they can not see the Add to Cart button on the product pages... and as far as I can tell, it's since I properly installed the Lightbox add-on.

 

The thing is, I'm using Firefox with Mac OSX and I can see the add to cart buttons fine! Does anybody know what is going on / how I can fix it please?

 

So far I know one of the customers was using IE7 and Windows XP on one computer, and Windows Vista on another - and the buttons do not show for them on either computer.

 

I've taken the Lightbox off my site until I can figure out what is going on (got the old pop-ups instead) so if someone could help me I'd be very grateful.

 

Thanks, Cat :)

Share this post


Link to post
Share on other sites

I have been using Morepics with lightbox in oscommerce. its working good.

 

One thing i would like to achieve is, the PREVIOUS / NEXT BUTTONS appear only on mouseover.

 

but I need it fixed prmanently on the images (if a product has multiple images)

 

any help ?

Share this post


Link to post
Share on other sites
Help! I pm'ed you. Apparently, I've got the same exact problem. Anyone else bump into this 'Operation Aborted' error using IE7? Works on Firefox but dies on IE7. Would appreciate the help =]

 

 

Having the same issue. I'm not sure why the solution is such a big secret. Can someone post the fix please.

 

Thanks :-)

Share this post


Link to post
Share on other sites

I'm having the exact same problem as well, IE7 says it cannot display the page if I have the lightbox.js loaded.

 

If I use something like this all is fine

 

 $mse7=false;
 if(strstr($_SERVER['HTTP_USER_AGENT'],'MSIE 7.0')) {
 $mse7=true;
 } else {
 $mse7=false;
 }
?>
<head>
<link rel="stylesheet" href="css/structure.css" type="text/css" />
<link rel="stylesheet" href="css/form.css" type="text/css" />
<!-- JavaScript -->
<script type="text/javascript" src="scripts/wufoo.js"></script>

<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
/*** End Header Tags SEO ***/
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<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>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script src="http://www.grupponegro.it/js/prototype.js" type="text/javascript"></script>
<script src="http://www.grupponegro.it/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<?php 
if(($mse7==false)){
?>


<script src="http://www.grupponegro.it/js/lightbox.js" type="text/javascript"></script>
<?php 
}
?>
</head>

 

 

How did you solve that?

 

Thank you

Mattia

Share this post


Link to post
Share on other sites

I dowloaded lightbox 2 from http://www.huddletogether.com/projects/lightbox2/

 

added under </head> 1 and 2 and changed the line with enlrange (the 1st one0 with the code supplied in the contribution.

 

the paths bothered me for a lot of time but i finally made it work (ex if you download lightbox 2 and your oscommerce is under catalog the path should be

 

<script type="text/javascript" src="/catalog/lightbox/js/prototype.js"></script> or <script type="text/javascript" src="catalog/lightbox/js/prototype.js"></script>

 

 

Finally i made it work but i have one small problem in Firefox the image appears on the center of the screen but on IE7 it goes just under the toolbar anf if the image has a small widht a scroll bar appears !! any idea on how to center the lightbox image under IE7

Share this post


Link to post
Share on other sites

The attributes options disappear when lightbox is installed. Several of us have the same problem. Does anyone know what is causing this and how to fix it?

Share this post


Link to post
Share on other sites

A great contribution, surely has out done osc.

 

I have a minor issue whic i am seeking some help on this.

 

For some instance, I still had a image that was larger then 400 x 400. I went to eidt image to the correct sixe and overwrote the old image. But when I tried it out, the image is of correct size, but the white background bhind image did not change. I even remove the new product_info.php file with the older one. Went back to site to clear cach and restart browser. Then reinstalled the mod. The image is correct, but the white background is still way too large.

 

Am trying to locate where i can edit this.

 

Thanks.

 

blr044

Share this post


Link to post
Share on other sites

Everything is fine now. I had to elimate the file and replace it with the original and then restarted browser. The preceded to reinstall again.

 

But if there is an easier way to do this, I would appreciate hearing from someone.

Share this post


Link to post
Share on other sites
The answer to my previous is quesitons is YES, this one is compatible with STS. I like this one a little better than the STS specific version because of the fall back mode and the install is a little bit more simplistic.

 

Thanks for your help.

 

I am wondering if there is anything that needs to be done to make this work with STS, aside from following the instructions included? I tried the other one and I couldn't get it to work. I am using STS 4.5.8.

 

Any suggestions?

 

thanks!


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites

Can anyone provide help regarding this contribution i already have installed which creates additional images for every product and they pop up the same as original osc in the product pages.

 

The code looks different javascript to that in product_info.php

 

Here is the code from the additional images file which is in includes/modules. Not sure if any other files need altering?

 

<?php
/*
 $Id: additional_images.php,v 1.0 2003/02/28 dgw_ Exp $

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

 Copyright (c) 2003 osCommerce

 AUTHOR: Zaenal Muttaqin   
 Released under the GNU General Public License  
*/
?>

<?php
 $images_product = tep_db_query("SELECT additional_images_id, products_id, images_description, medium_images, popup_images FROM " . TABLE_ADDITIONAL_IMAGES . " WHERE products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
 if (!tep_db_num_rows($images_product)) {
?>
<br>
<?php
 } else {
?>
<!-- additional_images //-->
<table width="100%">
  <tr>
	<td>

<?php
 $info_box_contents = array();
 $row = 0;
 $col = 0;
 while ($new_products = tep_db_fetch_array($images_product)) {
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="33%" valign="top"',
									   'text' => '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_ADD_IMAGE, 'imagesID=' . $new_products['additional_images_id']) . '\')">' . tep_image(DIR_WS_IMAGES . $new_products['medium_images'], $new_products['images_description'], DISPLAY_IMAGE_WIDTH, DISPLAY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'
									  );
$col ++;
if ($col > 2) {
  $col = 0;
  $row ++;
}
 }
 new imagesBox($info_box_contents);
?>
	</td>
  </tr>
</table>
<!-- additional_images_eof //-->
<?php
 }
?>

 

This is the code that i put in product_info.php which makes the normal product images work in lightbox 2;

 

<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>

 

Also what what i need to edit to bring the lightbox down away from the top of the site - so it displays more in the middle of the screen

 

If anyone can hack it to incorporate this great Lightbox V2 that would be great

Many thanks in advance

Steve

Share this post


Link to post
Share on other sites

Hi , I installed light box 2.04 and I can't seem to get it to work. I was wondering if someone could look at my Product_info.php to see if I missed something..Thanks for your helAll

I get nothing when I click on an image on my website. I don't even get the pop up image in a different browser window, as in the original install.

 

<?php

/*

$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 

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

 

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

<script type="text/javascript" src="lightbox/js/prototype.js"></script>

<script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects"></script>

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

<script type="text/javascript" src="lightbox/js/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 {

$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, 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 . "'");

$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'];

}

?>

<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

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

?>

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

<tr>

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

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

document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>

 

</td>

</tr>

</table>

<?php

}

?>

<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();

// QuantityMod - BEGIN editing

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_quantity 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)) {

if($products_options['options_quantity'] == 0) {

// If quantity is 0 do not add to list.

}

else {

$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'])) .') ';

}

 

}

// QuantityMod - FINISH editing

}

 

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>

<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'); ?>

Share this post


Link to post
Share on other sites

hi

from memory and my installation this code was placed in includes/header.php not product_info.php

 

<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

 

its worth re-checking the installation

 

hope that helps

steve

Share this post


Link to post
Share on other sites

I have this contribution that was included with the multiple images contrib.

 

I have two issues.

 

1. in the images I have the next and back buttons but on the site if I have multiple images they do not show up. There is only one choice that is to close the image and click on another thumbnail. Shouldn't those show up and allow scolling though the pictures for that product?

 

2. This goes back to the original script - I have many suppliers all with different image sizes copying them all into one uniform size is time consuming and impractical. I have seen several contributions that claim to solve this resize issue (but they all talk about the popupwindow) so the picture are not stretched in one direction or the other and the pop up images come out just fine now but the thumbnails images are all still streched out of proportion. So how do I prevent that from happening?


The Site can be viewed at www.performanceautopartsonline.com

 

The site is live (despite these minor glitches) please respect that and do not sign up etc...

 

maybe a contribution one day when I get this site the way I want it.

 

I don't make spelling mistakes! I have dyslecsic fingers.

Share this post


Link to post
Share on other sites

the read file says if I want to change the way the popup images display, then I only have to change the product_info.php I know that the light box is conflicting with a contribution

I installed called "Quantity for Product Attributes Mod" were I can give quanities to each size of clothing. (for expample) Light box was working fine before I installed it. I really can't figure out where the conflict is in my product_info file. Thats why I posted it so maybe someone else can see it..thanks

 

 

quote name='steve_tester' date='Mar 9 2009, 01:10 AM' post='1377697']

hi

from memory and my installation this code was placed in includes/header.php not product_info.php

 

<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

 

its worth re-checking the installation

 

hope that helps

steve

Share this post


Link to post
Share on other sites
Ok, I have a partial fix for using Fancy Lightbox Popup with ClubOsc Thumb Images.

This will only work if you have large images loaded for all of your products. Otherwise, the lightbox will just hang and no image will load.

*** output ommitted ***

This seems to work, as long as you have large images loaded for all products. I'm trying to figure out how to revert to the thumbnail image if a large image hasn't been loaded but haven't figure it out just yet.

 

 

Hi all, if you need the above to work use the following code:

 

<!-- lightbox with OSC Thumbs//-->
<script language="javascript"><!--
document.write('<?php 

if($product_info['large_products_image'])
{
echo '<a href="images/' . $product_info['large_products_image'] . '" rel="lightbox" title="' . addslashes($product_info['products_name']) . '">' . 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>';
}
else
{
echo '<a href="images/' . $product_info['products_image'] . '" rel="lightbox" title="' . addslashes($product_info['products_name']) . '">' . 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>
<!-- lightbox with OSC Thumbs_eof //-->

 

Hope this helps someone.

 

Regards

George

Share this post


Link to post
Share on other sites

Thanks for this very useful Add-On.

 

 

It's runs very good in my OSC store .

 

But here I have a little problem that hope someone can give me a guide:

 

 

While I click the thumbnail , the lightbox effect appears. but the lagrge image is too close to the top, and not vertical center in the screen (I use IE)

 

But In FireFox and Chrome , this problem don't appears. and the lightbox is vertical-centering in the screen.

 

 

Hope someone can give me a favor.

 

 

Thanks in advance.

 

 

JUN

Share this post


Link to post
Share on other sites

Hello.

 

First, thank you for this contrib. I love it. I have had it installed for quite some time now with no problems. Until now, that is. I have installed a few other contribs and have assumed, incorrectly, that all is well. The lightbox still functions however, it no longer resizes images as it used to. It is as if it ignores the SMALL_IMAGE_WIDTH and the SMALL_IMAGE_HEIGHT settings. I am also unable to overide it with the lightbox.css file. I have gone through the contribs I have that edit product_info.php and have been unable to find the problem. As much as I hate pasting up a wall of code, I am at a loss as to what else I can do. Any help with this would be greatly appreciated. Thank you for your time.

 

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . 'product_info.php');

 /** show-soldout-v1.0 **/ $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where 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>
<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,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></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">

<?php /*** Begin Header Tags SEO ***/ ?>
<a name="<?php echo $header_tags_array['title']; ?>"></a>
<?php /*** End Header Tags SEO ***/ ?>

<!-- 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 {
   /** show-soldout-v1.0 **/ $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, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
   $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'];
   }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <?php /*** Begin Header Tags SEO ***/ ?>
           <td valign="top"><h1><?php echo $products_name; ?></h1></td>
           <td align="right" valign="top"><h1><?php echo $products_price; ?></h1></td>
           <?php /*** End Header Tags SEO ***/ ?>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
         <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">

<script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>

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

if (OPTIONS_AS_IMAGES_ENABLED == 'false'){    //mh if statement options as images

   $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
   }
	}//mh options as images    ednds if statement
?>

<?php
//Options as Images. This whole php clause needs to be added
if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php'); 
?>

       </td>
     </tr>
     <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>
               <!-- show-soldout-v1.0 --> <td class="main" align="right">
<?php
if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0)
echo tep_image_button('button_sold_out.gif', IMAGE_BUTTON_SOLD_OUT);
else
echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
?></td>
<!-- end show-soldout-v1.0 -->
               <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>

     <!--- BEGIN Header Tags SEO Social Bookmarks -->
     <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true')
      include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');
     ?>
     <!--- END Header Tags SEO Social Bookmarks -->

     <tr>
       <td>
<?php
 }
?>
       </td>
     </tr>

     <?php /*** Begin Header Tags SEO ***/ ?>
     <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
      <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 
      <?php echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title']; ?></a></td>
     </tr>
     <?php /*** End Header Tags SEO ***/ ?>

   </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'); ?>

Share this post


Link to post
Share on other sites

I have managed to get the lightbox popups working and they look great - thanks!

 

The only problem is that all of my product attributes have disappeared, I noticed that this issue was raised earlier in this thread but I have not been able to find a solution. I would be extremely grateful if someone could let me know how to get my product options to display again.

 

Many thanks

Share this post


Link to post
Share on other sites

Hi guys,

 

I have a minor problem with this contribution. All is working fine, except it adds a ")" to my product name in the text box from the second picture onwards. The product name is displayed fine in the first picture. Anyone have any idea how to resolve this?

 

If not, what part of code do I have to delete to have Lightbox stop showing the product name in the text box at all?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I have this installed but images simply do not load, when i use Opera's Source editorm if i input the full image title it shows without a problem.

 

My guess is that this section is the problem:

 

script language="javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . 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>'; ?>');

 

 

What im doing in Opera

Modified:

<script language="javascript"><!-- 
               document.write('<a href="images/products/DK_CB1016_2 copy.jpg" target="_blank" rel="lightbox[group]" title=""><img src="images/products/DK_CB1016_2 copy.jpg" border="0" alt="" width="180" height="180" hspace="5" vspace="5"><br>Click to enlarge</a>');
               //--></script>

 

Before Modified Code:

<script language="javascript"><!-- 
               document.write('<a href="images/"target="_blank" rel="lightbox[group]" title=""><img src="images/products/DK_CB1016_2 copy.jpg" border="0" alt="" width="180" height="180" hspace="5" vspace="5"><br>Click to enlarge</a>');

Help is appreciated.
               //--></script>

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  

×