Jump to content

Archived

This topic is now archived and is closed to further replies.

Psytanium

2.3.3.4 to 2.3.4 PhotosetGrid and ColorBox product info

Recommended Posts

I got complications updating product_info.php
what is the reason to do this upgrade ? security or just a better look ?

 

content of my product_info.php file, i appreciate some help doing this upgrade (if necessary)

<?php
/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');
  if (!isset($HTTP_GET_VARS['products_id'])) {
    tep_redirect(tep_href_link(FILENAME_DEFAULT));
  }
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
  $current_page = 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);

  require(DIR_WS_INCLUDES . 'template_top.php');
?>
<?php echo tep_draw_content_top();?>
<?php
  if ($product_check['total'] < 1) {
?>
<?php echo tep_draw_title_top();?>
<h1><?php echo TEXT_PRODUCT_NOT_FOUND; ?></h1>
<?php echo tep_draw_title_bottom();?>

<div class="contentContainer">
  <div class="contentPadd">
      <div class="buttonSet">
        	<span class="fl_right"><?php echo tep_draw_button_top();?><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?><?php echo tep_draw_button_bottom();?></span>
      </div>
</div>
</div>
<?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, p.products_pdfupload_manual, p.products_pdfupload, pd.products_url, p.products_price, p.products_show_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.fr_currencies_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);



		$tags_query_raw = tep_db_query("select pt.tag_id, t.tag_text from " . TABLE_TAGS . " t, " . TABLE_PRODUCTS_TAGS . " pt where pt.products_id = '" . (int)$product_info['products_id'] . "' and t.tag_id = pt.tag_id");
		$tags = '';
		$caount = 0;
      while ($tag = tep_db_fetch_array($tags_query_raw)) {
				if ($caount != 0) $tags .= ', ';
				$tags .= '<a href="' . tep_href_link(FILENAME_TAG_PRODUCTS) .'?id_tag='.$tag['tag_id'].'">'.$tag['tag_text'].'</a>';
				$caount++;
			}



    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 = ' <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']), $product_info['fr_currencies_id']) . '</span> <del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']), $product_info['fr_currencies_id']) . '</del>';
			$sale	= '<div class="sale"></div>';
    } else {
      $products_price = '<span class="productSpecialPrice">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']), $product_info['fr_currencies_id']) . '</span>';
			$sale	= '';
    }

    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_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

<?php
// add by Seaman   
	switch (tep_not_null($product_info['products_image'])) {
	case 0:
		if (($oscTemplate->hasBlocks('box_info_page')))	{
		$port_side = 'left_side_pic-1';	
		$starboard_side = 'right_side_pic-1';
		}else{
		$port_side = 'left_side_pic-0';
		$starboard_side = 'right_side_pic-0';
		}
		break;
	case 1:
		$port_side = 'left_side_pic-1';
		$starboard_side = 'right_side_pic-1';
		break;
	}   
   
?>
<?php if($cPath != 102) { ?>
<div class="contentContainer">
  <div class="contentPadd prods_info_page">
	<div class="prods_info decks big">
		<div class="forecastle">
		<ol class="masthead">
			  
			  
              
              
              
              <li class="starboard_side <?php echo $starboard_side;?>">
           
    				<div class="info">
<?php /*?><?php
        if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
                        <div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>
<?php
        }else{
?>		
                        <div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></div>
<?php    	
        }
?><?php */?>
<?php 
	
$customers_info_query = tep_db_query("select customers_authorized from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$customers_info = tep_db_fetch_array($customers_info_query);
$customers_authorized = $customers_info['customers_authorized'];
$authorization_test = PRODUCTS_PRICE_AUTHORIZATION;
?>

<h2><?php echo $products_name; ?></h2>
<h2 class="price">
<?php 
if($cPath != 102){
if ($product_info['products_show_price'] == 1 || $new_price = tep_get_products_special_price($product_info['products_id'])) {
	echo '<b>'.PRICE. '</b>'.$products_price;
}elseif($authorization_test == "1") {
	if (tep_session_is_registered('customer_id') && $customers_authorized == '1') {
		echo '<b>'.PRICE. '</b>'.$products_price;
	} else {
		echo '<span class="productSpecialPrice">Call For Price</span>';
	}
}
}else{
	echo '';
}
?>
</h2>
                        
<?php
if ($product_info['products_pdfupload'] == '') {
// echo '<a href="' . tep_href_link(DIR_WS_MANUALS. $product_info['products_pdfupload']) . '"target="_blank">' . TEXT_CLICK_TO_PDFUPLOAD2 . '</a>';
} else {
echo '<div style="width:20%; float:left; margin-top:10px;"><a class="product-icon-link" href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_pdfupload']) . '"target="_blank"><img class="product-icons-row" src="images/icons/pdf-icon.png" /><br />Brochure</a></div>';
}
if ($product_info['products_fileupload'] == '') {
// echo '<a href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_fileupload']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD2 . '</a>';
} else {
echo '<a href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_fileupload']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD . '</a>';
}
?>

<?php
if ($product_info['products_pdfupload_manual'] == '') {
// echo '<a href="' . tep_href_link(DIR_WS_MANUALS. $product_info['products_pdfupload']) . '"target="_blank">' . TEXT_CLICK_TO_PDFUPLOAD2_MANUAL . '</a>';
} else {
echo '<div style="width:20%; float:left; margin-top:10px;"><a class="product-icon-link" href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_pdfupload_manual']) . '"target="_blank"><img class="product-icons-row" src="images/icons/pdf-icon.png" /><br />Manual</a></div>';
}
if ($product_info['products_fileupload_manual'] == '') {
// echo '<a href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_fileupload_manual']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD2_MANUAL . '</a>';
} else {
echo '<a href="' . tep_href_link(DIR_WS_MANUALS . $product_info['products_fileupload_manual']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD_MANUAL . '</a>';
}
?>

<?php
$sbm_array = explode(';', MODULE_SOCIAL_BOOKMARKS_INSTALLED);
        $social_bookmarks = array();
        foreach ( $sbm_array as $sbm ) {
          $class = substr($sbm, 0, strrpos($sbm, '.'));
          if ( !class_exists($class) ) {
            include(DIR_WS_LANGUAGES . $language . '/modules/social_bookmarks/' . $sbm);
            include(DIR_WS_MODULES . 'social_bookmarks/' . $class . '.php');
          }
          $sb = new $class();
          if ( $sb->isEnabled() ) {
            $social_bookmarks[] = $sb->getOutput();
          }}
        if ( !empty($social_bookmarks) ) {
          $data = implode( $social_bookmarks);}
echo $data;
?>

<?php 
   if (isset($HTTP_GET_VARS['products_id'])) {
        $manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");
        if (tep_db_num_rows($manufacturer_query)) {
          $manufacturer = tep_db_fetch_array($manufacturer_query);
   }
  }
if ($manufacturer['manufacturers_name'] == 'Feldhaus'){
	echo '<div style="width:33%; float:left; margin-top:10px;"><a class="product-icon-link" href="feldhaus-builder.html" target="_blank"><img class="product-icons-row" src="images/icons/feldhaus-builder.png" /><br />Build Your House</a></div>';
}
?>

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





<?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) {
?>
                  <div class="options">
                        <p class="options-title"><?php echo TEXT_PRODUCT_OPTIONS; ?></p>
                        <ul class="ofh">
<?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']), $product_info['fr_currencies_id']) .') ';
                          }
                        }
    
                        if (is_string($HTTP_GET_VARS['products_id']) && 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;
                        }
?>
                        		<li class="fl_left"><label><?php echo $products_options_name['products_options_name'] . ':'; ?></label><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></li>
<?php
          }
?>
                            </ul>
                        </div>
<?php
        }
?>
            			<div class="desc desc_padd"><?php echo stripslashes($product_info['products_description']); ?></div>
    
<?php
        $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
        $reviews = tep_db_fetch_array($reviews_query);
?>
    <?php
// add by Seaman   
   if ($product_check['total'] >= 1) {
      include (DIR_WS_INCLUDES . 'products_next_previous.php');
   }
// add by Seaman
?>   
                        <div class="buttonSet">
                            <span class="buttonAction"><?php echo tep_draw_button2_top();?><?php echo tep_draw_button2_bottom();?></span>
                
                            <div class="fl_right" align="right"><?php echo tep_draw_button_top();?><?php
// BOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0
/*

    <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
*/

    if ($product_info['products_price'] == CALL_FOR_PRICE_VALUE){
?>
    <span class="buttonAction">
    <a href="javascript:history.go(-1)"><?php echo tep_draw_button(IMAGE_BUTTON_BACK,'Back',null,'primary'); ?></a></span>
<?php
} else {
?>

    <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
<?php
}
// EOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0
?><?php echo tep_draw_button_bottom();?></div>
                        </div>
        			</div> 
              </li>
              
              <li class="port_side <?php echo $port_side;?>">
<?php
    if (tep_not_null($product_info['products_image'])) {
      $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
?>	  
<?php
          if (tep_db_num_rows($pi_query) > 0) {
?>
        <div id="piGal" class="hover">
          	<ul class="relative">
<?php
        $pi_counter = 0;
        while ($pi = tep_db_fetch_array($pi_query)) {
          $pi_counter++;
          $pi_entry = '        <li class="wrapper_pic_div"><a href="';
		  $pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false);
		  $pi_entry .= '" target="_blank" rel="fancybox" title="' . $pi['htmlcontent'] . '" class="prods_pic_bg" style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H).'px;">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), ' style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2).'px;margin:'.PIC_MARG_T.'px '.PIC_MARG_R.'px '.PIC_MARG_B.'px '.PIC_MARG_L.'px;"') . ''.tep_draw_prod_pic_info_top().''.tep_draw_prod_pic_info_bottom().'</a>'.$sale;
          $pi_entry .= '</li>';
          echo $pi_entry;
        }
?>
          	</ul>
        </div>
<?php
// add by Seaman
 	if	(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2 != PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2){
		$coeff = ((PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2)/(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2));	
	}else{
		$coeff = 1;
	}
// add by Seaman	
?>      
    <script type="text/javascript">
    $(function(){
	var myWidth = <?php echo (($pi_counter > 1) ? '65' : '0'); ?>;
	var myHeight = myWidth * <?php echo $coeff;?>;
		$('#piGal ul').bxGallery({
		  maxwidth: '<?php echo (PROD_INFO_IMAGE_WIDTH + PIC_MARG_W); ?>',
		  maxheight: '<?php echo (PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H); ?>',
		  thumbwidth: myWidth,
		  thumbheight: myHeight,
		  thumbcontainer: <?php echo (PROD_INFO_IMAGE_WIDTH + PIC_MARG_W + 7); ?>,
		  load_image: 'ext/jquery/bxGallery/spinner.gif'
    })
        });
    </script>
<?php
          } else {
			  if (tep_not_null($product_info['products_image'])) {
?>

   			 	<div style="width:<?php echo (PROD_INFO_IMAGE_WIDTH + 10); ?>px;" class="hover">
          <?php echo '<div id="piGal" class="wrapper_pic_div fl_left" style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H).'px;"><a class="prods_pic_bg" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image'], '', 'NONSSL', false) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), ' style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2).'px;margin:'.PIC_MARG_T.'px '.PIC_MARG_R.'px '.PIC_MARG_B.'px '.PIC_MARG_L.'px;"', '', '') . ''.tep_draw_prod_pic_info_top().''.tep_draw_prod_pic_info_bottom().'</a>'.$sale.'</div>'; ?>
        
    			</div>
<?php
// add by Seaman
			  }
		}				  
    echo '<script type="text/javascript">
    $("#piGal a[rel^=\'fancybox\']").fancybox({
      cyclic: true
    });
    </script>';
			  
?>
		
<?php
        }
?>
<?php
	if (($oscTemplate->hasBlocks('box_info_page')))	{
		$width_ext = PROD_INFO_IMAGE_WIDTH + PIC_MARG_W;
?>
<?php /*?><?php $bm_categories = new bm_categories();
  echo  $bm_categories->getData();?><?php */?>
				<div class="bookmarks">
<?php echo $oscTemplate->getBlocks('box_info_page');?>
				</div>	
                
<?php				
			
// add by Seaman
}
?>
              </li>
              
              
		</ol>
        
		</div>	
<?php
				if	($tags != '')	{
?>
	<div class="infoBoxWrapper">
  	<div class="box_wrapper">
  		<div class="infoBoxHeading prod_page"><div class="title-icon"></div><?php echo tep_draw_box_title_top();?>Tags of product<?php echo tep_draw_box_title_bottom();?></div>
      <div class="infoBoxContents">
				<?php
                echo $tags;
        ?>
      </div>
    </div>
  </div>	
<?php
				}
?>				
	</div>
    
    </div>
</div>
<?php }else{ ?>
<div class="contentContainer">
  <div class="contentPadd prods_info_page">
	<div class="prods_info decks big">
		<div class="forecastle">
		

              <div class="projects-layout-pics">
              <?php
			  // add by Seaman   
   if ($product_check['total'] >= 1) {
      include (DIR_WS_INCLUDES . 'projects_next_previous.php');
   }
// add by Seaman
?>
<?php
    if (tep_not_null($product_info['products_image'])) {
      $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
?>	  
<?php
          if (tep_db_num_rows($pi_query) > 0) {
?>
        <div id="piGal" class="hover">
          	<ul class="relative">
<?php
        $pi_counter = 0;
        while ($pi = tep_db_fetch_array($pi_query)) {
          $pi_counter++;
          $pi_entry = '        <li class="wrapper_pic_div"><a href="';
		  $pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false);
		  $pi_entry .= '" target="_blank" rel="fancybox" title="' . $pi['htmlcontent'] . '" class="prods_pic_bg" style="width:700px; height:400px;">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], 700, 400, ' style="width:700px; height:400px; margin:'.PIC_MARG_T.'px '.PIC_MARG_R.'px '.PIC_MARG_B.'px '.PIC_MARG_L.'px;"') . ''.tep_draw_project_pic_info_top().''.tep_draw_prod_pic_info_bottom().'</a>'.$sale;
          $pi_entry .= '</li>';
          echo $pi_entry;
        }
?>
          	</ul>
        </div>
<?php
// add by Seaman
 	if	(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2 != PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2){
		$coeff = ((PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H2)/(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W2));	
	}else{
		$coeff = 1;
	}
// add by Seaman	
?>      
    <script type="text/javascript">
    $(function(){
	var myWidth = <?php echo (($pi_counter > 1) ? '65' : '0'); ?>;
	var myHeight = myWidth * <?php echo $coeff;?>;
		$('#piGal ul').bxGallery({
		  maxwidth: '700px',
		  maxheight: '400px',
		  thumbwidth: myWidth,
		  thumbheight: myHeight,
		  thumbcontainer: '700px',
		  load_image: 'ext/jquery/bxGallery/spinner.gif'
    })
        });
    </script>
<?php
          } else {
			  if (tep_not_null($product_info['products_image'])) {
?>

   			 	<div style="width:700px;" class="hover">
          <?php echo '<div id="piGal" class="wrapper_pic_div fl_left" style="width:700px; height:400px;"><a class="prods_pic_bg" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image'], '', 'NONSSL', false) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), ' style="width:700px; height:400px; margin:'.PIC_MARG_T.'px '.PIC_MARG_R.'px '.PIC_MARG_B.'px '.PIC_MARG_L.'px;"', '', '') . ''.tep_draw_project_pic_info_top().''.tep_draw_prod_pic_info_bottom().'</a>'.$sale.'</div>'; ?>
        
    			</div>
<?php
// add by Seaman
			  }
		}				  
    echo '<script type="text/javascript">
    $("#piGal a[rel^=\'fancybox\']").fancybox({
      cyclic: true
    });
    </script>';
			  
?>
		
<?php
        }
?>
<?php
	if (($oscTemplate->hasBlocks('box_info_page')))	{
		$width_ext = PROD_INFO_IMAGE_WIDTH + PIC_MARG_W;
?>
<?php /*?><?php $bm_categories = new bm_categories();
  echo  $bm_categories->getData();?><?php */?>
				<div class="bookmarks">
<?php echo $oscTemplate->getBlocks('box_info_page');?>
				</div>	
                
<?php				
			
// add by Seaman
}
?>
              </div>
              
              
              
              
              <div class="projects-layout-info">
           
    				<div class="info">


<?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) {
?>
                  
<?php
        }
?>
            			<div class="desc desc_padd"><?php echo stripslashes($product_info['products_description']); ?></div>
    
<?php
        $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
        $reviews = tep_db_fetch_array($reviews_query);
?>

                        <div class="buttonSet">
                            <span class="buttonAction"><?php echo tep_draw_button2_top();?><?php echo tep_draw_button2_bottom();?></span>
                
                            <div class="fl_right" align="right"><?php echo tep_draw_button_top();?>
							<?php echo tep_draw_button_bottom();?></div>
                        </div>
        			</div> 
              </div>
              
	
        
		</div>	
<?php
				if	($tags != '')	{
?>
	<div class="infoBoxWrapper">
  	<div class="box_wrapper">
  		<div class="infoBoxHeading prod_page"><div class="title-icon"></div><?php echo tep_draw_box_title_top();?>Tags of product<?php echo tep_draw_box_title_bottom();?></div>
      <div class="infoBoxContents">
				<?php
                echo $tags;
        ?>
      </div>
    </div>
  </div>	
<?php
				}
?>				
	</div>
    
    </div>
</div>
<?php }
?>
<?php echo tep_draw_content_bottom();?>
<?php
//Optional Related Products (ORP)
	 include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS);
//ORP: end	
// add by Seaman
            if ((USE_CACHE == 'true') && empty($SID)) {
              echo tep_cache_also_purchased(3600);
            } else {
              //include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
            }
?>
</form>
<?php
  }
?>

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

Share this post


Link to post
Share on other sites

You have a template from Seaman it's is not standard.

 

The best you can do:

 

In product_info.php  

replace all fancybox for colorbox

 

find 

load_image: 'ext/jquery/bxGallery/spinner.gif'

replace 

load_image: 'ext/colorbox/images/loading.gif'

 

 

in template_top.php

Replace the fancybox script for colorbox and keep the bxGallery (photosed-grid is then not necessary)

 

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>
<!--   <script type="text/javascript" src="ext/photoset-grid/jquery.photoset-grid.min.js"></script> -->
<link rel="stylesheet" type="text/css" href="ext/colorbox/colorbox.css" />
<script type="text/javascript" src="ext/colorbox/jquery.colorbox-min.js"></script>
 
Then you have colorbox and the images keep the sice of your template.

Share this post


Link to post
Share on other sites

I also have the htmlcontent placed at the top of the image so that it doesn't go by the buttons

 

in: ext/colorbox/colorbox.css

find

#cboxTitle{position:absolute; top:100%; left:0; color:#000; text-align: left;}

 

replace

#cboxTitle{position:absolute; top:0; left:0; height:18px; color:#2E6E9E; background:#545252; text-align: left;}

Share this post


Link to post
Share on other sites

×