Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pop Up Images


barryj

Recommended Posts

I am not getting an image to display when clicking on the image or 'click to enlage' text in the product info page. I looked at the code on the product_info.php page and saw this

 

<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 noticed that there is no path to the directory, for the popup_image.php file, so I put in variations of what I thought should be in the <a href="java script:popupWindow(\\\'' etc but with no avail. Has anybody got any ideas that will help.

 

Thanks

:(

Link to comment
Share on other sites

I think the code looks okay at first glance.

 

Are you using STS or BTS?

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

look like it redirects to another shop so I cant see it. Well you could check the includes\configure.php if the image path is set. Also check if you have a popup blocker active or your browser has something like that.

 

and dont post dbase info here from that file!!!

Link to comment
Share on other sites

look like it redirects to another shop so I cant see it. Well you could check the includes\configure.php if the image path is set. Also check if you have a popup blocker active or your browser has something like that.

 

and dont post dbase info here from that file!!!

 

 

Sorry about that, I forgot to add /storefront

 

www.naturaleatsofnorthcarolina.com/storefront

 

There is 301 redirect to the other url from the index page which is the website for the store.

Link to comment
Share on other sites

Sorry about that, I forgot to add /storefront

 

www.naturaleatsofnorthcarolina.com/storefront

 

There is 301 redirect to the other url from the index page which is the website for the store.

 

I notice that if you click on the image the popup box appears with no image and when you right click on the popup box the cose is like this

 

http://www.naturaleatsofnorthcarolina.com/...popup_image.php?

 

with no refernce to an image appended to the url.

Link to comment
Share on other sites

I notice that if you click on the image the popup box appears with no image and when you right click on the popup box the cose is like this

 

http://www.naturaleatsofnorthcarolina.com/...popup_image.php?

 

with no refernce to an image appended to the url.

 

 

In addition to the previous post if you mouse over the image on the info page you will see appended information, but this is not being passed to the popup_image.php page.

 

I was using the sampler package as an example

Link to comment
Share on other sites

yes now I see the problem is the image gets the session id and the final slash is added at the end. so try this

 

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'], 'NONSSL', false) . '\\\')">' . 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 only did it for the jscript case.

Link to comment
Share on other sites

Thanks for your effort, I have not experienced a session not going to a popup, especially as they are pssing to every other page. It's odd, I also check it in Netscape incase Iit was just ie, but the same.

 

Thanks again.

Link to comment
Share on other sites

ok I think the problem is the img tag inserts the "storefront" in the image path. So check the DIR_WS_IMAGES should be like this

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...