Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Simple Multi Image Add-on (Un-Limited) with FancyBox Popups


spooks

Recommended Posts

Hi All,

 

Here are some error occur after installation.

 

(Fatal error: Call to undefined function tep_hide_session_id() in /.../catalog/admin/categories.php on line 908)

 

Could anyone help to advise and provide solution?

 

Many thanks.

Link to comment
Share on other sites

my admin/categories works fine, but when i clicking on a product i get the next error ; Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/kozak/public_html/n4s/includes/functions/database.php on l4 line 103

Product not found!

 

Why?

 

here mu line 103 :

 

function tep_db_result($result, $row, $field = '') {

return mysql_result($result, $row, $field);

}

 

thx 4 help

 

kozak

 

i had same error

 

Edit product_info.php

 

change

 

// Simple multi image addon	
 if (!tep_db_num_rows($product_info_query)) {
// EOF Simple multi image addon

 

to

 

// Simple multi image addon	
 if (@tep_db_num_rows($product_info_query)) {
// EOF Simple multi image addon

 

Fixed for me.

Link to comment
Share on other sites

Hi there

 

I have installed and its working well to a point, i really like the new fancy popup box!! :D

 

i have added extra images to some items and the new imgaes load to the server and display well in admin, but there is no sign of them in the actual product display page.

 

Product Page Link

 

Can anyone see anything wrong?

 

<?php
/*
 $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

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

 // Simple multi image addon	
$image_group = TINY_IMAGE_GROUP_SIZE; //Number of images to show per row/column
$vertical_format = (ADDITIONAL_IMAGE_FORMAT == 'vertical');
$max_title_length = 40; //Set the maximm length of popup titles before they are broken into multiple lines.
// Simple multi image addon	section moved
	$products_image_array = unserialize($product_info['products_image_array']);
   if (!is_array($products_image_array)) $products_image_array = array();
// EOF Simple multi image addon

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<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,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<!-- Simple multi image addon -->
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.js"></script>
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.fancybox.js"></script>
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.easing.js"></script>
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.easydrag.handler.beta2.js"></script>
<link rel="stylesheet" href="<?php echo DIR_WS_IMAGES ?>js/fancybox.css" type="text/css" media="screen">
<script type="text/javascript">
	$(document).ready(function() {
		$("div#fancy a").fancybox({
	'zoomSpeedIn':	800, 
	'zoomSpeedOut':	700, 
	'imageScale' : true,
	'centerOnScroll': 	true,
	'hideOnContentClick' : false,
	'overlayShow':	<?php echo (DIM_BACKGROUND == 'true' ? 'true' : 'false'); ?>,
	'overlayOpacity': <?php echo (BKG_LUMA/10); ?>,
	'zoomOpacity': 	true,
	<?php if (SWING_POPUP == 'true') echo "'easingIn' : 'easeOutBack',"; ?>
	'hideOnContentClick': false

});
<?php if (DRAG_POPUP == 'true') echo '$("#fancy_outer").easydrag();'; ?>
});

</script>
<style type="text/css">
<?php if (SHOW_NAV == 'true') echo 'span#fancy_left_ico {left: 20px;}  span#fancy_right_ico {right: 20px;}';
				switch (POS_NAV) {
								case 'top':
								echo 'span.fancy_ico { top: 38px; }';
								break;
							case 'bottom':
								echo 'span.fancy_ico { bottom: 20px; }';
								break;
							default:
								echo 'span.fancy_ico { top: 50%; }';
								break;
								}		
								?>

</style>
<!-- EOF Simple multi image addon -->

</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="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- 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 border="0" width="95%" cellspacing="0" cellpadding="0">
<?php
 // Simple multi image addon	
 if (@tep_db_num_rows($product_info_query)) {
// EOF Simple multi image addon
?>
     <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 . "'");

   $products_price = '<table class="" align="right" border="0" width="100%" cellspacing="0" cellpadding="0">';
           $new_price = tep_get_products_special_price($product_info['products_id']);
           if ($product_info['products_msrp'] > $product_info['products_price'])

           $products_price .= '<tr class="PriceListBIG"><td align="right">' . TEXT_PRODUCTS_MSRP  . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';
           if ($new_price != '')
           $products_price .= '<tr class="usualpriceBIG"><td align="right">'. TEXT_PRODUCTS_USUALPRICE . '';
            else
           $products_price .= '<tr class="pricenowBIG"><td align="right">'. TEXT_PRODUCTS_OUR_PRICE .   '';

           $products_price .=  $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';

           if ($new_price != '')
              {$products_price .= '<tr class="pricenowBIG"><td align="right">' . TEXT_PRODUCTS_PRICENOW .  $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}
           if ($product_info['products_msrp'] > $product_info['products_price'])
             {if ($new_price != '')
               {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP .  $currencies->display_price(($product_info['products_msrp'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}
             else
               {$products_price .= '<tr class="savingBIG"><td ="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] -  $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}}
           else
             {if ($new_price != '')
               {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP .  $currencies->display_price(($product_info['products_price'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}}
           $products_price .= '</table>';

   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><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
           <td align="right" valign="top" width="10%"><?php echo $products_price; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
         <!-- Simple multi image addon -->
			 <div id="fancy">
			  <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">

<?php if (strlen($product_info['products_name']) > $max_title_length) {  $title = wordwrap(htmlspecialchars($product_info['products_name']), $max_title_length, '<br>');
        } else { $title = htmlspecialchars($product_info['products_name']); } 
$m_source = ''; $thumb = (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On'); if ($thumb) { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image);  $m_source=str_replace('&','&',$image[1]); }
 echo '<a  rel="image_group" title="'.$title.'" href="' . ($m_source ? $m_source : DIR_WS_IMAGES . $product_info['products_image']) . '" alt="' . $product_info['products_name'] . '" 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"', false, 5) . '<br /></a>'; 
              if(!$vertical_format) { echo ''; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; 

							++$row; if ($row > $image_group) { echo '<br />'; $row = 1; } } } 
							echo '</td>';
						 if($vertical_format) { echo '<td>'; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br />' . '</a>'; 

								++$row; if ($row > $image_group) { echo '</td><td>'; $row = 1; } } echo '</td>'; } ?>


           </tr><?php  echo '<tr><td class="smallText">' . TEXT_CLICK_TO_ENLARGE . '</td></tr>'; ?>
         </table>
				</div>
				<!-- EOF Simple multi image addon -->

<?php
   }
?>
         <p><?php echo nl2br(stripslashes($product_info['products_description'])); ?></p>
<?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
   }

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
     </tr>
<?php
   } else {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
     </tr>
<?php
   }
?>
     <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 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>
     <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 //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

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

Link to comment
Share on other sites

Hi to everyone.

I write from Italy. Is there any Italian who can help me?

I tride twice to install simple multi Image but it doesn't run.

I'm trying it for the third ones, before I ask to you:

 

I have to install ONLY simple multi image, not also fancybox, wont'I?

To run in the database means I open my phpadmin in my web space (the domain maintener, not in oscommerce, right?) and I should IMPORT all 3 sql files I find in the folder.

Is this correct? Or should I import just one of those? Is the term IMPORT the same of RUN for sql?

 

Please forgive my english, I hope to receive some help becausa I have a little difficulty.

 

 

I'd forgotten just a last question: is this add-on compatible with 2rc2?

I wrote all files manually.

Thanx

Edited by anairolf
Link to comment
Share on other sites

Floriana,

 

I have to install ONLY simple multi image, not also fancybox, wont'I?

 

You can disable the fanny image popup from the admin configuration area under images.

 

To run in the database means I open my phpadmin in my web space (the domain maintener, not in oscommerce, right?) and I should IMPORT all 3 sql files I find in the folder.

Is this correct? Or should I import just one of those? Is the term IMPORT the same of RUN for sql?

 

Using phpmyadmin, you can IMPORT the files if you wish, or copy and past the SQL query into the SQL window and click GO. You only need run the file SQL V1.1 if you are starting with a clean database (you have already removed the previous installation attempt)

 

I'd forgotten just a last question: is this add-on compatible with 2rc2?

 

This contribution has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a

 

 

 

Chris

Link to comment
Share on other sites

thank you Chris.

 

I've just installed again the add-on.

The add runs, I can see the popup image on the catalog side.

But in the admin side, when i click on catalog (in administration), it gives to me this error:

 

Parse error: syntax error, unexpected '<' in /web/htdocs/www.mysiteaddress.it/home/catalog/admin/categories.php on line 802

 

I try to understand what is but I don't find anything.

 

Just a doubt is that during manual rewriting of file, when istructions say

Find(762)

 

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

</table>

<?php

}

?>

 

Add after:

 

<!-- Simple multi image addon -->

<table summary=""><tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

 

<?php $i=1; while (list($key, $value) = each($products_image_array)) { ?>

 

 

<?php echo '<td align="center">' . tep_image(DIR_WS_CATALOG_IMAGES . $value, $value, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="8" vspace="5"');

if($HTTP_POST_VARS['delete_image_' .$i] == 'on') echo '<br />To Be Deleted';

echo '</td>'; ++$i; } ?>

 

</tr>

</table></td></tr></table>

<!-- EOF Simple multi image addon -->

 

i cannot find the closed tag </table> in my original file.

I don't know how to solve this error.

 

Thanx

Link to comment
Share on other sites

Floriana,

 

You must be using a template. Please post the code from your original categories.php file from lines 750 to 800 so we can see what you have.

 

 

 

Chris

Link to comment
Share on other sites

Floriana,

 

You must be using a template. Please post the code from your original categories.php file from lines 750 to 800 so we can see what you have.

 

 

 

Chris

 

Hi Chris,

 

I have Online Merchant osCommerce Online Merchant v2.2 RC2

I don't use any different template. I just modified the main css and images. I don't modify php code because I'm not able to do it without help.

 

Anywhere, the code is:

 

from line 750 to 839

}

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $pInfo->products_name; ?></td>

<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td>

</tr>

<?php

if ($pInfo->products_url) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

if ($pInfo->products_date_available > date('Y-m-d')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long($pInfo->products_date_available)); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

}

<!-- Simple multi image addon -->

<tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

 

<?php $i=1; while (list($key, $value) = each($products_image_array)) { ?>

 

 

<?php echo '<td align="center">' . tep_image(DIR_WS_CATALOG_IMAGES . $value, $value, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="8" vspace="5"');

if($HTTP_POST_VARS['delete_image_' .$i] == 'on') echo '<br />To Be Deleted';

echo '</td>'; ++$i; } ?>

 

</tr>

</table></td></tr></table>

<!-- EOF Simple multi image addon -->

 

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {

if (isset($HTTP_GET_VARS['origin'])) {

$pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0);

if ($pos_params != false) {

$back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params);

$back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1);

} else {

$back_url = $HTTP_GET_VARS['origin'];

$back_url_params = '';

}

} else {

$back_url = FILENAME_CATEGORIES;

$back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id;

}

?>

<tr>

<td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="right" class="smallText">

<?php

Link to comment
Share on other sites

Hi guys,

 

I post the half solution.

I changed the altered file and I cut this code:(in instructions there was written "version one", so I tried to cut it)

<!-- Simple multi image addon -->
<tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

  <?php  $i=1; while (list($key, $value) = each($products_image_array)) { ?>


       <?php echo '<td align="center">' . tep_image(DIR_WS_CATALOG_IMAGES . $value, $value, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="8" vspace="5"');
			      if($HTTP_POST_VARS['delete_image_' .$i] == 'on') echo '<br />To Be Deleted';
		        echo '</td>'; ++$i;  } ?>	

</tr>
</table></td></tr></table>
<!-- EOF Simple multi image addon -->

 

The add seems to be ok but I cannot upload sometimes images file.

I just uploaded one photo but sometimes it gives a warning error in the top of the page for the other photos:

"Attenzione Warning: Nessuno file uplodato." that means warning no file uploaded.

 

I'd like to understand in the box "TEXT_PRODUCTS_IMAGE_DIRECTORY" in catalog by admin side what should I have to browse? It seems like I should upload a folder in which I will insert all products images. Could it be?

 

Thanx.

Edited by anairolf
Link to comment
Share on other sites

Hi Chris,

 

I have Online Merchant osCommerce Online Merchant v2.2 RC2

I don't use any different template. I just modified the main css and images. I don't modify php code because I'm not able to do it without help.

 

Anywhere, the code is:

 

from line 750 to 839

 

 

This is what you have in your code:

<?php
}
<!-- Simple multi image addon -->
<tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

 

And it should be: (diff on line 3 here)

<?php
}
?>
<!-- Simple multi image addon -->
<tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

Link to comment
Share on other sites

Does this contribution currently work with "Easy Populate & Products Attributes"?

 

Link to the contribution can be found here: http://www.oscommerce.com/community/contributions,500.

 

I've read through some posts in this thread. I can't seem to pull the extra images fields in the Excel file for Easy Populate.

 

Anybody know what I could be doing wrong?

Link to comment
Share on other sites

After installation I changed BLOB to VARCHAR(800) to be able to edit the array in the phpmyadmin. I wanted to add existing piсtures to the product info page without uploading them. However, it wasn't so simple :(

 

So, my question is: How to add information to the image array without actually uploading files? I have many products with same additional pictures. It would be good if I have fields in the edit (admin/categories.php) page where I can just insert/edit links to the main and additional images. Can it be so?

Link to comment
Share on other sites

azz error.

in product_info.php

 

Error:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.piatino.it/home/Store/includes/functions/database.php on line 103

 

Original code:

<?php
   if (tep_not_null($product_info['products_image'])) {
?>

       <table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info">
		<tr><td align="center">


<?php echo tep_draw_prod_pic_top();?>

<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, ' style="margin:0px 0px 0px 0px;"') . ''; ?>');
//--></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, ' style="margin:0px 0px 0px 0px;"') . ''; ?>
</noscript>

<?php echo tep_draw_prod_pic_bottom();?>

		</td></tr>
		<tr><td align="center">
<script language="javascript"><!--
document.write('<?php echo '<div><a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>');
//--></script>
<noscript>
<?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>
</noscript>
		</td></tr>
	</table>
<?php
   }
?>       

 

 

does function:

 

Find (124):


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


Replace With:

        <!-- Simple multi image addon -->
			 <div id="fancy">
			  <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">

<?php if (strlen($product_info['products_name']) > $max_title_length) {  $title = wordwrap(htmlspecialchars($product_info['products_name']), $max_title_length, '<br>');
        } else { $title = htmlspecialchars($product_info['products_name']); } 
$m_source = ''; $thumb = (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On'); if ($thumb) { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image);  $m_source=str_replace('&','&',$image[1]); }
 echo '<a  rel="image_group" title="'.$title.'" href="' . ($m_source ? $m_source : DIR_WS_IMAGES . $product_info['products_image']) . '" alt="' . $product_info['products_name'] . '" 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"', false, 5) . '<br /></a>'; 
              if(!$vertical_format) { echo ''; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; 

							++$row; if ($row > $image_group) { echo '<br />'; $row = 1; } } } 
							echo '</td>';
						 if($vertical_format) { echo '<td>'; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br />' . '</a>'; 

								++$row; if ($row > $image_group) { echo '</td><td>'; $row = 1; } } echo '</td>'; } ?>


           </tr><?php  echo '<tr><td class="smallText">' . TEXT_CLICK_TO_ENLARGE . '</td></tr>'; ?>
         </table>
				</div>
				<!-- EOF Simple multi image addon -->

 

What to do? :(

Link to comment
Share on other sites

I have installed this and everything seems to be working just fine! Where i'm having trouble is in my CVS db. what field name do I use for main and additional images? I have v_products_image and v_products_image_2 etc.. but they aren't loading. I tried to download the attributes file but it won't download at all it just keeps loading but doesn't do anything. I hope someone can shed so light for me. Thanks

Link to comment
Share on other sites

Hi all, I have a problem installing Simple Multi Image Add-on (Un-Limited) with FancyBox Popups, I installed a virgin oscomerce store and I have no problem, the problem is that my store-bought is a template www.templatemonster.com and when I install the addsons gives me errors.

The party administrator that works perfectly the problem I get is to show the characteristics of a product in the store otherwise perfectly, so I think the problem is in the product_info.php file I leave here the original if you send me modified I would greatly appreciate it, thanks.

<?php

/*

$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

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

<?php require(DIR_WS_INCLUDES . 'header_includes.php'); ?>

 

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

</head>

<body>

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">

<tr>

<td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php include(DIR_WS_BOXES . 'panel_top.php');?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

 

 

 

<?php

if ($product_check['total'] < 1) {

?>

<?php echo tep_draw_top();?>

 

<?php echo tep_draw_title_top();?>

 

<?php echo TEXT_PRODUCT_NOT_FOUND; ?>

 

<?php echo tep_draw_title_bottom();?>

 

<?php echo tep_draw1_top();?>

 

<?php echo tep_draw_infoBox2_top();?>

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr>

</table>

 

<?php echo tep_draw_infoBox2_bottom();?>

 

<?php echo tep_draw1_bottom();?>

 

<?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_price2 = '<span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span><br><s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>';

} else {

$products_price2 = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>';

}

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>   <b class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</b>';

} else {

$products_price = '<b class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</b>';

}

 

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'];

}

?>

 

<?php echo tep_draw_top();?>

 

<?php echo tep_draw_title_top();?>

 

<?php echo $breadcrumb->trail(' » ')?> » <?php echo $products_name; ?>

 

<?php echo tep_draw_title_bottom();?>

 

<?php echo tep_draw4_top();?>

 

<?php echo tep_draw2_top(); ?>

 

<?php /* echo tep_pixel_trans(); */?>

 

<?php

if (tep_not_null($product_info['products_image'])) {

?>

 

 

 

<div class="main prod_info" style="width:<?php echo (SMALL_IMAGE_WIDTH +23);?>px;">

 

<?php echo tep_draw_prod_pic_top();?><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, '') . '</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, '') . '</a>'; ?></noscript><?php echo tep_draw_prod_pic_bottom();?>

 

<script language="javascript"><!--

document.write('<?php echo '<a class="enlarge" href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript><?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript></div>

<?php

}

?>

<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>

<br><div><?php echo $products_price?></div></div><br>

<div style="clear:both;"></div>

 

 

<?php echo tep_draw2_bottom();?>

 

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '2'); ?></div>

 

<?php echo tep_draw2_top(); ?>

 

<?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="4" cellpadding="2">

<tr>

<td class="main" colspan="2"><strong class="strong"><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></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><?php echo tep_draw_separator('spacer.gif', '1', '9'); ?></td><td></td></tr>

<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

}

?>

 

 

<?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) {

?>

<table cellpadding="0" cellspacing="4" border="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>

</table>

<?php

}

 

if (tep_not_null($product_info['products_url'])) {

?>

<table cellpadding="0" cellspacing="4" border="0">

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

</table>

 

<?php echo tep_pixel_trans();?>

 

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

 

<?php echo tep_pixel_trans();?>

 

<table cellpadding="0" cellspacing="4" border="0">

<tr>

<td class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

</table>

<?php

} else {

?>

 

<?php echo tep_pixel_trans();?>

 

<table cellpadding="0" cellspacing="4" border="0">

<tr>

<td class="main"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

</table>

<?php

}

?>

 

<?php echo tep_draw2_bottom();?>

 

<?php echo tep_pixel_trans();?>

 

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '2'); ?></div>

 

<?php echo tep_draw2_top(); ?>

 

<?php echo tep_pixel_trans();?>

<?php echo tep_pixel_trans();?>

 

<?php /* echo tep_draw_infoBox2_top(); */ ?>

 

<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>

<td class="main button_marg"><?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 button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>

</tr>

</table>

 

<?php /* echo tep_draw_infoBox2_bottom(); */ ?>

 

<?php echo tep_draw2_bottom();?>

 

 

<?php echo tep_draw4_bottom();?>

 

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

 

<?php echo tep_draw_bottom();?>

 

</form></td>

<!-- body_text_eof //-->

<td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</body>

<?php require(DIR_WS_INCLUDES . 'footer_includes.php'); ?>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

I am fairly new to this and have configured a store yesterday. Absolutely loved the idea of simple multi image add-onn (http://forums.oscomm...howtopic=344580). I have installed it, followed the instructions religiously. It works, the only issue is the formatting of the description. It is overlapping with the main navigation.

 

See:

 

http://174.122.49.2/...products_id=132 for an example.

 

I know this should be a simple edit in the products_info.php file. My front end was a purchased templatemonster.com template.

 

Can somebody, please, point me towards where to go and what to change?

 

thanks,

 

Petr

Link to comment
Share on other sites

I just installed this on another website & both sites I have this on are on the same server. One I installed with oscthumb, one I did not.

 

The one with Oscthumb has super slow page loads for the images, the one without OSCthumb loads very quickly and the popups are faster too.

Link to comment
Share on other sites

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

 

Hi everyone,

 

Much earlier in this thread, the long lost Spooks said that this piece of code needs to be put into product_info.php to make things work properly in IE. Unfortunately it causes a minor problem with my product pages in IE8, as the header becomes a slightly different size for some reason, causing the entire page to be slightly misaligned, especially the search button with the search form and the newsletter submit button with the newsletter email form.

 

I even tried upgrading the versions of jquery and fancybox like someone suggested a few months ago, but it didn't seem to fix the problem.

 

If I take this code out, the fancybox popups stop working in IE.

 

Has anyone else had this problem, and if so, and ideas how to fix it?

 

Thanks

Link to comment
Share on other sites

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

 

Hi everyone,

 

Much earlier in this thread, the long lost Spooks said that this piece of code needs to be put into product_info.php to make things work properly in IE. Unfortunately it causes a minor problem with my product pages in IE8, as the header becomes a slightly different size for some reason, causing the entire page to be slightly misaligned, especially the search button with the search form and the newsletter submit button with the newsletter email form.

 

I even tried upgrading the versions of jquery and fancybox like someone suggested a few months ago, but it didn't seem to fix the problem.

 

If I take this code out, the fancybox popups stop working in IE.

 

Has anyone else had this problem, and if so, and ideas how to fix it?

 

Thanks

 

Ok this is one major problem that's been bugging me for a while that I seem to have fixed by myself for once.

 

http://stackoverflow.com/questions/2253907/fancybox-gets-javascript-not-implemented-error-in-ie8-compatibility-mode

 

There's an actual bug in this version of fancybox that causes a conflict with IE8. That's why Spooks was so insistent over a period of months from late 09 on that the meta tag emulation IE7 be placed in product_info.php. Of course the side effect of this was that the page ended up looking slightly different, no matter what doctype was used (for me at least), even though the instructions say differently.

 

So if you comment out lines 183-186 and 201-204 in images/js/jquery.fancybox.js and remove that particular meta tag from product_info.php, the product pages in IE8 should look alright, just like they do in FF.

Link to comment
Share on other sites

  • 3 weeks later...

I am fairly new to this and have configured a store yesterday. Absolutely loved the idea of simple multi image add-onn (http://forums.oscomm...howtopic=344580). I have installed it, followed the instructions religiously. It works, the only issue is the formatting of the description. It is overlapping with the main navigation.

 

See:

 

http://174.122.49.2/...products_id=132 for an example.

 

I know this should be a simple edit in the products_info.php file. My front end was a purchased templatemonster.com template.

 

Can somebody, please, point me towards where to go and what to change?

 

thanks,

 

Petr

 

Hi Petr, Did you manage to solve your issue? I have got the same problem, also with a template from monster...

I think we should define the table with the productinfo (the text bit) to width=100% but don't know where exactly..

Ftrippie

Link to comment
Share on other sites

Hi Petr, Did you manage to solve your issue? I have got the same problem, also with a template from monster...

I think we should define the table with the productinfo (the text bit) to width=100% but don't know where exactly..

Ftrippie

 

OK, I solved it myself by setting the width of the table to 100%:

 

In my case product_info.php, line 176:

<!-- Simple multi image addon -->

<div id="fancy">

<table border="0" cellspacing="1" cellpadding="1" align="100%">

<tr>

<td align="right" class="smallText">

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...