Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Different Popup Image


dalec

Recommended Posts

Posted

I am looking for a way to have a different popup image instead of the same product thumbnail. I found a contribution called DIFFERENT POPUP IMAGE, but it says it is for a clean version of PRODUCT_INFO.PHP. I have made changes to that file already.

 

Does anyone have the individual code I would need or possible another contribution that will work?

Posted

Backup your files

Ok on the product_info.php file there is a Java screep that looks like

<!--
						  <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>

 

Change it to

 

<!--
						  <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_Large . $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>

 

Now you have to find on the config.php file a line that loojs like

 

  define('DIR_WS_IMAGES', 'images/');

 

and change it to

 

  define('DIR_WS_IMAGES', 'images_Large/');

 

now create a folder named images_Large and upload your large images to it and it should work just fine

 

Backup your files

at the end of the day the code will be good

Posted
The large Image should have the same name as the Thumnail [

 

Thanks for helping me. I have changed the product_info.php file and your next step says to change the config.php file.

 

I cannot find a config.php file but have a couple of configure.php files in different folders. Could you please be more specific on which file to changes.

 

Thanks

Posted
Thanks for helping me. I have changed the product_info.php file and your next step says to change the config.php file.

 

I cannot find a config.php file but have a couple of configure.php files in different folders. Could you please be more specific on which file to changes.

 

Thanks

 

I have tried to replace my original files back and some code has gotten changed. I now do not have a item pop up window. Any idea where the code is to fix that.

Posted
Thanks for helping me. I have changed the product_info.php file and your next step says to change the config.php file.

 

I cannot find a config.php file but have a couple of configure.php files in different folders. Could you please be more specific on which file to changes.

 

Thanks

 

 

config.php file is located under includes/configure.php

at the end of the day the code will be good

Posted
I have tried to replace my original files back and some code has gotten changed. I now do not have a item pop up window. Any idea where the code is to fix that.

 

 

This is the Original code

 

 

 

<!--
<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>

at the end of the day the code will be good

Posted
This is the Original code

<!--
<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>

 

I have tried to install this contribution code a couple of times and when I run it it changes my small thumbnails to the new thumbnail.

 

I would realy like to use this if I could get it to work.

Archived

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

×
×
  • Create New...