Jump to content
spooks

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

Recommended Posts

Simple Multi Image did not show up in the admin section.

 

 

Check you did step 3 in the install, if u did, read my previous post here. 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

Hi Spooks,

 

I've installed the latest version of this superb contribution today, but I have a couple of problems that I can't seem to fix. I've been over the install a number of times and run a file compare using Winmerge and can find no problems myself, the SQL updates were also accepted correctly via, if you could take a look it would be appreciated.

 

The problems:

 

1. When I add additional images to existing products they show in admin and in the shop correctly (no problems there) but if I then go back into admin and edit the product the new images have disappeared both in admin and the shop

 

2. When I add new products to in admin and upload the initial and additional images I get the usual 'upload success' message and the images are stored correctly in the directory BUT none of them show up in the store and again none of them are retained in the product record when I edit the product.

 

If you have any thoughts it would be appreciated.

 

Daz

Share this post


Link to post
Share on other sites

It sounds like you havew errors in the edits to categories.php, when u edit a product, the additional images are read from the dbase, so they appear on the edit screen, if u made errors so there not read, they will be deleted, check your edits again.

 

 


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

It sounds like you havew errors in the edits to categories.php, when u edit a product, the additional images are read from the dbase, so they appear on the edit screen, if u made errors so there not read, they will be deleted, check your edits again.

 

Somehow I had managed to get it conflicting with the Header Tags SEO mod so I used your categories.php and reinstalled the admin part of HTS and it works perfectly.

 

Cheers Spooks

Share this post


Link to post
Share on other sites

Hi,

 

I just installed your great contrib but have the problem, that I don't get large image overlays but popups in new windows. It neither works with my edited product_info.php not with the one supplied in the download. Turning on/off oscThumb doesn't change the behaviour.

I have no idea where the problem is.

Perhaps someone can have a look at the source code of

 

http://www.vegan-wonderland.de/catalog2/product_info.php?products_id=1357

 

That's a product page of a dummy store of mine to try out new contribs, so don't worry about the images obviously not belonging together :D

 

Additional infos: PHP-Version: 4.4.9

MySQL-Version: 5.0.67

OSC-Version: RC2a

 

 

Thanks in advance,

Kalle

Edited by VW_Kalle

Share this post


Link to post
Share on other sites

Hi,

 

now I tried a different jquery.js file I had lying around from the accordion-category menu that was called jquery-latest.js but was of older date than the one in this contrib. renamed it, overwrote the supplied jquery.js file and now it works. I guess they somehow interfered - which is logical now that I think of it. The file for the category menu is referenced in a different file therefore I didn't find it. I am gonna change the location of the .js files so that I am only using one of then. That way my folders should be kinda "cleaned up".

 

Problem solved :)

Share this post


Link to post
Share on other sites

image popups in new window

 

 

I've looked in IE & firefox & its fine, I assume you found your error, you do have a lot of javascript on the page, I assume you had conflicts?


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 like the developments on this contribution. Very well done.

 

I have this contribution conflicting with another contribution i am using.

 

Custom Product Builder

 

The problem is in the product_info.php file.

 

Simple image asks to remove the following code:

 

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

 

Unfortunately Custom Product Builder uses the following modified code:

 

 $product_check_query = tep_db_query("select p.builder_product_flag, count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where (p.products_status = '1' or p.builder_product_flag = '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 . "' group by p.products_id");

 

It is the addition of p.builder_product_flag

and also further down Simple Images asks to remove the following code:

 

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

 

Which also Custom Product Builder uses.

 

Is there a way to get the two contributions to work togather please?

Share this post


Link to post
Share on other sites

Please help after installing this mod it works great but my additional pictures is not coming up with the fancy box popups because I already did install the UltraPics - MS2 Image Addon Pack! back in May of this year and if I take this part out of product_info.php // BOF MaxiDVD: Modified For Ultimate Images Pack!

if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }

// EOF MaxiDVD: Modified For Ultimate Images Pack! my additional picture disappear can you please help you can take a look at my product here http://www.cultureapparel.com/shop/catalog/belly-dance-pant-p-330.html

 

Thank you

Share this post


Link to post
Share on other sites

modified product_info.php sql query

 

All the check query does (old & new) is check that a product exists with the id given on arrival at product_info.php, this check very rarely fails, if it does it will be due to a failure in code additions elsewhere, I'm surprised that other mod even bothered to modify the query, perhaps they did'nt realise its function, the line if ($product_check['total'] < 1) { is the only time that query is used.

 

My change basically moves the real query that appears further down to replace the check query, then using the line if (!tep_db_num_rows($product_info_query)) { replaces the previous check using the real query instead.

 

I imagine that mod alters the query I moved, so simply use that altered query, with the addition of , p.products_image_array to it, but still move it to the new location. :)

 


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

Please help after installing this mod it works great but my additional pictures is not coming up with the fancy box popups because I already did install the UltraPics - MS2 Image Addon Pack! back in May of this year and if I take this part out of product_info.php // BOF MaxiDVD: Modified For Ultimate Images Pack!

if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }

// EOF MaxiDVD: Modified For Ultimate Images Pack! my additional picture disappear can you please help you can take a look at my product here http://www.cultureap...pant-p-330.html

 

Thank you

 

 

Simply leave the Ultimate Images Pack section you detailed in place, it wont cause any issue. smile.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

Hi Spooks,

 

Since installing this mod my product info page throws up an SSL warning message (trying to display both secure and unsecure items), if I remove the changes for this mod the error disappears and my hosts have confirmed that there is nothing amiss with the servers or my SSL and all other pages are fine.

 

Not for want of trying I'm unable to find anything amiss in the product_info.php code either, but then again I'm no genius with scripting, I'm sure I must have something wrong here but if you could take a look and I'd appreciate it, the page code looks like this:

 

<?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');
$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.

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
// Simple multi image addon	
 $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">
<!-- Simple multi image addon -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<!-- EOF Simple multi image addon	 -->
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<style type="text/css">

#fixedtipdiv{
position:absolute;
padding: 2px;
border:1px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}

</style>


<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
 <title><?php echo TITLE; ?></title>
<?php
}
/*** End Header Tags SEO ***/
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<!--BOF Dynamic force attribute selection -->
<script language="javascript"><!--
function validate() {

<?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)) {
?>
if (document.cart_quantity.optionid<?php echo (int)$products_options_name['products_options_id']; ?>.selectedIndex == 0 ) {
    alert('<?php echo TEXT_FORCE_INFORMATION ?>: <?php echo $products_options_name['products_options_name']; ?>');
    document.cart_quantity.optionid<?php echo (int)$products_options_name['products_options_id']; ?>.focus();
    return false;
  }
<?php
   }
?>
}
//--></script>
<!--EOF Dynamic force attribute selection -->


<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')
}


// Unique attributes
function popupDetailsWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=450,screenX=150,screenY=150,top=150,left=150')
}
// Unique attributes



//--></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">
<?php /*** Begin Header Tags SEO ***/ ?>
<a name="<?php echo $header_tags_array['title']; ?>"></a>
<?php /*** End Header Tags SEO ***/ ?>
<!-- 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 //-->
<!-- BOF Dynamic force attribute selection -->
   <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'), 'post', 'onSubmit="return validate(this);"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
   <!-- EOF Dynamic force attribute selection -->

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

<?php /*** Begin Header Tags SEO ***/ ?>
           <td valign="top"><h1><?php echo $products_name; ?></h1></td>
           <td align="right" valign="top"><h1><?php echo $products_price; ?></h1></td>
           <?php /*** End Header Tags SEO ***/ ?>
         </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*2, SMALL_IMAGE_HEIGHT*2, '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
   }
?>
         <!-- </td></tr><tr><td  class="smallText"> --><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
// Unique attributes
     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_comment, popt.products_options_link 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");
// Unique attributes
     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, pa.products_attributes_id 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 . "'" . " order by pov.products_options_values_name");
       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;
       }
?>

<!-- unique attributes -->
           <tr>
             <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>


<!-- BOF Dynamic force attribute selection -->
             <td class="main"><?php echo tep_draw_pull_down_menu_force('optionid' . $products_options_name['products_options_id'] . '', 'id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?>
             <!-- EOF Dynamic force attribute selection -->


<?php
       if ( $products_options_name['products_options_link'] != "" ) {
         $link = DIR_WS_DETAILS . $products_options_name['products_options_link'];
         if  ( $products_options_name['products_options_comment'] != "" ) {
           echo ' <a href="javascript:popupDetailsWindow(\'' . tep_href_link($link) . '\')">' . $products_options_name['products_options_comment'] . '</a>';
         } else {
           echo ' <a href="javascript:popupDetailsWindow(\'' . tep_href_link($link) . '\')">' . TEXT_DEFAULT_OPTION_LINK_TEXT . '</a>';
         }
       } else {  
         if ( $products_options_name['products_options_comment'] != "" ) {
           echo " " . $products_options_name['products_options_comment'];
         }
       }
?>
             </td>
<!-- unique attributes -->
<?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>
<!--- BEGIN Header Tags SEO Social Bookmarks -->
<?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 
include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 
?>
     <!--- END Header Tags SEO Social Bookmarks -->      
     <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>
<?php /*** Begin Header Tags SEO ***/ ?>
     <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
      <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 
      <?php echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title']; ?></a></td>
     </tr>
     <?php /*** End Header Tags SEO ***/ ?>     
   </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'); ?>

Share this post


Link to post
Share on other sites

SSL warning message

 

 

Can you can confirm you have osCThumb installed & all pages on your site are on the secure server instead of just the osC specified ones? (product_info is not normally a ssl page)


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

SSL warning message

 

 

Can you can confirm you have osCThumb installed & all pages on your site are on the secure server instead of just the osC specified ones? (product_info is not normally a ssl page)

 

I don't currnelty have Oscthumb installed (but this will be shortly) and my hosts have confirmed that everything is within the secure server.

Share this post


Link to post
Share on other sites

SSL warning message

 

 

Can you can confirm you have osCThumb installed & all pages on your site are on the secure server instead of just the osC specified ones? (product_info is not normally a ssl page)

 

 

OK, I'm not sure why u have the issue then, it may be due to the removal of tep_href_link from the links (causes other issues), but as they are all relative it should not matter?

 

Can u upload the page again & see exactly which links do not have https (just hover over).


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

Simply leave the Ultimate Images Pack section you detailed in place, it wont cause any issue. smile.gif

Share this post


Link to post
Share on other sites

Simply leave the Ultimate Images Pack section you detailed in place, it wont cause any issue. smile.gif

 

Sam whenever someone clicks on the additional images it takes them to a new page with the image only and no fancybox popups how can I change it so that I have fancy box popups on the additional images? Plus keep in on the same page

 

Thanks

Michelle

Share this post


Link to post
Share on other sites

Sam whenever someone clicks on the additional images it takes them to a new page with the image only and no fancybox popups how can I change it so that I have fancy box popups on the additional images? Plus keep in on the same page

 

Thanks

Michelle

 

 

Looking at your page, the popup is working as expected, you must be refering to the Ultimate Images Pack additional images, obviously this will have no effect on them (thats a different contrib), you must modify the code in the module that uses to achieve that.


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

Looking at your page, the popup is working as expected, you must be refering to the Ultimate Images Pack additional images, obviously this will have no effect on them (thats a different contrib), you must modify the code in the module that uses to achieve that.

 

Sam how do I modify the the code to work with your contribution whenever i take the ultimate image code off it took all my additional images away thats the reason why its still there I don't know how to do it can you please tell me

 

Thanks

Michelle

Share this post


Link to post
Share on other sites

Hi,

 

I am trying to get the fancybox to work with multiple products on one page. I am talking about the product listing. I added a "magnifying"-button in the table next to the products picture to allow my customers to see a large image of the product without having to enter the product_info page.

 

As far as I understand the working of the FancyBox it opens any link inside the <div id=fancy></div> part as a popup. If it's an image it works, a normal link doesn't. Now if I put every "magnifying"-button inside it's own <div id=fancy></div> only the first one on the page works. If I put the whole table inside just one big div-tag every link is going to be popped up.

 

I am a total noob regarding javascript and even though I have coding skills in quite some languages I have no idea how to change the script that identifies the div-tag.

EDIT: OK, I got to the point of understanding that $("div#fancy a").fancybox({ adds the fancybox funcionality to the stuff inside the tag. Why is it only working with the first occurance of the <div id=fancy> tag?

 

Can you think of a way to make it work with div-tags like fancy1, fancy2, fancy3,...? Or some other way to get it to work?

 

You may want to have a look at

 

http://www.vegan-wonderland.de/catalog/aufschnitte-c-21.html to see the magnifying-buttons.

 

To see it working with the first button go to

 

http://www.vegan-wonderland.de/catalog2/index.php?cPath=21

 

Thanks in advance.

Kalle

Edited by VW_Kalle

Share this post


Link to post
Share on other sites

Hi this is my first post as I'm new to OSC so please go easy :) I have followed the instructions however I have come unstuck as one point in the andmin/Categories.php

 

I cannot find:

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>
      F
     </tr>
</table>
<?php
   }
?>

The closest match I can find is (7 lines down.... thought the extra bit before might help)

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

 

Has anyone any idea where I should place the required text:

<!-- 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 have tried a few places but to no avail is it was purely based on guess work.

If anyone could shed any light I would be most appreciative.

Kind Regards Dan

Share this post


Link to post
Share on other sites

Thank you for all your help with my previous problem. i have just one more:

 

I am trying to work out how to get this working with easy populate. I am not an expert with php and i can't seem to work it out. Any help is much appreciated.

Share this post


Link to post
Share on other sites

Where to put code:

 

 

You have a slightly different table layout, so it needs a slightly different addition!

 

just b4 the

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

in the code you've given, add:

 

 
?>
<!-- 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 'To Be Deleted';
echo '</td>'; ++$i; } ?> 
</tr>
</table></td></tr>
<!-- EOF Simple multi image addon -->
<?php

 

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

Also if i wanted to add this contribution to other pages to use the same image view action what do i need to do please?

Share this post


Link to post
Share on other sites

Also if i wanted to add this contribution to other pages to use the same image view action what do i need to do please?

 

 

Look at the fancybox site linked to in the contrib for info, they have full instructions there. smile.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

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

×