Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Scrollable popup_image or new window


inga_g

Recommended Posts

Posted

I've spent countless hours searching for a solution, but in vain. So I ask here if somebody knows what to do.

 

My site has very large product images (2800 pixel). Therefore the pop-up window only shows part of an image. Because I want to show the images in original size, I need a vertical scrollbar at the right. I wouldn't mind if the pop-up window was just a normal browser window.

 

Any suggestions on how to modify the script in popup_image.php in order to achieve this goal?

 

Note: I've read somewhere else that one could simply turn "scrollbar=no" to "scrollbar=yes" and similar advices. But there isn't anything like that in the script.

 

Thanks in advance for your precious time :-)

 

Chris

 

See below the current original code:

 

 

require('includes/application_top.php');

 

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

<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 +30, document.images[0].height+60-i);

self.focus();

}

//--></script>

</head>

<body onload="resize();">

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

</body>

</html>

<?php require('includes/application_bottom.php'); ?>

Posted

Look in product_info.php for this code:

 

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

That's where to make your "scrollbar=no" to "scrollbar=yes" change.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Look in product_info.php for this code:

 

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

That's where to make your "scrollbar=no" to "scrollbar=yes" change.

 

 

That was it. Sometimes it's sooooo easy - but you have to know how.

 

1000 x thanks!

 

Chris

Archived

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

×
×
  • Create New...