Jump to content



Latest News: (loading..)

- - - - -

Weird fancybox problem with 2.3.1 modified template

fancybox 2.3.1

  • Please log in to reply
11 replies to this topic

#1   streen

streen
  • Members
  • 4 posts
  • Real Name:Jari Warpenius

Posted 25 July 2012 - 06:05 PM

Hi!

I have a problem with fancybox in product pages. Image just opens to a new window without fancybox effect.

Fancybox is loaded fine and I can't seem to find problem anywhere. Any help would be appreciated.

Site URL is https://paidaton.com

Thanks!

#2   streen

streen
  • Members
  • 4 posts
  • Real Name:Jari Warpenius

Posted 27 July 2012 - 09:22 PM

My product_info.php is following, all help would be greatly appreciated!


<?php
/*
  $Id$

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

  Copyright © 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
  $tab_sel = tep_href_link(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, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info = tep_db_fetch_array($product_info_query);

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

    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = ' <span class="productSpecialPrice fl_left">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span> <del class="fl_left">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del>';
    } else {
      $products_price = '<span class="productSpecialPrice">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    }

    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;
}  
// add by Seaman  
?>
<div class="contentContainer">
  <div class="contentPadd prods_info_page">
<div class="prods_info decks big"><?php echo tep_draw_prod_top();?>
<?php
// add by Seaman  
   if ($product_check['total'] >= 1) {
      include (DIR_WS_INCLUDES . 'products_next_previous.php');
   }
// add by Seaman
?>              

<div class="forecastle">
<ol class="masthead">
<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">'.tep_draw_prod_pic_info_top().'<a href="';
$pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image']);
$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_bottom().'</a>';
          $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) ? '66' : '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 + 10); ?>,
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" style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H).'px;">'.tep_draw_prod_pic_info_top().'<a class="prods_pic_bg" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" 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_bottom().'</a></div>'; ?>

     </div>
<?php
}
?>
    <script type="text/javascript">
    $("#piGal a[rel^='fancybox']").fancybox({
      cyclic: true
    });
    </script>
<?php
        }
// add by Seaman
}
if (($oscTemplate->hasBlocks('box_info_page'))) {
?>
<div class="bookmarks">
<?php echo $oscTemplate->getBlocks('box_info_page');?>
</div>
<?php
}
// add by Seaman

?>
              </li>
<li class="starboard_side <?php echo $starboard_side;?>">
     <div class="info">
<?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    
        }
?>
                        <br /><h2><?php echo $products_name; ?></h2>
                        <h2 class="price"><?php echo '<b>'.PRICE. '</b>'.$products_price; ?></h2>
<?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'])) .') ';
                          }
                        }

                        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 . " where products_id = '" . (int)$HTTP_GET_VARS['products_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_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?><?php echo tep_draw_button2_bottom();?></span>

                            <div class="fl_right" align="right"><?php echo tep_draw_button_top();?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?><?php echo tep_draw_button_bottom();?></div>
                        </div>
         </div>
              </li>
</ol>
</div>
<?php echo tep_draw_prod_bottom();?></div>

    </div>
</div>
<?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
?>
</form>
<?php
  }
?>
<?php echo tep_draw_content_bottom();?>
<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

#3 ONLINE   mattjt83

mattjt83
  • Partner
  • 247 posts
  • Real Name:Matt Toste
  • Gender:Male
  • Location:CA, USA

Posted 28 July 2012 - 03:45 AM

Your product page is not including this:

<script type="text/javascript">
$("#piGal a[rel^='fancybox']").fancybox({
cyclic: true
});
</script>


#4   streen

streen
  • Members
  • 4 posts
  • Real Name:Jari Warpenius

Posted 29 July 2012 - 12:06 AM

Actually it is:

<div style="width:<?php echo (PROD_INFO_IMAGE_WIDTH + 10); ?>px;" class="hover">
<?php echo '<div id="piGal" class="wrapper_pic_div" style="width:'.(PROD_INFO_IMAGE_WIDTH + PIC_MARG_W).'px;height:'.(PROD_INFO_IMAGE_HEIGHT + PIC_MARG_H).'px;">'.tep_draw_prod_pic_info_top().'<a class="prods_pic_bg" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" 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_bottom().'</a></div>'; ?>
</div>
<?php
}
?>
<script type="text/javascript">
$("#piGal a[rel^='fancybox']").fancybox({
cyclic: true
});
</script>


#5 ONLINE   mattjt83

mattjt83
  • Partner
  • 247 posts
  • Real Name:Matt Toste
  • Gender:Male
  • Location:CA, USA

Posted 29 July 2012 - 01:14 PM

Actually it is not.  View the source on your product page.

#6   germ

germ
  • Members
  • 13,921 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 29 July 2012 - 02:00 PM

I'd like to know which Web101 dropout made the shop SSL all the time?
:unsure:

Ridiculous...
:huh:
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#7   streen

streen
  • Members
  • 4 posts
  • Real Name:Jari Warpenius

Posted 05 August 2012 - 04:41 PM

Okey, somehow it doesn't include that fancybox intialization. Thank you for the feedback!

Btw, how is it bad for the shop if it's SSL all the time?

#8   germ

germ
  • Members
  • 13,921 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 05 August 2012 - 04:47 PM

It's just a waste of system resources. SSL is slower than non-SSL because it takes time (and resources) to encrypt the data.

The only pages that should be SSL are those where sensitive information is exchanged betwenn the client and the server.

If you're having problems getting SSL to work correctly click the SSL Implementation Help link in my signature.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#9   yohan_kib

yohan_kib
  • Members
  • 14 posts
  • Real Name:yohan

Posted 28 January 2013 - 04:06 AM

View Postmattjt83, on 29 July 2012 - 01:14 PM, said:

Actually it is not.  View the source on your product page.

Hi i am having exactly similar problem i don't know how or what I did, but I successfully managed to mess up the page. Now when i click on product images are opening on a new window.

help please

here is my product_info.php file. (I'm on v2.3.3)
thanks


<?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);
$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');
if ($product_check['total'] < 1) {
?>
<div class="contentContainer">
<div class="contentText">
<?php echo TEXT_PRODUCT_NOT_FOUND; ?>
</div>
<div style="float: right;">
<?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>
</div>
</div>

<?php echo "<meta name=\"keywords\" content=\"".KEYWORDS."\">"; // added by KB for search engines ?>
<?php echo "<meta name=\"description\" content=\"".DESCRIPTION."\">"; // added by KB for search engines ?>

<?php
} else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
	 $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <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'];
}
?>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<div>
<h1 style="float: right;"><?php echo $products_price; ?></h1>
<h1><?php echo $products_name; ?></h1>
</div>
<div class="contentContainer">
<div class="contentText">
<?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");
	 if (tep_db_num_rows($pi_query) > 0) {
?>
<div id="piGal" style="float: right;">
	 <ul>
<?php
	 $pi_counter = 0;
	 while ($pi = tep_db_fetch_array($pi_query)) {
		 $pi_counter++;
		 $pi_entry = '	 <li><a href="';
		 if (tep_not_null($pi['htmlcontent'])) {
		 $pi_entry .= '#piGalimg_' . $pi_counter;
		 } else {
		 $pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false);
		 }
		 $pi_entry .= '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $pi['image']) . '</a>';
		 if (tep_not_null($pi['htmlcontent'])) {
		 $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>';
		 }
		 $pi_entry .= '</li>';
		 echo $pi_entry;
	 }
?>
	 </ul>
</div>
<script type="text/javascript">
$('#piGal ul').bxGallery({
maxwidth: 300,
maxheight: 200,
thumbwidth: <?php echo (($pi_counter > 1) ? '75' : '0'); ?>,
thumbcontainer: 300,
load_image: 'ext/jquery/bxGallery/spinner.gif'
});
</script>
<?php
	 } else {
?>
<div id="piGal" style="float: right;">
	 <?php echo '<a 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']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?>
</div>
<?php
	 }
?>
<script type="text/javascript">
$("#piGal a[rel^='fancybox']").fancybox({
cyclic: true
});
</script>
<?php
}
?>
<?php echo stripslashes($product_info['products_description']); ?>
<?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) {
?>
<p><?php echo TEXT_PRODUCT_OPTIONS; ?></p>
<p>
<?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 (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;
	 }
?>
	 <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br />
<?php
	 }
?>
</p>
<?php
}
?>
<div style="clear: both;"></div>
<?php
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<p style="text-align: center;"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p>
<?php
}
?>
</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_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
<?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>
</div>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
	 echo tep_cache_also_purchased(3600);
} else {
	 include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
?>
</div>
</form>
<?php
}
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>


#10   germ

germ
  • Members
  • 13,921 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 28 January 2013 - 10:12 PM

I'll try to help on one condition - I need the URL to see that page source.

It's a bazillion times easier to debug crap like this actually looking at the page than just the freakin' code.

So if you want my help PM me your URL, or stick a fork in  me 'cuz I'm done...
:huh:
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#11   yohan_kib

yohan_kib
  • Members
  • 14 posts
  • Real Name:yohan

Posted 28 January 2013 - 10:42 PM

thanks here is my URL

http://www.habeshashopping.com

#12   germ

germ
  • Members
  • 13,921 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 29 January 2013 - 02:07 AM

Fix your java script errors:

Error: $ is not defined

Source File: product_info.php?products_id=73
Line: 13
if ( $.attrFn ) { $.attrFn.text = true; }

-----------------------------------------------------------

Error: $(...).fancybox is not a function

Source File: product_info.php?products_id=73
Line: 125
$("#piGal a[rel^='fancybox']").fancybox({

-------------------------------------------------------------

Error: TypeError: $(...).bxSlider is not a function

Source File: product_info.php?products_id=73
Line: 40
$('#slider').bxSlider({

I really don't know how the fancybox scripts work or how they are interrelated so I won't be much help with the java script errors.

I'm guessing when the java script errors are fixed correctly the page will once again work as it should.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >