Okay.
I did a clean install of oscommerce-2.2ms2.zip
I downloaded the file called "Simple Template System (STS) v2.01"
I copied all of the files extracted from it to the includes directory.
I then followed the directions from the file that is supposed to help you fix the click to enlarge bug in sts.
What am I doing wrong? Everything works fine but one thing.
When I click on the thumbnail to enlarge the images it comes up to a page but not the image.
Any help would be appreciated. I've been trying to figure this out for a week. I'm missing something.
Thanks.
Dave.
6/10/05
How to use pop up or click to enlarge with the product_info.php.html file
***Special thanks to the STS man himself Brian Gallagher for his help with this,
***Couldn't have done it without him.
STEP ONE
In sts_product_info.php
change this below:
// Start the "Add to Cart" form
$template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);
$template['endform'] = "</form>";
To this:
// Start the "Add to Cart" form
$template['productid'] = $product_info['products_id'];
$template['productsid'] = $product_info['products_id']; // Just for consistende with osC names
$template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);
$template['endform'] = "</form>";
STEP TWO
In your product_info.php.html file (which should be in your "sts_templates" folder)
My "click to enlarge" link worked with this below added between the <head> and </head> section:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<noscript>
STEP THREE
Then elsewhere in the body of product_info.php.html for the actually link,
I inserted the code below.
<script language="javascript"><!--
function popupWindow(url) {
url = url + '<?php echo $products_id ?>'
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>
<a href="java script:void(0)" onClick="MM_callJS('popupWindow(\'popup_image.php?pID=$productid\')')">
$imagesmall</a><a href="java script:void(0)" onClick="MM_callJS('popupWindow(\'popup_image.php?pID=$productid\')')">
See Bigger Image</a>
----------------------