Forums / Templates, Stylesheets, Page Layout / How to have product image popup instead of link?

How to have product image popup instead of link?

Locked

Started by drmike on 28 Oct 2007, 1:21 AM · Views: 1,661

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 Oct 2007, 1:21 AM
#1
drmike avatar

drmike

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

How to have product image popup instead of link?

I am trying to cause the product image on the Product listing page to trigger a popup (of the LRG image) instead of linking to the product description page. I have an OSC cart that I modded to do this, but can't figure it out in Zen. I really just need the product image on the Listing page to act like the image on the Description page. I tried just cutting and pasting the code, but I could not get it to work. Please help. Here is the OSC code that does this on the Product listing page (www.store.drstadtmauer.com):

case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['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 = '

			<script language="javascript"><!--

			document.write(\'<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $listing['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], addslashes($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>Click for Label</a>\');

			//--></script>

			<noscript>

			<a href="' . tep_href_link(DIR_WS_IMAGES . $listing['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>

			</noscript>';

        }
        break;
28 Oct 2007, 3:36 AM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: How to have product image popup instead of link?

Try installing Image Handler 2. You can see it in action on the Holzheimer's site in my sig.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

28 Oct 2007, 3:58 AM
#3
drmike avatar

drmike

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Re: How to have product image popup instead of link?

Thank you for your suggestion. It might be a work around - but it still does not seem to let you change what happens when you click on the image. The above mod offers a definable popup as a hover, but I want it to be a popup window that opens.

Anyone have any ideas? Thanks.

I should say that there is very similar code to the OSC code above in tpl_modules_main_product_image.php, I just can't get it to work in the Product Listing module.

28 Oct 2007, 4:09 AM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: How to have product image popup instead of link?

Perhaps if you download IH2 and look at how it's structured, you might get an idea of how to make it work the way you want. It could be a neat addition to the available downloads. :smile:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey