barryj Posted September 1, 2005 Share Posted September 1, 2005 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 More sharing options...
Winterchild Posted September 1, 2005 Share Posted September 1, 2005 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 More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 I think the code looks okay at first glance. Are you using STS or BTS? <{POST_SNAPBACK}> OK got me there what is STS or BTS? Link to comment Share on other sites More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 OK got me there what is STS or BTS? <{POST_SNAPBACK}> OK I earched for STS and BTS but that doesn't help me know which I am using, I have the install from my cPanel server and it is osCommerce 2.2-MS2 Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 hi barry whats the url for your shop? Link to comment Share on other sites More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 hi barry whats the url for your shop? <{POST_SNAPBACK}> www.naturaleatsofnorthcarolina.com It has't been released to the public yet until I get the catalogue finished but is fully functional. Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 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 More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 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!!! <{POST_SNAPBACK}> 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 More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 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. <{POST_SNAPBACK}> 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 More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 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. <{POST_SNAPBACK}> 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 More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 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 More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 no thats not it. Somehow your session is lost during the transition from the info page to enlarge the pic. Link to comment Share on other sites More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 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 More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 is the popup_image.php the default one? or you made mods there? Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 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 More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 Sorry, but which file are you referring to this is in the configure.php file define('DIR_WS_IMAGES', '/storefront/images/'); Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 yes thats the one. It should be like this: define('DIR_WS_IMAGES', 'images/'); Link to comment Share on other sites More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 yes thats the one. It should be like this: define('DIR_WS_IMAGES', 'images/'); <{POST_SNAPBACK}> Thanks a bunch, that worked, do you think this should be changed also define('DIR_WS_ICONS', '/storefront/icons/'); Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2005 Share Posted September 1, 2005 yes check against the default config for the image paths in general. Should be the same Link to comment Share on other sites More sharing options...
barryj Posted September 1, 2005 Author Share Posted September 1, 2005 I check it all and once again thanks for your help I really appreciated it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.