Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

pop up window for enlarged picture


magga

Recommended Posts

Posted

Just a quick question .... when you click on the enlarge picture and the pop up window comes up, the window is always slighter smaller than the picture which is slighty annoying.

 

Is there a way to fix this ?

 

Thanks in advance

Posted

There's a contribution, but I can't trace the number :(

 

Replace catalog\popup_image.php with:

 

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

 Modified	: 2006-03-09 by Henry Smith <[email protected]> 
 Changes	: Minor enahncement provides proper popup window resizing based on image, also adds a close window [x] option.

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_INFO_SHOPPING_CART);

 $navigation->remove_current_page();

 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where 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>
<link type="text/css" rel="stylesheet" href="stylesheet.css">
<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=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +40, document.images[0].height+150-i);
 self.focus();
}
//--></script>
</head>
<body onload="resize();">
<p class="smallText" align="center">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>
<!-- <a href="java script:window.close()"><br><u> . TEXT_CLOSE_WINDOW . </u> [x]</a></p>--></p> 
<p class="smallText" align="center"><?php echo '<a href="java script:window.close()">' . TEXT_CLOSE_WINDOW . '</a>'; ?></p>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

See it in action at: https://hostcms.co.uk/shop :thumbsup:

one-click installation..

Dave's info

Posted

just FYI....

 

amendment needed to:

 

'<a href="java script:window.close()">'

 

should be:

 

'<a href="java script:window.close()">'

 

otherwise it brings a 404 error when trying to close the window

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...