KPGroup Posted November 24, 2006 Share Posted November 24, 2006 Hello MoPics gurus, I have MoPics working on my MS2 install. I had automatic thumbnail installed but I removed it after it stopped working and I decided to use the MoPics thumbnail method i.e. I also uplaod an image with _s appended to the filename. It worked great until... it stopped working. I am baffled. I didn't do anything to my store other than to add a new product. The _s file is no longer loaded eventhough it is present on the server. But this is for the 1st image only. The other images load the _s file fine and then load the full size image when I click on them... Any clues as to how to fix this? Thanks in advance. Karim. Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 24, 2006 Author Share Posted November 24, 2006 The _s file is no longer loaded eventhough it is present on the server. But this is for the 1st image only. The other images load the _s file fine and then load the full size image when I click on them... you must be using it with the more pics separated from the default pic. when that option was added, I forgot to update the directions for the thumbnail quick fix. Here are the rest of the changes for that option: also in product_info.php find: <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']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':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'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> <?php // EOF: More Pics 6 ?> </noscript> change to: <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.(file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$product_info['products_image']))?str_replace( '.','_s.',$product_info['products_image']):$product_info['products_image']), addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':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 . (file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$product_info['products_image']))?str_replace( '.','_s.',$product_info['products_image']):$product_info['products_image']), $product_info['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> <?php // EOF: More Pics 6 ?> </noscript> Quote Link to comment Share on other sites More sharing options...
KPGroup Posted November 24, 2006 Share Posted November 24, 2006 Thanks a lot for the fix surfalot. The small images are now _s files. It now works on the product_info page but it doesn't work on the index page when the products in one category are listed (ex: http://www.domain.com/index.php?cPath=25_56) Another problem is that when I click on the main (parent) small image in the product_info page, I get this: ------------------- Not Found The requested URL /java script:popupWindow('http://www.domain.com/popup_image.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.37 Server at www.domain.com Port 80 ------------------ If I click on another image (not the parent one), I can access the main image with the arrows in the popup window. Any ideas? Thanks. :thumbsup: you must be using it with the more pics separated from the default pic. when that option was added, I forgot to update the directions for the thumbnail quick fix. Quote Link to comment Share on other sites More sharing options...
KPGroup Posted November 24, 2006 Share Posted November 24, 2006 I think it is normal that the images on index.php are the full images but what about the error when I click on the image (to see the full one)? -------------------Not Found The requested URL /java script:popupWindow('http://www.domain.com/popup_image.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.37 Server at www.domain.com Port 80 ------------------ Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 25, 2006 Author Share Posted November 25, 2006 I think it is normal that the images on index.php are the full images but what about the error when I click on the image (to see the full one)? Can't tell you why. It's working perfectly with my test installation. I've tried IE and Firefox. If you provide a link to the page and the browser you are using, I can look at the output. Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 25, 2006 Author Share Posted November 25, 2006 It now works on the product_info page but it doesn't work on the index page when the products in one category are listed (ex: http://www.domain.com/index.php?cPath=25_56) yes, like I say in the directions, it's not an ideal solution. you need to make a change in each place an image is displayed. In the last instruction of the thumbnail quick fixes, I have replaced the $new_products['products_image'] with (file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$new_products['products_image']))?str_replace( '.','_s.',$new_products['products_image']):$new_products['products_image']) of the /catalog/includes/modules/new_products.php file. the icons on the product list (index.php) would be in: /catalog/includes/modules/product_listing.php replace each of these $listing['products_image'] with (file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$listing['products_image']))?str_replace( '.','_s.',$listing['products_image']):$listing['products_image']) Quote Link to comment Share on other sites More sharing options...
KPGroup Posted November 25, 2006 Share Posted November 25, 2006 Can't tell you why. It's working perfectly with my test installation. I've tried IE and Firefox. If you provide a link to the page and the browser you are using, I can look at the output. Thanks for the Help. Here is a link to a page where I have this problem: http://corner73.com/product_info.php?cPath...;products_id=44 If you click on the parent image, you get the error message. The other ones are fine... Let me know if you have an idea. Thanks again :thumbsup: Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 26, 2006 Author Share Posted November 26, 2006 (edited) Thanks for the Help. Here is a link to a page where I have this problem: I see the problem now. looks like we fell victim to the dreaded forum spacer. it's suppost to leave "code" items unchanged when posting. in the find and replace items I posted, in both, the forum inserted a space in the words "javascript". Search your page for "java script" and replace it with "javascript" Hopefully it didn't garble anything else up. Edited November 26, 2006 by surfalot Quote Link to comment Share on other sites More sharing options...
KPGroup Posted November 26, 2006 Share Posted November 26, 2006 I see the problem now. looks like we fell victim to the dreaded forum spacer. it's suppost to leave "code" items unchanged when posting. in the find and replace items I posted, in both, the forum inserted a space in the words "javascript". Search your page for "java script" and replace it with "javascript" Hopefully it didn't garble anything else up. That was simple! Works perfect. Thanks a million :thumbsup: Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted November 27, 2006 Share Posted November 27, 2006 If you view this link for example, http://www.prodigycellular.com/new/nokia-6...shed-p-283.html You can see it in action. Its a little glitchy to me, I dont know if that's because I have my next and prev images set, not just on hover.. Anyways, I just manually have it set up for now until I have time to fix it. I place the php code for the different subimages where I want them, might even give you more flexability to space them out as needed. The only bad part is, that it will be in the same place for ever product that is displayed. But, that's pretty much how it was before. Unless you actually echo'd the php thru your description field to place the images where you need them based on perhaps, certain text in your description. All I did was remove the morepics scripts in the product_info.php for where it places the above table. What happens if you have products without extra images? Would it be possible to code it so that there are no extra images present? I know that more pics 6 1.2b has an option in admin not to display the extra images yet when you click to enlarge the image you get the extra images, Would it be possible to make Lightbox to this also? Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
otn2000 Posted November 27, 2006 Share Posted November 27, 2006 My apologies for the previous long post, I am new to this whole thing. I still haven't figured out why: When I add multiple images to a product the primary image looks ok and has the click to enlarge link below but the pop-up link is not active. The other images seem to work just fine and you can see the primary when you use the arrows to scroll thru the images. If i just have one image as the primary the click to enlarge link works, so it is only when adding images. This seems to be a problem only on Windows IE, I am using XP SP2. Firefox doesn't seem to have this problem. I assume it is a problem using the JavaScript w/ IE. I have also noticed that IE doesn’t display the "Close Window" again another JavaScript issue http://www.fun4baby.com/catalog/diaper-bag...4aba751a60ede9f Any ideas on how I might resolve this? Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 27, 2006 Author Share Posted November 27, 2006 (edited) My apologies for the previous long post, I am new to this whole thing. I still haven't figured out why: When I add multiple images to a product the primary image looks ok and has the click to enlarge link below but the pop-up link is not active. The other images seem to work just fine and you can see the primary when you use the arrows to scroll thru the images. If i just have one image as the primary the click to enlarge link works, so it is only when adding images. This seems to be a problem only on Windows IE, I am using XP SP2. Firefox doesn't seem to have this problem. I assume it is a problem using the JavaScript w/ IE. I have also noticed that IE doesn’t display the "Close Window" again another JavaScript issue the close button is not a javascript problem, the image is not there: http://www.fun4baby.com/catalog/images/close.gif I'm not experiencing the problem you describe. Are you using IE7? I'm using IE6 still. the problem may be in your fixPNG() javascript. try removing that from the page and see if it works. none of the lines of your javascript end with a semicolon. All the line of a javascript should end with a semi-colon, just like PHP. Edited November 27, 2006 by surfalot Quote Link to comment Share on other sites More sharing options...
otn2000 Posted November 28, 2006 Share Posted November 28, 2006 Thanks sirfalot :D ... that fixed most of my problems. I am still having problems with IE, I even upgraded to IE 7 and still have the same problem... the picture ref works, but the click on enlarge text doesn't on IE only. Wierd I am not going to worry about. I even tried to take out the fixPNG completely and cleared cache. Moving on... Thanks again Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 29, 2006 Author Share Posted November 29, 2006 I am still having problems with IE, I even upgraded to IE 7 and still have the same problem... I see the problem now, it's only the bottom half of the image (and click text). That's why I didn't see it before. IE's rendering engine is stopping the link halfway down the image/text link area. This is related to the IE rendering engine problem. When 2 tables with alignments defined are in the same area, they can actually overlap like having 2 overlapping html DIVs with absolute positioning. the default product image is inside a right aligned table, the more pics are in a center aligned table. Long story short. the problem disappears when you have enough description text to push the More Pics images below the bottom of the default product image. If you are going to have products with very little or no description we can modify the more pics code for your shop and remove the table alignment on the more pics block. that will force the table below the default image and leave a blank space where a longer product description would be. The only other way to avoid this problem is to group the more pics images with the "parent", or default product image. (in the more pics config settings in you admin) You could make a one or 2 column image block along the side of your product description in the settings also. In the course of looking at this I have discovered a logic error in this more pics release that is outputting an empty table on the product with no additional images added. this will not affect the issue you are seeing, but look for an update to fix that in the future. Quote Link to comment Share on other sites More sharing options...
waruna Posted November 30, 2006 Share Posted November 30, 2006 Is there a way to change the file name (prodid_file name or somthing like that) on upload (insert/update) so that the file with the same name as of an excistiong one wont over write the original? Quote Link to comment Share on other sites More sharing options...
HelleM Posted November 30, 2006 Share Posted November 30, 2006 This contrib sound interesting - I wonder if you are in control over where the images are uploaded? I mean, I have several categories, and have made image folders for each, so it's like: images/cat1/ lots of images.... images/cat2/ even more pictures... etc. Can you this contrib select which folders to upload to everytime you put in a new product? Helle :-) Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted November 30, 2006 Share Posted November 30, 2006 This contrib sound interesting - I wonder if you are in control over where the images are uploaded? I mean, I have several categories, and have made image folders for each, so it's like: images/cat1/ lots of images.... images/cat2/ even more pictures... etc. Can you this contrib select which folders to upload to everytime you put in a new product? Helle :-) Look in the other contrib intergration folder Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
HelleM Posted November 30, 2006 Share Posted November 30, 2006 Look in the other contrib intergration folder Ehhhh what other "contrib intergration folder" - do you mean look for another contrib? Sorry, I just don't understand your answer Helle :-) Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 30, 2006 Author Share Posted November 30, 2006 Is there a way to change the file name (prodid_file name or somthing like that) on upload (insert/update) so that the file with the same name as of an excistiong one wont over write the original? no. As in the original osC code, this contrib assumes you are paying attention to name files uniquely Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 30, 2006 Author Share Posted November 30, 2006 Ehhhh what other "contrib intergration folder" - do you mean look for another contrib? Sorry, I just don't understand your answer Helle :-) the folder Get-Wireless 2 is refering to is in the zip package you downloaded. But that won't help. no there is no a way to specify the folder the image is uploaded to. aside from deleting images not it use anymore, this contrib uploads images the same way the original osC code does. Quote Link to comment Share on other sites More sharing options...
HelleM Posted November 30, 2006 Share Posted November 30, 2006 the folder Get-Wireless 2 is refering to is in the zip package you downloaded. But that won't help. no there is no a way to specify the folder the image is uploaded to. aside from deleting images not it use anymore, this contrib uploads images the same way the original osC code does. Okay - thank you. Then I can't use this contrib.... Helle :-) Quote Link to comment Share on other sites More sharing options...
nae Posted December 1, 2006 Share Posted December 1, 2006 Please, pRiebe, wilfy, maybe surfalot, Did you find the line to replace for the $mopics_output to succeed opening the link in a lightbox? I'm trying to replace $mopics_output .= ' <td align="center" class="smallText"><script language="javascript"><!-- document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\'); //--></script><noscript> <a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a> </noscript></td>'."\n"; I'd like to have the same pictures displayed but with the linkrel lightbox. To explain, I'm in the middle of the morepics / ajax popup image conflict! The first contrib display 6 products below the description and the second display them in one column to the right. If I delete the lines about the column, I don't have the lightbox previous and next buttons. So I let the lines but replaced pictures'adress by a "blank.gif" one pixel. (except for the first one, the principal picture, in order to open the lightbox and have the previous and next buttons) Now stand the 6 products displayed by the morepics contrib, but they open in a new pop up window, what I don't like. It seems to work at these two oscommerce adresses found in this thread: http://www.prodigycellular.com/new/nokia-6...shed-p-283.html http://www.jaldijaldi.co.uk/product_info.p...products_id=122 so maybe you can help me. And I'm very sorry that I didn't know how to explain my problem shortlier, and for my english! Thanks. Quote Link to comment Share on other sites More sharing options...
acharme Posted December 1, 2006 Share Posted December 1, 2006 I have read until I am cross-eyed, I have hunted and pecked with HTML kit and winmerge, I have the tools, but not the knowledge. I have sts 4 (with header tags) and on the fly thumbnails. I am trying to get more pics installed. I get "Parse error: parse error, unexpected T_ELSE in .../admin/categories.php on line 844" and of course I cannot get into admin catalog. My admin config works fine, and the more pics option is there and seems to be functional. Here is some of the code before and after line 844: <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table></form> <!-- HTC BOC //--> <?php } elseif ($action == 'new_product_preview') { if (tep_not_null($HTTP_POST_VARS)) { $pInfo = new objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_head_title_tag = $HTTP_POST_VARS['products_head_title_tag']; $products_head_desc_tag = $HTTP_POST_VARS['products_head_desc_tag']; $products_head_keywords_tag = $HTTP_POST_VARS['products_head_keywords_tag']; $products_url = $HTTP_POST_VARS['products_url']; } else { // BOF: More Pics 6 Added: , p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6 $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'"); // EOF: More Pics 6 $product = tep_db_fetch_array($product_query); I am pretty sure that it is simply an extra bracket or...from when I merged the two files, but I simply cannot find it. Can someone help a newbie through this pretty please? Quote learn...love...laugh...live Link to comment Share on other sites More sharing options...
acharme Posted December 1, 2006 Share Posted December 1, 2006 Now I feel dumb. All I had to do was break down and ask for help, and then go read another thread and I find a link to 'Edit Plus'. It tracked down my missing bracket with about a 30 second learning curve! So, now I can get into my administration catalog, looks great. *Until* I try to add a product. What a mess!! I don't know how to take a screenshot, but I have three seperate instances of 'product image1/remove image/product image2/remove' etc. And no picture files are being uploaded when I hit preview! I am way out of my league here. If some PHP guru could find it in their heart... Quote learn...love...laugh...live Link to comment Share on other sites More sharing options...
Guest Posted December 1, 2006 Share Posted December 1, 2006 hey Nae, I didn't actually script it to work with the contribution. I have each one of those pictures set manually. I dont use the columns and rows that is in the admin file. I stopped working on this because I had issues with the live site. I am sure I will back on this again here shortly and I will reply with fixed $mopics_output. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.