Jump to content
spooks

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

Recommended Posts

Thank you for the reply. I checked, and the comma is there where it is supposed to be. I have another thought: I also have a Custom Meta Tags contribution (by Randelia) installed, and it seems that some of the code from your contribution is overlapping with that one in the categories.php file. Perhaps that is where the issue lies (?) I will PM a URL so you can take a look.

 

Thanks again.

 

There are two of us here working on this, and we've each gone through and re-entered the code very carefully in case we made an error the first time (for both product_info and categories) with no luck. Here is the code for the product_info.php if you care to have a look:

 

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

 // Simple multi image addon  
$image_group = TINY_IMAGE_GROUP_SIZE; //Number of images to show per row/column
$vertical_format = (ADDITIONAL_IMAGE_FORMAT == 'vertical');  
$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, p.products_image_array, 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);
   $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">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<?php // Randelia Custom_META_Tags_Per_Item. Includes TITLE!
echo ShowMETA('product_info', $products_id, $languages_id); ?>
<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, 
   '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>

<!--[if IE 6]> 
<style type="text/css"> 
div#fancy_bg {display: none;} 
div#fancy_content, 
div#fancy_inner, 
div#fancy_outer {background-color: transparent; background-image: url 
(); border: 1;} 
</style> 
<![endif]--> 
<!-- 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="1" bordercolor =#f7bdde 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="100%" 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 {
   // Simple multi image addon  section moved

   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>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
     $products_price = $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><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
           <td class="pageHeading" align="right" valign="top"><?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 $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);  $source=str_replace('&','&',$image[1]); }
 echo '<a  rel="image_group" title="'.$product_info['products_name'].'" href="' . tep_href_link(($source ? $source : DIR_WS_IMAGES . $product_info['products_image']), $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); while (list($key, $value) = each($products_image_array)) { 
              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="'.$product_info['products_name'].'" href="' . tep_href_link($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); while (list($key, $value) = each($products_image_array)) { 
              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="'.$product_info['products_name'].'" href="' . tep_href_link($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>
         </table>
         </div>
         <!-- EOF Simple multi image addon -->

<?php
   }
?>
         <p><?php echo 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"><?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>
     <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="1" bordercolor =#f7bdde 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'); ?>

Share this post


Link to post
Share on other sites

 

 

I don`t see any issue there, perhaps its a dbase one, ie categories.php put wrong data in field, have u checked by browsing with phpmyadmin


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I don`t see any issue there, perhaps its a dbase one, ie categories.php put wrong data in field, have u checked by browsing with phpmyadmin

 

We just tried browsing with phpmyadmin, looking at categories.php, but we don't really know what we're looking at. We are not well versed in manipulating php or mysql so unfortunately we're going to do an uninstall for now. Maybe someone else who is also using the Custom Metatags contribution from Randelia will have the same issue and be able to figure it out, so we'll keep an eye on this support thread.

 

Thanks again for your time.

Share this post


Link to post
Share on other sites

Are there people who has the same problem as I. Image in Fancybox aren't resized correctly in IE, FF is okay.

http://shop.myastrol...roducts_id=240. As you can see image in IE8 isn't resized, in FF it is.

Is this a stylesheet issue ? Hope someone can help me. Thanks again.

 

 

You have failed to complete the install correctly, please complete the install in full b4 you report any issues, otherwise u are likely to be reporting matters that have already been addressed. wink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

this fancy addon works simply perfect... if you have osthumbs addon remember to disable on osthumb --Encrypt Image Filenames--

bye

Share this post


Link to post
Share on other sites

You have failed to complete the install correctly, please complete the install in full b4 you report any issues, otherwise u are likely to be reporting matters that have already been addressed. wink.gif

 

 

You're right, was missing <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

sorry about that, all works well.

Share this post


Link to post
Share on other sites

Thanks mate. Will try ur instructions. Hope everything goes fine.

 

OK - are we talking about making the "Text Box" below bigger, as mine doesn't contain all the words... what file are we looking at?

Share this post


Link to post
Share on other sites

OK - are we talking about making the "Text Box" below bigger

 

 

The previous post was regarding page layout, not really related to this contrib.

 

I assume you refering to the popup image title, yes if the title is too long there can be an issue, I have come up with a solution, though not ideal.

 

in product_info.php, b4 the </head> add:

 

 

<?php if (strlen($product_info['products_name']) > 40) {
$product_info['products_name'] = wordwrap($product_info['products_name'], 40, '<br>');
?>
<style type="text/css">
div#fancy_title {
text-align:center;
}
div#fancy_title table td {
 padding-top: 10px;
vertical-align: top;
}
td#fancy_title_left, td#fancy_title_right, td#fancy_title_main {height: 52px; background: #000 url();} 

</style>
<!--[if IE]>
<style type="text/css">
td#fancy_title_left {
background: transparent url(<?php echo DIR_WS_IMAGES ?>js/fancy_title_left.png) repeat-x;
}

td#fancy_title_main {
background: transparent url(<?php echo DIR_WS_IMAGES ?>js/fancy_title_main.png) repeat-x;
}

td#fancy_title_right {
background: transparent url(<?php echo DIR_WS_IMAGES ?>js/fancy_title_right.png) repeat-x;
}
</style>
<![endif]-->
<?php } ?>

 

The '40's above set the title lenght at which height is increased & line is broken, adjust to fit your content.

The height: 52px sets the new height, adjust to fit your font size.

Firefox wont stretch the borders, so they are removed in this mode, IE is fine with that though so they stay for IE.

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hey, so i installed this contribution, but the JS is not working. I have been sorting through the code and I cannot seem to find the solution. You mentioned earlier in the thread that because it is jquery based it will not work if there are other jquery scripts. On the homepage of my site i use an image-swapper that is jquery based. I ensured that script was removed from the template i am using for STS, but still no fancy popups. I have added the js folder and contents to my catalog/images/ dir and verified the upload was successful. I cannot figure out what else could be going wrong. Feel free to look at the test i have here test product

 

Thanks in advance.

 

Mike

Share this post


Link to post
Share on other sites

 

 

you have failed to install correctly, please follow all the install instructions, not just some of them, otherwise it will never work!!

 

If you need tips on installing this thread may help.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

you have failed to install correctly, please follow all the install instructions, not just some of them, otherwise it will never work!!

 

If you need tips on installing this thread may help.

 

 

Hey, I at least narrowed it down. If i turn off my STS (simple template system) everything works fine. The contribution looks great, now i'm even more excited to get it working. Has anyone had any luck getting this to work with STS? I noticed that if i copy the header info from product_info.php to my index.php.html template at least the images pop up. unfortunately i can't seem to figure out how to get the ones with php to function properly... any help would be appreciated.

Share this post


Link to post
Share on other sites

had any luck getting this to work with STS?

 

I see, pity you did'nt mention STS b4, I don't use STS, but ivanio http://forums.oscomm.../263361-ivanio/ has stated he has it working fine with that, you could ask him for instructions, or post in the STS support thread, I believe it should be staight forward.

 

If it helps, I noticed with STS on your page was missing all the header additions. ohmy.gif

 

If you find a solution, it would be helpful to others if you would post it here. biggrin.gif

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Its a great contributions however I have two problems

 

1. everything works well until I installed osCthumb. the thumbnails images works fine, however when the popup comes up it

says "forbidden parameter : osCsid" can anyone point me in the right directions as to how to fix this problem

2. the loading time is very slow, once I take out the javascript for this contribution it loads normal again, is that normal or just me.

 

any help would be much appreicated thanks

Share this post


Link to post
Share on other sites

I like this contribution that I installed yesterday and got working like a charm, without any problems. Many thanks to the developer!

 

I have a question for an enhancement: would it be possible to change the popup script so that the popup disappears automatically when you klick on another area in the webshop?

That would be better because now you have to click the cross in the upper right corner of the popup to have it disappear. If you don't, you are left with many openstanding browser-screens.

 

THX

Share this post


Link to post
Share on other sites

1. everything works well until I installed osCthumb. the thumbnails images works fine, however when the popup comes up it

says "forbidden parameter : osCsid" can anyone point me in the right directions as to how to fix this problem

2. the loading time is very slow, once I take out the javascript for this contribution it loads normal again, is that normal or just me.

 

 

1. Yes, could be a problem on some stores (mainly MS2) in some circumstances, its because I automatically used tep_href_link but this is one of the few cases when its not needed!! blush.gif

 

in product_info.php, find:

 

echo '<a  rel="image_group" title="'.$product_info['products_name'].'" href="' . tep_href_link(($source ? $source : DIR_WS_IMAGES . $product_info['products_image']), $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) . '
</a>'; 

 

replace with:

 

echo '<a  rel="image_group" title="'.$product_info['products_name'].'" href="' . ($source ? $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) . '
</a>'; 

 

2. Likely you have large images & its the load time for images, if you just disable scripts then reload, as your pic is now in the browser cache so load will be much quicker. For a valid comparison, disable scripts , clear browser cache, then reload.

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

make the popup disappear when you klick on other content

 

 

This option is already included, to enable simply add:

 

 

'hideOnContentClick' : true,

 

to the options list, ie after

 

'zoomSpeedOut': 700,

 

in your head seaction

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

make the popup disappear when you klick on other content

 

 

This option is already included, to enable simply add:

 

 

'hideOnContentClick' : true,

 

to the options list, ie after

 

'zoomSpeedOut': 700,

 

in your head seaction

Share this post


Link to post
Share on other sites

THX for your speedy reply; I should have known but did not entirely know where to put the line.

 

Because I have several images per product which reflect actually the attributes of a product I name the images, eg duchess-blue.jpg, so for the benefit of customers I changed the line in product_info.php a little bit to show the name of the image as well as the name of the product.

 

"echo '<a rel="image_group" title="'.$product_info['products_name'].'" href="' . ($source ? $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>'; "

becomes:

echo '<a rel="image_group" title="'.$product_info['products_name'].'-' .$product_info['products_image'].'" href="' . ($source ? $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>';

 

and a little bit further on (twice):

echo '<a rel="image_group" title="'.$product_info['products_name'].'" href="' . tep_href_link($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>';

becomes:

echo '<a rel="image_group" title="'.$product_info['products_name'].'-' .$value.'" href="' . tep_href_link($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>';

 

Maybe other persons might like this too.

Thx again.

Share this post


Link to post
Share on other sites

I will PM a URL so you can take a look.

 

 

I`ve just spotted your PM (I don't check messages too often!) I see no code on your site, Have u reverted?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Thanks for the great Add-on.

 

I've never been able to get the "catalog" link to work in the online merchant administration so I have to input all my product information through the databases in phpMyAdmin.

 

I now have a "products image array" column showing NULL value in my "products" database but I can't work out how to add extra images to each product.

 

Also, the text colours and sizes have now changed on the product pages and are different to the stylesheet.css Do I change these in the fancybox.css?

 

Thanks in avance for your help.

Share this post


Link to post
Share on other sites

Thanks for the great Add-on.

 

I've never been able to get the "catalog" link to work in the online merchant administration so I have to input all my product information through the databases in phpMyAdmin.

 

I now have a "products image array" column showing NULL value in my "products" database but I can't work out how to add extra images to each product.

 

Also, the text colours and sizes have now changed on the product pages and are different to the stylesheet.css Do I change these in the fancybox.css?

 

Thanks in avance for your help.

 

 

Use the included categories.php for your data in admin, that works fine, perhaps your old was broke? The data held in the products image array is in a nessarily complex form, I would'nt even bother to try to enter it manually.

 

The css added should not effect any of your existing it is all quite different to the default, but check incase there are any confilcts with stuff u have added b4 (Use firefox tools) .

 

You should continue to edit your store css in the default stylesheet.

 

(PS if u used the included product_info.php perhaps u had altered your original from default, if so u need to follow the included manual install.)


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I`ve just spotted your PM (I don't check messages too often!) I see no code on your site, Have u reverted?

 

Thanks for replying. Yes, as I mentioned in post #203 of this thread, we couldn't get it to work so we reverted back using your uninstall file (which worked smoothly, thanks). If you want, I could copy the code we had for the categories.php file here so you can look, or I could PM it (it's long, maybe too long to post?). Also, we could reinstall the contribution so you could look at the URL again if that would help. We'd really like to get the Simple Multi Image Add-on working, it's a nice one. B)

Share this post


Link to post
Share on other sites

Thanks for replying. Yes, as I mentioned in post #203 of this thread, we couldn't get it to work so we reverted back using your uninstall file (which worked smoothly, thanks). If you want, I could copy the code we had for the categories.php file here so you can look, or I could PM it (it's long, maybe too long to post?). Also, we could reinstall the contribution so you could look at the URL again if that would help. We'd really like to get the Simple Multi Image Add-on working, it's a nice one. cool.gif

 

 

If you care to re-install I'll take a look tomorrow (its very late here), it may help to make a small change, an issue came up with osC thumb as I have used tep_href_link, but its not needed blush.gif , see http://forums.oscommerce.com/index.php?showtopic=344580&pid=1448402&start=200&st=200#entry1448402 wink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

If you care to re-install I'll take a look tomorrow (its very late here), it may help to make a small change, an issue came up with osC thumb as I have used tep_href_link, but its not needed blush.gif , see http://forums.oscommerce.com/index.php?showtopic=344580&pid=1448402&start=200&st=200#entry1448402 wink.gif

 

Thanks, we will reinstall and you can take a look tomorrow. I'll post again when we have it up. I'll also try the tep_href_link suggestion and see what happens.

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

×