Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change links from index.php


onesite99

Recommended Posts

Hi all

 

I want to change the links under the thumbnails on index.php

 

They now link to product_info.php but I want them to link to popup_image.php

 

I search the whole board but can't find a contribution or whatever.

 

Is this possible and if yes: how?

 

 

In case I overlooked something: sorry

Link to comment
Share on other sites

Did you want to change the image in the "new products" box so that it pops the large sized image, but still has the text linking to the actual product page?

 

Ok, here goes.. (I can't guarantee that this will work, so please keep a backup)

 

In your catalog/includes/modules/new_products.php you will see the following bit of code

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

 

In the product_info.php there is this code for the popup image

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript: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>

 

so I'm thinking that maybe if you replace top code, with bottom code, it might show the popup??? You would have to remove the CLICK TO ENLARGE parts though, so that would make the code this instead

 <script language="javascript"><!--
document.write('<?php echo '<a href="javascript: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"') . '</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"') . '</a>'; ?>
</noscript>

 

This is just a wild guess, so PLEASE PLEASE PLEASE backup first!

-------------------------------------------------------

 

I used to be insane, but now I'm just nuts ;)

Link to comment
Share on other sites

  • 2 weeks later...

Archived

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

×
×
  • Create New...