Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to integrate overLIB in osCommerce ?


mondobongo3

Recommended Posts

A few days ago i have started to post on this forum, in a desperate try to fix my (future) website, but I wasn't too lucky for now...

Maybe this time will be with greater chances for a good solution.

 

I just found overLib (click to see) , it's a simple and nice JS library to make tooltips.

to integrate it in pure html is simple, but I wasn't able to insert it in PHP code.

I want to put it where hrefs for product images are created (which are those files, aniway ?).

 

in principle, is something like this:

<html>
<head>
<script type="text/javascript" src="overlib421/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
</head>
<body>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>

<a href="http://www.google.com" onmouseover="return overlib('My Message, or image...or -see the Documentation', WIDTH, 300, HEIGHT, 300);" onmouseout="return nd();">Go to Google !</a>

</body>
</html

 

But including it in php resulted in failure, especially for me, because all PHP I know was learend in this 3-4 days :D

 

-the tooltip can show picture, as well.

I don't want something complicated... just to find a way to put it in constructor code for product's picture link, and the picture shown to be something like this: assuming that product's picture path is "images/aa_duracell.jpg", the picture for tooltip will be on "image/popup/detail_aa_duracell.jpg". Or something like that... In this way I can load products now and pictures for popups later.

 

Please test it before put a simple concatenate solution !! I wrote this post after everything I tried did not worked as expected.

Link to comment
Share on other sites

This is a part of code from new_products.php which i try to render. It's not complete snippet, but I closed the simple quotes to display the syntax highlight correct on page.

 

'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . ' onmouseover="return overlib(\'Some Tooltip Message\', WIDTH, 300, HEIGHT, 300);" onmouseout="return nd();">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'

 

and here is the output :blink:

 

<A onmouseout="return nd();" href="http://localhost/catalog/product_info.php?products_id=34&osCsid=e0qsut3kf2jt0bofv3ert23p22 onmouseover=" 300);? HEIGHT, 300, WIDTH, return Message?, Tooltip overlib(?Some><IMG title=" product5 " border=0 alt=product5 src="images/"></A>

 

it's very strange, at least in my oppinion...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...