p.order_pos ORDER BY order_pos ASC LIMIT 1) AS next FROM cs_products p WHERE slug = ".ms($_GET['id'])); } if (!isset($qProduct) || mysql_num_rows($qProduct) == 0){ $qProducts = mysql_query("SELECT name, slug, (SELECT image_path FROM cs_productimages WHERE p.id = product_id ORDER BY order_pos ASC LIMIT 1) AS image_path FROM cs_products p ORDER BY order_pos ASC"); $products = array(); $width = 0; while ($row = mysql_fetch_array($qProducts)){ if ($row['image_path'] != ''){ $products[] = $row; $size = getimagesize(ROOT_PATH.$row['image_path']); $width += ceil((260 / $size[1]) * $size[0]) + 12; } } } else{ $product = mysql_fetch_array($qProduct); $qImages = mysql_query("SELECT image_path, caption FROM cs_productimages WHERE product_id = ".$product['id']." ORDER BY order_pos ASC"); $images = array(); while ($row = mysql_fetch_array($qImages)){ $images[] = $row; } $meta_description_override = $product['meta_description']; $meta_image_override = BASE_URL."thumb.php?src=".$images[0]['image_path']."&w=250&h=250&zc=3"; } // Create the main content html ob_start(); ?>
1) { ?>

COMMENT BUY
update_hash('products/'); link_internal_links('.product_navigation'); update_hash('products'); $('#scroller_container').width($('#content').width() - 24); $('#scroller_container').jScrollPane(); link_internal_links('#scroller_container'); $('.comment_button').click(function(e){ e.preventDefault(); $.colorbox({ href:"comments.php?ref="+$(this).attr('data-url'), innerWidth:400 }); }); $('.share_button').hover(function(){ $(this).find('.share_button_extended').stop(false, true).fadeIn(300); }, function(){ $(this).find('.share_button_extended').stop(false, true).fadeOut(300); }); reinitializeAddThis(); $('.product_image').css('opacity', '0.5'); $('.product_image').hover(function(){ $(this).stop().fadeTo(300, 1); },function(){ $(this).stop().fadeTo(300, 0.5); }); $('.product_image').click(function(event){ event.preventDefault(); var link = $(this); if (!loading){ loading = true; $('#content').height($('#inner_content').height()+73); var newUrl = $(this).attr('data-url'); $('.main_image').css('width', 'auto'); $('.main_image').css('height', 'auto'); $('.main_image').attr('src', newUrl); if (link.hasClass('loaded')){ resizeContent(); loading = false; } else{ $('.main_image').load(function(){ resizeContent(); loading = false; link.addClass('loaded'); $('.main_image').unbind('load'); }); } } });