Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Make Click To Enlarge Text Clickable?


Guest

Recommended Posts

Posted

I'd like to have some text under each image on productinfo, which says "click to enlarge". I've been able to get the text there, but not make it clickable in the same way as the image is. My code looks like this;

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2, 'hspace="5" vspace="5" style="margin-right:13px;"') . '</a>'; ?>

</noscript><center>[Click to enlarge]</center></td></tr>

 

Could someone advise how I could tweek this so that [click to enlarge] is also clickable?

 

Thanks guys & gals.

Posted

The text is already there in my product_info.php.

 

This starts from line 109 in my file.

 

This what mine looks like -

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

I think this may have come with a template I added, although I thought it was already part of OSCommerce! :)

Posted
The text is already there in my product_info.php.

 

This starts from line 109 in my file.

 

This what mine looks like -

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

I think this may have come with a template I added, although I thought it was already part of OSCommerce! :)

 

Got it thank you, my code didnt have that, but I've edited it accordingly and its working a treat. I also stuck a . '<center>' . and . '</center>' . in there, to make it appear in the middle of the image rather than to the left.

 

Thanks again.

Archived

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

×
×
  • Create New...