Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

Is there any way for the main page whats_new to use the more pics filename_s.gif thumbnails as well?

 

Great contrib.

 

Regards

Share this post


Link to post
Share on other sites
SurfALot - Is it possible for you to modify the pop-up source and submit it for the contribution for the images to show up on the pop-up instead of the page? Let me know if you can do that, you the man.

Thank you.

Something like that is what I would like to do for a future version, but can't make any ETA promises at the moment.

Share this post


Link to post
Share on other sites

This is a great contribution... Got it working with my moddoed osC without any problems.. But there is a slight little problem I have.. On my product pages, the space reserved for More Pics 6 is still there, regardless whether I have more than one picture or not..

 

This becomes a bit problematic because I have a reviews section right under More Pics 6. There is a huge gap between the product description and the reviews section if I don't have additional images or no images at all.

 

 

 

Regards,

Danny

Share this post


Link to post
Share on other sites

try this:

 

find in /catalog/product_info.php

 

if (MOPICS_TABLE_LOCATION=='below') {

 

change to this:

 

if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) {

Share this post


Link to post
Share on other sites
try this:

 

find in /catalog/product_info.php

 

if (MOPICS_TABLE_LOCATION=='below') {

 

change to this:

 

if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) {

 

Hey Todd,

The following didn't work out. It is still persisting to do the same thing. The following is the code I have below. Take a gander and lemme know if there's something I'm missing out on or not doing properly.. Or perhaps you have an alternative method to alleviate the problem.

 

UPDATE: Update checking out the site, my pictures have actually disappeared with this add-on.

 

// BOF: More Pics 6
  if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) {
  echo '			 <br>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
		  <td align="center" class="smallText">'.$mopics_output.'</td>
		</tr>
	  </table>'."\n";

}

Edited by mr_dimsum

Share this post


Link to post
Share on other sites

Actually, the pics still do work, however, there is still the huge gap. thanks! seems like it was just my site loading slow. =)

Share this post


Link to post
Share on other sites
Is there any way for the main page whats_new to use the more pics filename_s.gif thumbnails as well?

These notes will be added to the next release. Here is an advanced look:

 

if you want the New Products box to also emulate this, do this fix...

 

In /catalog/includes/modules/new_products.php find this line:

 

										   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

Change to:

 

										   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . (file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$new_products['products_image']))?str_replace( '.','_s.',$new_products['products_image']):$new_products['products_image']), $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

 

Remember this is not an ideal solution. For the best result

you should make your thumbnails the exact size you have

defined as your "Small Image Width" in your osC admin

admin -> configuration -> images. Or in the line above

you have to replace SMALL_IMAGE_WIDTH with '' (2 single quotes)

and SMALL_IMAGE_HEIGHT with '' (2 single quotes).

Share this post


Link to post
Share on other sites

Wondering if someone has some insight into my problem:

 

I installed More Pics and everything seems to be working except that the thumbnails pics are overlapping with the category image. In the admin page I set the align to below but that didn't move anything.

 

I've also been looking through the product_info.php but can't find anything. I was even thing about putting the more_pics thumbnails into a serrate table but can't figure that out.

 

Any hints?

-Cybin

Share this post


Link to post
Share on other sites

thanks surfalot, I installed 'On The Fly' Thumbnailer using GD Library which work a treat and automatically creates thumbnails for everything.

 

One thing I have noticed,

 

it you don't set use small image restrictions to true in more pics config, you get full size images in the product info page, which I quite like, so the "click to enlarge" link should be absolete?? Because when you click it you get the same size image????

 

Is there a way to say if small image restrictions is false dont display click to enlarge??

 

 

Regards

Share this post


Link to post
Share on other sites
Wondering if someone has some insight into my problem:

 

I installed More Pics and everything seems to be working except that the thumbnails pics are overlapping with the category image. In the admin page I set the align to below but that didn't move anything.

 

I've also been looking through the product_info.php but can't find anything. I was even thing about putting the more_pics thumbnails into a serrate table but can't figure that out.

 

Any hints?

-Cybin

The code is not using any layers so this is puzzling. When change the the setting from anything-else to bottom should move the more pics output if you added the code correctly. the bottom setting cause the output to come from a different area of code then the other settings. Can you PM me an example URL, I'd like to take a look at the output.

Share this post


Link to post
Share on other sites
Is there a way to say if small image restrictions is false dont display click to enlarge??

The small image restriction setting was actually intended to compliment the preprocessed thumbnail quick-fix. But I suppose I can make an option out of showing the popup text in the next version. In the mean time, this should fix it for you.

 

find in /catalog/product_info.php:

 

		  $mopics_output .= '			  <td align="center" class="smallText"><script language="javascript"><!--
			document.write(\'<a href="javascript: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";

 

replace with:

 

		  $mopics_output .= '			  <td align="center" class="smallText"><script language="javascript"><!--
			document.write(\'<a href="javascript: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"') . '</a>' . (MOPICS_RESTRICT_IMAGE_SIZE=='true'?'<br><a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">'.TEXT_CLICK_TO_ENLARGE.'</a>':'') . '
			  </noscript></td>'."\n";

 

 

find in /catalog/product_info.php:

 

<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']), (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>

 

replace with:

 

<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']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . (MOPICS_RESTRICT_PARENT=='true'?'<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"') . (MOPICS_RESTRICT_PARENT=='true'?'<br>' . TEXT_CLICK_TO_ENLARGE:'') . '</a>'; ?>
<?php // EOF: More Pics 6 ?>
</noscript>

Share this post


Link to post
Share on other sites

I think I got it, I added a <tr> tag and a <td> to the "below" php code in the product_info.php. I must have hacked something up and the images where just piling up on each other.

 

Can I use more_pics to control the product category thumbnail? I'd like to have both vertical and horizontal pics but I can only set one size using the "small images size" in the admin>Config>Images control panel.

 

I'd like to restrict the size by width or height, which ever is larger. As an example a horizantal photo would be thumbnail sized down to 125 pixel by it's width.

 

Thanks for the great contrib, can see using OSC without it.

 

-Oliver

 

 

The code is not using any layers so this is puzzling. When change the the setting from anything-else to bottom should move the more pics output if you added the code correctly. the bottom setting cause the output to come from a different area of code then the other settings. Can you PM me an example URL, I'd like to take a look at the output.

Share this post


Link to post
Share on other sites

If you're looking for a simple "keep proportion" type contribution, try this.

Share this post


Link to post
Share on other sites

thanks again,

 

ALtered the code as above and still getting the "click to enlarge" when useing small_image _restrictions set to false. WHich displays the image full size in product_info.php

 

will double check my code.

 

 

regards

Share this post


Link to post
Share on other sites
ALtered the code as above and still getting the "click to enlarge" when useing small_image _restrictions set to false.

sorry, switch the first replace I gave above with this:

$mopics_output .= ' <td align="center" class="smallText"><script language="javascript"><!--
document.write(\'<a href="javascript: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"').'</a>'.(MOPICS_RESTRICT_IMAGE_SIZE=='true'?'<br><a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">'.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"') . '</a>' . (MOPICS_RESTRICT_IMAGE_SIZE=='true'?'<br><a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">'.TEXT_CLICK_TO_ENLARGE.'</a>':'') . '
</noscript></td>'."\n";

Share this post


Link to post
Share on other sites

That works but it also gets rid of it when image_small is set, ideally it should show Click to enlarge when image restrictions is set to smal and not when it is false??

 

But thanks again. I am now going to try and get your open featured sets working. your help is appreciated.

Share this post


Link to post
Share on other sites

my applogies I had commented out "click to enlarge" in its define statement?? as a rough hack??

 

sorry

Share this post


Link to post
Share on other sites
Guest

Hi..

 

Thanx 4 this great contrib!

 

Unfortunatly I have some probs with my installed Header Tags Controller (HTC).. :blush:

I can?t make the changes in my Admin/Categories.php..

All my trys doesen?t work or destroy the table-structure..! :blush:

 

Maybe someone (who have made it well :) ) can post / mail his Categories.php..? :rolleyes:

 

Thank You!

 

--h-

Share this post


Link to post
Share on other sites
Maybe someone (who have made it well :) ) can post / mail his Categories.php..? :rolleyes:

Sorry, not with just those in it. That file is commonly the hardest to do in any contrib that mods it.

Share this post


Link to post
Share on other sites
I'm not sure what you are trying to do. But I'm open for suggestions for the next version.

 

only just checked back on this thread..

 

But, if you are still wondering what i meant about someone already doing the thumbnail contribution in the popup, check your contrib page and see the 'New, Small Update' file.

Share this post


Link to post
Share on other sites
see the 'New, Small Update' file.

Looks like I missed that one when compiling all the updates. :-" If you were simply asking I anyone has tried it, I haven't.

check your contrib page

This is a community project, I just made the latest contributions. :D Part of the unique structure of the contributions is that multiple versions of the same contrib can exist at once. You don't have to use the latest version.

 

If nobody beats be to it, I add that as an option to the latest version when I get time. If you try it, let me know how you like it.

Share this post


Link to post
Share on other sites
Guest

Hi

 

I am still trying to find a way to remove the original pic from the 'click to enlarge' pics. (I am also using On the Fly Thumbnailer contrib). I have set 'Group parent image with sub-images' to false but the original pic still shows.

 

Also, I am finding that the pop up box is opening to the size of the original image only so I have to drag it to make larger. I tried removing the image height to nothing but it distorted all the pics.

 

Appreciate any thoughts

 

W

 

in product_info.php, search for
'&invis='.$mo_item

replace with

'&invis='.($mo_item+1)

Share this post


Link to post
Share on other sites
Guest

Hi

 

I have installed this now, got a couple of queries...

 

the first is my 'Review' and 'Add to cart button have now been forced to the bottom left of the page, under column left. Any thoughts on recovering this to below the product.

 

The other query I have is within Admin, when i click on a category or product every thing appears on the screen, but at the bottom of the page i get the following message:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /homepages/16/d129533896/htdocs/osc/catalog/admin/includes/functions/database.php:13) in /homepages/16/d129533896/htdocs/osc/catalog/admin/includes/functions/database.php on line 13

 

Appreciate any thoughts

 

W

Share this post


Link to post
Share on other sites
Guest
the first is my 'Review' and 'Add to cart button have now been forced to the bottom left of the page, under column left. Any thoughts on recovering this to below the product.

 

Forget that one, I had put part of the code in the wrong place (did manually due to other contribs!!).

 

So, just the Cannot redeclare tep_db_connect() error to resolve.

 

Cheers

 

W

Share this post


Link to post
Share on other sites
Guest
So, just the Cannot redeclare tep_db_connect() error to resolve.

 

Ignore that one too. Basically, I am using 'More Pics', 'QTPro' and 'Attribute Sets Plus' contribs. Went back to original code and recreated. Had an error somewhere but not sure where. Used Beyond Compare to assist, very cool app.

 

Wired

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×