Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ultra Pics with J QUery J.S Lightbox to work with Star Product v 1.6


Guest

Recommended Posts

Posted

Hi

 

I am trying to get Ultra Pics with J QUery J.S Lightbox to work with Star Product v 1.6

 

can you help me this is the page it needs to work on:

 

includes/modules/star_product.php:

<?php
//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER
 $header_star_product = array();
 $header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));
 new contentBoxHeading($header_star_product);
//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-

 function tep_star_product_with_attributes($products_id) {
 $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
 $attributes = tep_db_fetch_array($attributes_query);

 if ($attributes['count'] > 0) {
return true;
 }
 else {
return false;
}
 }

 $star_products_query = tep_db_query("select substring(pd.products_description, 1, 225) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ((" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id) where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
 $star_products = tep_db_fetch_array($star_products_query);
 $star_products['products_name'] = tep_get_products_name($star_products['products_id']);
 $evita_cortar_palabras = explode( ' ',  $star_products["products_description"] );
array_pop( $evita_cortar_palabras );
$star_products["products_description"]  = implode( ' ', $evita_cortar_palabras );

if (!tep_star_product_with_attributes($star_products['products_id'])) {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<tr>
							 <td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="85%" class="star-product">'. ($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
					 </tr>
					 <tr>
					   <td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
					 </tr>
					 <tr>
					   <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_star_buy_now.gif', STAR_BUTTON_IN_CART) . '</a></td>
					 </tr>');
$star_products_output = array_slice($star_products, sizeof($star_products)-1);
new contentBox($star_products_output);
}

else {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<tr>
							 <td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="85%" class="star-product">'. ($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
					 </tr>
					 <tr>
					   <td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
					 </tr>
					 <tr>
					   <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
					 </tr>');
new contentBox($star_products);
}
?>

 

 

this is the installation for the:

 

Product_info.php:

FILE: PRODUCT_INFO.PHP

Product_info.php Begin EDIT

================================================================================
=========
Line 27
Find 

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

=====================================

Replace with


<!-- Light Box J Query Add on BOF -->
<link rel="stylesheet" href="lightbox/prettyPhoto.css" type="text/css" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="lightbox/jquery-1.2.3.pack.js" type="text/javascript" charset="utf-8"></script>
<script src="lightbox/prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<!-- Light Box J Quesry Add on EOF -->


================================================================================
===========

Line 70

Find

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

======================================

Replace with

<?php
 } else {
// Light Box J Query  with ultra Pics 2.08 Add on BOF 
$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_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, 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 . "'");
// Light Box J Query  with ultra Pics 2.08 Add on EOF
$product_info = tep_db_fetch_array($product_info_query);

================================================================================
===============

Line 108

Find

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

========================================

Replace with

<!-- Light Box J Query  with ultra Pics 2.08 Add on BOF  -->
<?php
$small_image = $product_info['products_image'];
$popup_image = $product_info['products_image_med'];
if ($popup_image == '')
  $popup_image = $small_image;
echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $popup_image) . '" target="_blank" rel="prettyOverlay[gallery]" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES . $small_image, $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br/>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';
?>
<!-- Light Box J Query  with ultra Pics 2.08 Add on BOF -->

================================================================================
================

Line 165 
After

</td>
  </tr>
=======================================
add

<?php
// Light Box J Query  with ultra Pics 2.08 Add on BOF  
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); 
}
// Light Box J Query  with ultra Pics 2.08 Add on EOF
?>


So it looks like
--------------------------------------------------------------
</td>
  </tr>
<?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!
?>
---------------------------------------------------------------


Product_info.php End of Edit.

 

so where do i start to get it to work on this page?

Archived

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

×
×
  • Create New...