Jump to content



Latest News: (loading..)

- - - - -

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2


  • Please log in to reply
1575 replies to this topic

#21   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 14 December 2005 - 09:42 PM

I also have thumbnails on the fly installed and working, found here http://www.oscommerce.com/community/contributions,2226 ,  and I can't get more than one image to show up at a time. I'm assuming this is an issue between the two contributions, any suggestions on where to look to get it working properly?

Here's an example that I'll leave up for a while, the store's not live yet:
http://www.mattmasonms.com/catalog/product...&products_id=74

I have the morepics config set to 2 rows, 3 columns, centered, show all thumbnails, and it simply won't show up as it should no mater where I try to place or arrange it. That particular product has two images.

Any tips or pointers you can offer are very much appreciated, I'd be happy to post any files you would need to look at :)

Edited by doctorstupid, 14 December 2005 - 09:42 PM.


#22   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 14 December 2005 - 09:48 PM

And as you can see here, even products with only one image are displaying the same image twice in the product info
http://www.mattmasonms.com/catalog/product...&products_id=57

#23   pieterj

pieterj
  • Members
  • 12 posts
  • Real Name:Pieter

Posted 14 December 2005 - 11:10 PM

Last week, I installed the MorePics_6 1.1 contribution, and it works very nice. Today, I added the Ultimate SEO 2.1d contribution, but now the images do not appear in the popup boxes....

(I also posted this question in the SEO thread, I'm not sure if this is allowded, if not please forgive me!)

Does anyone recognize this? And is there a solution for it, besides turning of the SEO feature in the Admin?

Thanks for your help!

#24   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 15 December 2005 - 12:04 AM

View Postdoctorstupid, on Dec 14 2005, 04:48 PM, said:

And as you can see here, even products with only one image are displaying the same image twice in the product info
http://www.mattmasonms.com/catalog/product...&products_id=57

Sorry, only seeing a supertracker error at the moment. I don't know much about thumbnails on the fly.  I did try to use all the appropriate tep_ functions when coding this so it *should* be compatible with other properly coded contribs. If I get some time this weekend, I'll look at thumbnails on the fly and see where they overlap.

If you are having duplicate images you probably didn't comment out the original image display code starting at line 149 of the contribution file products_info.php.

#25   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 15 December 2005 - 12:08 AM

View Postpieterj, on Dec 14 2005, 06:10 PM, said:

I added the Ultimate SEO 2.1d contribution, but now the images do not appear in the popup boxes....
Yeah, cross-post is a no-no.

I ran into this problem also. I had left the old hard coded img tags in the popup_image.php from the original MoPics. I meant to update that. I just posted a fixed popup_image.php file in the latest 1.1a. Try the new file.

#26   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 15 December 2005 - 02:05 AM

View Postsurfalot, on Dec 14 2005, 05:04 PM, said:

Sorry, only seeing a supertracker error at the moment. I don't know much about thumbnails on the fly.  I did try to use all the appropriate tep_ functions when coding this so it *should* be compatible with other properly coded contribs. If I get some time this weekend, I'll look at thumbnails on the fly and see where they overlap.

If you are having duplicate images you probably didn't comment out the original image display code starting at line 149 of the contribution file products_info.php.
yeah, I've been screwing around with the server for a while, should be all solved.

I'll take a look in in products_info.php, thanks!

#27   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 15 December 2005 - 02:11 AM

Looks commented out from here:
<?php /* BOF: More Pics 6
	if (tep_not_null($product_info['products_image'])) {
?>
		  <table border="0" cellspacing="0" cellpadding="2" align="right">
			<tr>
			  <td align="center" class="smallText">
<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>
			  </td>
			</tr>
		  </table>
<?php
	}  */

If I post the files, will that make it easier for you to troubleshoot?

Edited by doctorstupid, 15 December 2005 - 02:11 AM.


#28   pieterj

pieterj
  • Members
  • 12 posts
  • Real Name:Pieter

Posted 15 December 2005 - 08:37 AM

View Postsurfalot, on Dec 15 2005, 01:08 AM, said:

Yeah, cross-post is a no-no.

I ran into this problem also. I had left the old hard coded img tags in the popup_image.php from the original MoPics. I meant to update that. I just posted a fixed popup_image.php file in the latest 1.1a. Try the new file.

Sorry for the cross-post...  :blush:

Tonight I'll update the files to 1.1a, thank you very much for the quick reply!

#29   pieterj

pieterj
  • Members
  • 12 posts
  • Real Name:Pieter

Posted 16 December 2005 - 04:04 PM

View Postsurfalot, on Dec 15 2005, 01:08 AM, said:

Yeah, cross-post is a no-no.

I ran into this problem also. I had left the old hard coded img tags in the popup_image.php from the original MoPics. I meant to update that. I just posted a fixed popup_image.php file in the latest 1.1a. Try the new file.
I updated the new file popup_image.php from version 1.1a, and also product_info.php, but unfortunately, it doesn't work..... May be there are other possible problems that cause this popup problem?

#30   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 16 December 2005 - 11:35 PM

I just found out that supertracker was causing an error on my site, and since it was set up to ignore my IP, i was the only person not seeing that error. Should be all fixed now.

#31   doctorstupid

doctorstupid
  • Members
  • 93 posts
  • Real Name:Tom Young

Posted 17 December 2005 - 12:57 AM

I ran into some other problems, and had to redo the changes to product_info.php (as it's already been modified quite a bit), works flawlessly now. Thanks anyway, looks great and works great!

#32   docprego

docprego
  • Members
  • 193 posts
  • Real Name:Mike
  • Location:Henderson, Nevada

Posted 18 December 2005 - 12:59 AM

I have installed morepics and really find it to be quite excellent.

The only problem is that I cannot delete images.  I select the check box next to the image and I hit preview but the image still shows on the next screen.  So then I hit update and it does not change the product listing, the image is still shown on the product page.  I checked my images directory on the server and the image is still there.  My images directory is set to 777.

Thank you for the great contribution, if I could fix this it would be absolutely perfect.

BTW, I had morepics installed on another installation of OSC a few days ago and I could swear it was working fine then.  I noticed when I downloaded that this file was newer than the previous one where it all worked.

Mike

Edited by docprego, 18 December 2005 - 01:00 AM.


#33   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 18 December 2005 - 01:28 AM

Sounds like you missed the same block of code as dainbramaged05 in post #5.

I would suggest that maybe the block code in lines 230-285 in /admin/categories.php of the package didn't get in your production file.

#34   docprego

docprego
  • Members
  • 193 posts
  • Real Name:Mike
  • Location:Henderson, Nevada

Posted 18 December 2005 - 01:47 AM

View Postsurfalot, on Dec 18 2005, 01:28 AM, said:

Sounds like you missed the same block of code as dainbramaged05 in post #5.

I would suggest that maybe the block code in lines 230-285 in /admin/categories.php of the package didn't get in your production file.


I checked and the code is there, I will paste it here to make sure:

// BOF: More Pics 6
  if (isset($HTTP_POST_VARS['products_subimage1']) && tep_not_null($HTTP_POST_VARS['products_subimage1']) && ($HTTP_POST_VARS['products_subimage1'] != 'none')) {
            $sql_data_array['products_subimage1'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage1']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_3'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage1]);
$sql_data_array['products_subimage1'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
          if (isset($HTTP_POST_VARS['products_subimage2']) && tep_not_null($HTTP_POST_VARS['products_subimage2']) && ($HTTP_POST_VARS['products_subimage1'] != 'none')) {
            $sql_data_array['products_subimage2'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage2']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_5'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage2]);
$sql_data_array['products_subimage2'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
  if (isset($HTTP_POST_VARS['products_subimage3']) && tep_not_null($HTTP_POST_VARS['products_subimage3']) && ($HTTP_POST_VARS['products_subimage3'] != 'none')) {
            $sql_data_array['products_subimage3'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage3']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_7'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage3]);
$sql_data_array['products_subimage3'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
            if (isset($HTTP_POST_VARS['products_subimage4']) && tep_not_null($HTTP_POST_VARS['products_subimage4']) && ($HTTP_POST_VARS['products_subimage4'] != 'none')) {
            $sql_data_array['products_subimage4'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage4']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_9'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage4]);
$sql_data_array['products_subimage4'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
            if (isset($HTTP_POST_VARS['products_subimage5']) && tep_not_null($HTTP_POST_VARS['products_subimage5']) && ($HTTP_POST_VARS['products_subimage5'] != 'none')) {
            $sql_data_array['products_subimage5'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage5']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_11'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage5]);
$sql_data_array['products_subimage5'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
  if (isset($HTTP_POST_VARS['products_subimage6']) && tep_not_null($HTTP_POST_VARS['products_subimage6']) && ($HTTP_POST_VARS['products_subimage6'] != 'none')) {
            $sql_data_array['products_subimage6'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage6']);
          }
  //add delete image function
if ($HTTP_POST_VARS['delete_image_13'] == 'yes') {
unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_subimage6]);
$sql_data_array['products_subimage6'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
  }
  //end delete image function
// EOF: More Pics 6

Thank you for your help, I would love to solve this.

#35   pieterj

pieterj
  • Members
  • 12 posts
  • Real Name:Pieter

Posted 18 December 2005 - 11:06 AM

View Postsurfalot, on Dec 15 2005, 01:08 AM, said:

Yeah, cross-post is a no-no.

I ran into this problem also. I had left the old hard coded img tags in the popup_image.php from the original MoPics. I meant to update that. I just posted a fixed popup_image.php file in the latest 1.1a. Try the new file.

Do you have any idea for other possibilities to get it work? I updated the popup_image.php file to the latest version 1.1a (fixed img tags), but the popup images are still not working...
I really like MorePics in my shop, and I understood that the contrib Ultimate SEO works very well also for the results in the search engines, so that combination would be perfect

:)

Does 1.1a work in your shop, Surfalot?

#36   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 18 December 2005 - 04:07 PM

View Postdocprego, on Dec 17 2005, 08:47 PM, said:

I checked and the code is there, I will paste it here to make sure:
keep looking in /admin/categories.php. you missed something.

#37   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 18 December 2005 - 05:41 PM

View Postpieterj, on Dec 18 2005, 06:06 AM, said:

Does 1.1a work in your shop, Surfalot?
Yes, it does work on a couple of shops that have Ultimate SEO installed, but those shops are injecting the SID in to the URL which is correcting the problem. I see the problem when installing the two contribs on a virgin shop. This is in addition to the other ones I ran into.

find in product_info.php:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '&invis='.$mo_item

replace with:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.$mo_item)

I'll post a corrected contrib file later.

#38   docprego

docprego
  • Members
  • 193 posts
  • Real Name:Mike
  • Location:Henderson, Nevada

Posted 19 December 2005 - 10:19 AM

View Postsurfalot, on Dec 18 2005, 05:41 PM, said:

Yes, it does work on a couple of shops that have Ultimate SEO installed, but those shops are injecting the SID in to the URL which is correcting the problem. I see the problem when installing the two contribs on a virgin shop. This is in addition to the other ones I ran into.

find in product_info.php:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '&invis='.$mo_item

replace with:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.$mo_item)

I'll post a corrected contrib file later.

Surfalot, what do you mean by "keep looking in /admin/categories.php. you missed something."?

What have I missed?  I pasted the code exactly how it appears in my categories.php file.  To be honest I love your contribution so much that I just delete the whole product listing now if I need to delete an image.  It is a crude work around as I lose the entire product listing, but to be fair I have not had to do this but a couple of times.

Anyway if you could tell me what to look for I would like to correct it.

Thank you.

Edited by docprego, 19 December 2005 - 10:20 AM.


#39   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 19 December 2005 - 04:23 PM

View Postdocprego, on Dec 19 2005, 05:19 AM, said:

Surfalot, what do you mean by "keep looking in /admin/categories.php. you missed something."?
I don't have the ability to see your code, so I can't tell you what was missed or misplaced. This has worked well on a default install of osCommerce and many other non-default installations, and by your admission, other sites you work on.

View Postdocprego, on Dec 19 2005, 05:19 AM, said:

Anyway if you could tell me what to look for I would like to correct it.
The code I pointed out earlier is the code that facilitates the functionality your missing. You need to check and make sure it is in the correct position in your code. If your code is modified, it would not necessarily be the same line number. If you check the delete image box and save, and the image is still there, this is the code that does it.

When this works correctly, you will see the images you are trying to delete on the confirmation page. But once you submit the confirmation page, the block of code starting at line 230 will remove those images and the references in the database.

Edited by surfalot, 19 December 2005 - 04:24 PM.


#40   pieterj

pieterj
  • Members
  • 12 posts
  • Real Name:Pieter

Posted 19 December 2005 - 05:55 PM

View Postsurfalot, on Dec 18 2005, 06:41 PM, said:

Yes, it does work on a couple of shops that have Ultimate SEO installed, but those shops are injecting the SID in to the URL which is correcting the problem. I see the problem when installing the two contribs on a virgin shop. This is in addition to the other ones I ran into.

find in product_info.php:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '&invis='.$mo_item

replace with:
tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.$mo_item)

I'll post a corrected contrib file later.

It works! Perfect!

Thank you very much, Surfalot!