Jump to content
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

I've installed more_pics_6_v1.3b

 

I appreciate the ability to view the additional images and popup windows in the product_info page.

 

Now, what I would like to do is to

 

1. Have the 'small' picture on the product list (index.php) page be the thumbnail (image_s.jpg) image rather than a sized down large (image.jpg) image.

 

2. Have the main Product Image (image.jpg) appear full size in the product_info.php page; in addition to, or rather than, the thumbnail (image_s.jpg) while keeping the remaining images 2 - 5 thumbnails.

 

-- I've recently & succesfully used Different Image Size - Product_info & frontpage

 

http://www.oscommerce.com/community/contributions,4554

 

and love how that works

 

 

Is there any way of combing these two contribs so that on the product list (index.php) page I have image_s.jpg as the thumbnail which opens product_info.php with the large image.jpg and the other 5 image_s.jpg thumbnails?

 

Here are the relative lines of code from the original product_info.php file, the More Pics 6 code, and the Different Image Size - Product_info & frontpage code.

 

1. Original product_info.php (line 111 - 116)

 

<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( '.','_th.',$product_info['products_image']))?str_replace( '.','_th.',$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>

 

 

2. More Pics 6 code

 

<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>

 

3. Different Image Size - Product_info & frontpage

--- This code a) Displays ImageB.jpg B) removes the link "click to enlarge" c) Changes the image, so that it doesnt link to the pop up window.


 

<script language="javascript"><!--
document.write('<?php 
$product_substr = $product_info['products_image'];
$product_substr = substr($product_substr,0, strlen($product_substr) - 5) . "B.jpg";
echo tep_image(DIR_WS_IMAGES . $product_substr, addslashes($product_info['products_name'])); ?>');
//--></script>

 

 

Hope this made sense. Thanks in advance for any feedback or help.

Share this post


Link to post
Share on other sites

Hi i've just installed more pics and I would like some help customising it to fit my store.

 

Firstly, in popup_image.php it shows the original image that I used before I installed more pics AND the new image - so basically it has the same image twice, but it should only show the image once. You can go here click zoom and see what I mean: http://topgoth.co.uk/product_info.php?cPat...products_id=199

 

 

Also, I would like the image on product_info to be inside the white box in the top left hand corner which is what it was like before i installed more pics. Go here and you'll see the main picture is in the description section instead of in the white box.

 

I thought you might need to see my product_info.php file before I installed more pics (I hope it helps):

 

 

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 $product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<?php 
# cDynamic Meta Tags
/*<title><?php echo TITLE; ?>*/
require(DIR_WS_INCLUDES . 'meta_tags.php');
#
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>


		<table cellspacing=0 cellpadding=0>
		   <tr><td>


			<table cellspacing=0 cellpadding=0>
			 <tr><td colspan=3><img src=images/m57.gif width=565 height=35></td></tr>				 
		   </table>



<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {


?>	

  <tr>
	<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 } else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);



tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $products_price = '<s style="color:#D2FB1A;font-size:13px">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class=ch3>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
  $products_price ='<span class=ch3>'. $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}






if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
  $products_name = $product_info['products_name'];
}





?>
			 <tr><td width=11 class=bg2></td>
				 <td width=531 class=bg7>
				  <table cellspacing=0 cellpadding=0>
				   <tr><td colspan=2 height=7 width=531 bgcolor=#ADAFB1></td></tr>
				   <tr><td width=221>
						<table cellspacing=0 cellpadding=0>
						 <tr><td width=221 height=200 bgcolor=#FFFFFF align=center valign=middle>


<!-- display image -->
<?php
if (tep_not_null($product_info['products_image'])) {
?>
	  <table cellspacing="0" cellpadding="2" align="center">
		<tr>
		  <td align="center" class="smallText">
<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']), PRODUCT_IMAGE_WIDTH, PRODUCT_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'], PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT
			, ' hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
		</tr>
	  </table>
<?php
}
?>
<!--end display image -->

		   </td>


				   </tr>
						 <tr><td><img src=images/m56.gif width=221 height=2></td></tr>
						</table>
					   </td>
					   <td width=509 valign=top>
						<table cellspacing=0 cellpadding=0>
						 <tr><td valign=top colspan=3><img src=images/m52.gif width=309 height=2></td></tr>
						 <tr><td width=19></td>
							 <td width=259>
							  <table cellspacing=0 cellpadding=0>
							   <tr><td height=10 colspan=3></td></tr>
							   <tr><td colspan=3 style="color:#CBEF2D;font-weight:bold; font-size:13px"><?=$products_name?></td></tr>
							   <tr><td height=20 colspan=3></td></tr>
							   <tr><td height=10 colspan=3><b>Item #:</b>  <?= $products_id; ?></td></tr>
							   <tr><td height=10 colspan=3></td></tr>
							   <tr><td colspan=3>

<?
if ($product_info['products_date_available'] > date('Y-m-d H:i:s'))
 echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available']));
else 
 echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added']));
?>					 


							 </td></tr>
								<tr><td height=10 colspan=3></td></tr>
							   <tr><td width=79 valign=bottom><b>Price:</b></td><td width=124 class=ch3 valign=bottom><?php echo $products_price; ?></td><td><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW); ?></td></tr>

<tr>
<td width=400 valign=bottom>
<br>
<br>
<font size=2>
<b>

<?
 if ($cart->show_total() < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {

$add_to_get_free_shipping = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER - $cart->show_total();

echo '<p>' . sprintf(BOX_SHOPPING_CART_FREE_SHIPPING, $currencies->format($add_to_get_free_shipping));

}



?>

</b></font></td></tr>
</table>
							 </td>
							 <td width=31></td></tr>								   
						</table>
				   </td></tr>
				   <tr><td colspan=2 height=15></td></tr>
				   <tr><td colspan=2>
						<table cellspacing=0 cellpadding=0 width=492 align=center>
						 <tr><td><img src=images/m55.gif width=121 height=14></td></tr>
						 <tr><td height=15></td></tr>
						 <tr><td width=492>
			   <?php echo stripslashes($product_info['products_description']); ?>

						 <br><br><br><br> </td></tr>






<tr><td>


<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>


	  <table border="0" cellspacing="0" cellpadding="2">
		<tr>
		  <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
		</tr>
<?php
  $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
  while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
	$products_options_array = array();
	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
	while ($products_options = tep_db_fetch_array($products_options_query)) {
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
	  if ($products_options['options_values_price'] != '0') {
		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	  }
	}

	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
	} else {
	  $selected_attribute = false;
	}
?>
		<tr>
		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
		</tr>
<?php
  }
?>
	  </table>
<?php
}
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
  <tr>
	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}

if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}

?>
<!--
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
-->




<?php include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); ?>




						</table>
				   </td></tr>
				  </table>
				 </td>
				 <td width=23 class=bg6></td></tr>
			 <tr><td colspan=3><img src=images/m51.gif width=565 height=6></td></tr>
		  </td></tr>
			</table>




<!----------------------- Not editable part -------------------------------->


  <tr>
	<td>
<?php
/*
if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
} else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
*/
 }
?>


  </td></tr>

</table>
</form></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

 

 

Also, does this contribution work with 'On the Fly' Auto Thumbnailer, I have that installed and wondered if anyone had any experience using both contributions?

 

 

Finally, Is there a way to show the extra images as thumbnails on popup_image to show customers that there is more than one image?

 

 

Thanks for your help,

 

Ben :thumbsup:

Share this post


Link to post
Share on other sites
Hi i've just installed more pics and I would like some help customising it to fit my store.

 

Firstly, in popup_image.php it shows the original image that I used before I installed more pics AND the new image - so basically it has the same image twice, but it should only show the image once. You can go here click zoom and see what I mean: http://topgoth.co.uk/product_info.php?cPat...products_id=199

Also, I would like the image on product_info to be inside the white box in the top left hand corner which is what it was like before i installed more pics. Go here and you'll see the main picture is in the description section instead of in the white box.

 

I thought you might need to see my product_info.php file before I installed more pics (I hope it helps):

 

 

It seems like you have More Pics 6 and something else (Ultra Pics Addon) maybe?? If so, I had problems using both and had to remove Ultra Pics Contrib. Make sure you try the MOPICS ZOOM MOD.

 

Good luck

Share this post


Link to post
Share on other sites

thanks for your reply Gerard, although the only image contributions i'm using are More Pics 6, 'On The Fly' Auto Thumbnailer (maybe this is causing the problem) and I added a quick fix to make the pop up window larger to accomodate the size of the image. i did try installing Additional Images although it didnt work so I just restored all the files I had backed up (i doubt this is causing the problem).

 

 

again, thanks for your reply, although I cant think of anything I may have installed thats causing the problem

Share this post


Link to post
Share on other sites

After running this mod for almost a month I have just noticed a litle error.

 

Its not a biggie and I can live with it.

 

The check box to delete the first (Default Image) is in the wrong place. Instead of being next to the

Browse button of Products Image:

Its actually at the top of the page See screen shot.

 

I know its probably just a /tr or /td needed or to be moved but not sure which one it is.

more%20pics.JPG

Share this post


Link to post
Share on other sites
After running this mod for almost a month I have just noticed a litle error.

 

Its not a biggie and I can live with it.

 

The check box to delete the first (Default Image) is in the wrong place. Instead of being next to the

Browse button of Products Image:

Its actually at the top of the page See screen shot.

 

I know its probably just a /tr or /td needed or to be moved but not sure which one it is.

Its not suppose to be there. You should look over your integration effort a little more closely. That checkbox is probably close to the correct location, just, as you said, not within the correct table cell.

Share this post


Link to post
Share on other sites
Its not suppose to be there. You should look over your integration effort a little more closely. That checkbox is probably close to the correct location, just, as you said, not within the correct table cell.

 

I know its not supposed to be there hence this post :-"

 

Found the problem anyway, Take me about two hours of looking over my admin\catagories.php

I had a </td> at the end of this line

<td class="main" ><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image') . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image);  ?>

 

All sorted now thanks

Share this post


Link to post
Share on other sites

hi,

 

In my popup_image.php it shows the original popup image and an image created by more pics 6. So I have two of the same image in my popup window :(

 

How can i remove the original image whilst keeping the one created by more pics? (The original one is at the top of the popup page and the more pics one is at the bottom)

 

heres my popup_image.php code, hopefully someone can help?

 

 

<?php
/*
 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $navigation->remove_current_page();

 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
// BOF: More Pics 6
$PID = $HTTP_GET_VARS['pID'];
$invis = $HTTP_GET_VARS['invis'];
$result = mysql_query("select * from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
// EOF: More Pics 6
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 <?php // BOF: More Pics 6 ?>
 if (document.layers) i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+160-i);
<?php // EOF: More Pics 6 ?>
 self.focus();
}
//--></script>
<?php // BOF: More Pics 6 ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
<?php // EOF: More Pics 6 ?>
</head>
<body onload="resize();">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

<?php // BOF: More Pics 6 ?>
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <?php // Lets find the last available image !
$image = tep_db_fetch_array($result);
if ($image['products_subimage6'] != ''){	   
$last = '6';
}elseif ($image['products_subimage5'] != ''){
$last = '5';
}elseif ($image['products_subimage4'] != ''){
$last = '4';
}elseif ($image['products_subimage3'] != ''){	   
$last = '3';
}elseif ($image['products_subimage2'] != ''){	   
$last = '2';
}elseif ($image['products_subimage1'] != ''){	   
$last = '1';
}elseif ($image['products_image'] != ''){	   
$last = '0';
}
$next = $invis + '1';
$back = $invis - '1';
?>
<?php
if (($invis == '0') || ($invis == '')){
$insert = $image['products_image'];
} else  {
$insert = $image['products_subimage' . $invis. ''];
}
/* 
//
// for use if you want to define a maximum width and height for the large popup images.
//
$max_width=0;
$max_height=0;
$img = DIR_WS_IMAGES . $insert;
list($width, $height, $type, $attr) = getimagesize($img);
if ($max_width!=0 && $max_width<$width && $max_height!=0 && $max_height<$height) {
 if (($max_width-$width)>($max_height-$height)) {
$width = $max_width;
$height = 0;
 } else {
$width = 0;
$height = $max_height;
 }
} elseif ($max_width!=0 && $max_width<$width) {
 $width = $max_width;
 $height = 0;
} elseif ($max_height!=0 && $max_height<$height) {
 $width = 0;
 $height = $max_height;
}
echo '<tr><td align="center"><img src="' . $img . '"' . (($width!=0)?' width="'.$width.'"':'') . (($height!=0)?' height="'.$height.'"':'') . '></td>';
*/
//
// to use the above code, you must remove the next two lines.
//
$img = DIR_WS_IMAGES . $insert;
echo '<tr><td align="center"><img src="' . $img . '"></td>';
?>		</tr>
<tr>
<td height="0" align="center"></td></tr>
<tr>
<td height="20" align="center">
<?php
if (($back != '-1') || ($next <= $last)) {
 echo '<hr color="#666666" size="3">';
}
if ($back != '-1'){
echo '<a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='.$back).'">' . tep_image(DIR_WS_IMAGES.'left.gif', 'previous', '', '', 'border="0"') . '</a>  ';
}
if ($next <= $last){
echo '<a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='. $next).'">' . tep_image(DIR_WS_IMAGES.'right.gif', 'next', '', '', 'border="0"') . '</a>';
}
echo '</td></tr>';
?>
</table>
<?php // EOF: More Pics 6 ?>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

 

and you can go here and click zoom to actually see the problem: http://www.topgoth.co.uk/acdc-logo-belt-p-333.html

 

thanks,

 

Ben

Share this post


Link to post
Share on other sites
hi,

 

In my popup_image.php it shows the original popup image and an image created by more pics 6. So I have two of the same image in my popup window :(

 

How can i remove the original image whilst keeping the one created by more pics? (The original one is at the top of the popup page and the more pics one is at the bottom)

 

heres my popup_image.php code, hopefully someone can help?

 

 

and you can go here and click zoom to actually see the problem: http://www.topgoth.co.uk/acdc-logo-belt-p-333.html

 

thanks,

 

Ben

this line shouldn't be there.

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

 

might help to use a compare tool like WinDiff or Beyond Compare

Share this post


Link to post
Share on other sites

thankyou surfalot - that solved the problem

 

Would it be possible for this contribution to create small thumbnails below the main product image showing the extra images that are linked to the product?

 

I am using 'On The Fly' Auto Thumbnailer and hoping this is possible. I wouldn't of thought it would be too difficult - the benefit is that it would show customers that there are more images without having to click the zoom button and then realising that it also shows you extra pictures.

 

I hope this made sense, i think it would be a very helpful addon

 

thanks,

 

Ben

Share this post


Link to post
Share on other sites
Would it be possible for this contribution to create small thumbnails below the main product image showing the extra images that are linked to the product?

 

I am using 'On The Fly' Auto Thumbnailer and hoping this is possible. I wouldn't of thought it would be too difficult - the benefit is that it would show customers that there are more images without having to click the zoom button and then realising that it also shows you extra pictures.

 

 

 

Is there no contribution that does that already ??

Share this post


Link to post
Share on other sites
Is there no contribution that does that already ??

 

it would be great if there is, do you know what its called or how I can get it? or if OnTheFly Auto thumbnailer or More Pics can be adapted to do that?

 

thanks,

 

Ben

Share this post


Link to post
Share on other sites

Hello there,

 

I installed More Pics on a clean RC1. All is fine (show pictures on the front part) except that it doesnt show any pictures in the admin - it adds "catalog/admin/" to the address of the pictures (and flags, but not to buttons and folders' icon).

 

Here is one of the standard subcategory pictures addresses: "http://localhost/catalog/admin/catalog/images/subcategory_graphic_cards.gif". It also doesnt show the flags in the edit product page, but shows buttons and folder icons (http://localhost/catalog/admin/catalog/includes/languages/english/images/icon.gif).

 

Compared the categories with the MS2 and all the differences are added in my categories.php (RC1), so no problem in the transfer.

 

Any ideas???

Share this post


Link to post
Share on other sites
Hello there,

 

I installed More Pics on a clean RC1. All is fine (show pictures on the front part) except that it doesnt show any pictures in the admin - it adds "catalog/admin/" to the address of the pictures (and flags, but not to buttons and folders' icon).

 

Here is one of the standard subcategory pictures addresses: "http://localhost/catalog/admin/catalog/images/subcategory_graphic_cards.gif". It also doesnt show the flags in the edit product page, but shows buttons and folder icons (http://localhost/catalog/admin/catalog/includes/languages/english/images/icon.gif).

 

Compared the categories with the MS2 and all the differences are added in my categories.php (RC1), so no problem in the transfer.

 

Any ideas???

 

Problem is solved by adding '/' infront of 'catalog/' -> define('DIR_WS_CATALOG', '/catalog/'); in .../admin/includes/configure.php (dont know how it is in the original)

 

So now everything is working fine on RC1. (Forgot to say I put the lightbox and thumbnail creator. Also, running on PHP5 and SQL 5, register_globals is 0 I think)

Share this post


Link to post
Share on other sites
Could you help me please?

 

I don't know what I've done wrong. :huh:

 

I have STS installed and now MorePics as well. I do get all the pictures on the product info page BUT it doesn't matter which image I click at I still get the first one in the pop-up window!! WHY?? And why doesn't the "back and next" buttons show?

 

Do any of you have a clue what I may have done wrong?

 

Take a look and you'll see what I mean. Just click any image at the page

 

http://rcmaffian.se/oscommerce_st/catalog/...;products_id=23

 

Please anyone??

 

Best reards

Jessica :blink:

 

I was just browsing and noticed the above issue.

:thumbsup: This can easily be solved. Take a look at the STS Power Pack site link in my signature below. This site is dedicated to STS add-ons for other contributions.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi. I have this installed with the Lightbox contribution in tandem, and it's going great.

 

I have what (I think) is a simple query. I would like to be able to show the number of extra images for a given product in other infoboxes, ie. Specials, What's New, and also (maybe) in the Product Listing.

 

For example, on the homepage in the Specials info box, it would show the main pic but would also say "6 More Pics" to encourage the customer to click in to the Product Info to see them.

 

Thanks for any help.

Share this post


Link to post
Share on other sites

Hello,

I install More_Pics_6 and it work very good, butI have a litle problem:

I change in:

Administration\ Configuration\ Images\ Product Information Image Width = 300 px, but when the same product is in column image is also 300 px

Exemplarily:

I look product ID: 25 and same product is in column right in box What's New? The image in product info is 300 px, but the image in column right in box What's New? Is also 300 px. And these widen the column.

 

PLEASE HELP ME

Sorry for my bad English

Share this post


Link to post
Share on other sites

Hello I have this contribution installed and it's great , I have another delima when trying to add items and have the attributes set in a normal order like small ,medium, Large etc.

I tried using the information from This thread editing the code as follows

changed this line in product_info.php; 

$products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");

 

to this;

 

 

$products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'". " order by pov.products_options_values_id"); 


All I added was; 
. " order by pov.products_options_values_id"

but it doesn't work since that file is modified so much I hope you may have a solution.

Thank you

Share this post


Link to post
Share on other sites

I am not sure if this has been covered in this thread but I have more pics installed and would like to have the main picture size 225x315 and the additional pictures to be smaller .This is how I had them before installing the mod. Then the image would pop open to a bigger size.

How can I change this?

Share this post


Link to post
Share on other sites

I need Help!!!

 

I installed the more pics contib, and everything works great , but if I want to delete the images I get this error message:

 

Fatal error: Call to undefined function tep_output_generated_category_path_fs() in ......................... admin/categories.php on line 402

 

These are my categories.php file lines 400 to 408

// BOF: More Pics 6

// copy subimage1 only if modified

$products_subimage1 = new upload('products_subimage1');

$products_subimage1->set_destination(DIR_FS_CATALOG_IMAGES);

if ($products_subimage1->parse() && $products_subimage1->save()) {

$products_subimage1_name = $products_subimage1->filename;

} else {

$products_subimage1_name = (isset($HTTP_POST_VARS['products_previous_subimage1']) ? $HTTP_POST_VARS['products_previous_subimage1'] : '');

}

 

 

 

Can anyone help me please! :'(

Edited by katie929

Share this post


Link to post
Share on other sites
I am not sure if this has been covered in this thread but I have more pics installed and would like to have the main picture size 225x315 and the additional pictures to be smaller .This is how I had them before installing the mod. Then the image would pop open to a bigger size.

How can I change this?

if you are using a diravation of my work, there will be new image size configuration options in the "Images" configuration group in your admin.

Share this post


Link to post
Share on other sites

This is bizarre, I have had this working on an old version (1.1) of OSCommerce. I am now starting again in 2.2 RC2 and have the same database infor available, and the previous products with more_pics working are showing in the public pages.

 

However, now my /admin/categories.php doesn't show, giving a 500 page error. Can anyone help me here to understand ... I've tried the search but with over 700-odd replies in this post it's very difficult to find solutions.

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

×