Community Add-Ons

Maintainers: slattman
Add file to this package
Top » Images

OSC Plus Highslide
for osCommerce Online Merchant v2.2

This integrate highslide with your product listing images to
pop them up into the fancy highslide boxes dynamically.

Special thanks to Torstien Honsi, the creator of highslide.


step 1:
download and the latest version of highslide.
Please note. Highslide JS is not free for commercial use.
http://vikjavev.no/highslide/download.php

step 2:
copy the highslide folder to your catalog directory

step 3:
open up catalog/index.php
find:

</head>

replace with:
<script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript" src="highslide/highslide-html.js"></script>
<script type="text/javascript">
hs.graphicsDir = 'highslide/graphics/';
hs.outlineType = 'rounded-white';
window.onload = function() {
hs.preloadImages(5);
}
</script>
</head>

step 4:
open catalog/includes/modules/product_listing.php
find:
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
} else {
$lc_text = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>&nbsp;';
}
break;

replace with:
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a id="thumb'.$listing['products_id'].'" class="highslide" onclick="return hs.expand(this);" href="' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
} else {
$lc_text = '<a id="thumb'.$listing['products_id'].'" class="highslide" onclick="return hs.expand(this);" href="' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>&nbsp;';
}
break;

thats it!

enjoy,
brad
postmaster@phaseonemedia.com
http://phaseonemedia.com

Legend:  Download   Report
Expand All / Collapse All
[CORRECTIVE] of Step 4 Captain_FLAM 31 Jan 2008  

This is the corrective of the Step 4, because the defaut below doesn't work ...

Enjoy !

OSC Plus Highslide slattman 30 Jan 2008