$include_file = DIR_INCLUDES . 'column_left.php'; include(DIR_INCLUDES . 'include_once.php'); ?>
|
if (@$category_id) {
$category = tep_db_query("select cat2012.cat2012_id from cat2012, product_to_cat2012 where product_to_cat2012.product_id = '" . $products_id . "' and product_to_cat2012.cat2012_id = cat2012.id");
$category_values = tep_db_fetch_array($category);
$category_id = $category_values['cat2012_id'];
}
//echo "query: select supplier.dba_name as supplier_name, supplier.image as supplier_image, product.id as product_id, product.name as product_name, product.description as product_description, product_desc.desc as product_desc, product.exception as product_exception, product.image as product_image, product.lrg_image, product.supplier_part_number as part_number, product.price as product_price, product.date_added, detail_link, product.active from supplier, product_desc, product where product.id = '" . $products_id . "' and product_desc.id = product.desc2 and product.supplier_id = supplier.id ";
$product_info = tep_db_query("select supplier.dba_name as supplier_name, supplier.image as supplier_image, supplier.instructions, supplier.faqs, product.id as product_id, product.name as product_name, product.description as product_description, product_desc.desc as product_desc, product.exception as shipping_info, product.image as product_image, product.lrg_image, product.supplier_part_number as part_number, product.price as product_price, product.retail as product_retail, product.date_added, product.shipping, product.collect, detail_link, product.universal, product.active, product.supplier_id from supplier, product_desc, product where product.id = '" . $products_id . "' and product_desc.id = product.desc2 and product.supplier_id = supplier.id");
if (!tep_db_num_rows($product_info)) { // product not found in database
?>
|
=tep_black_line();?> |
=tep_image($images_full. 'btn-go-back.jpg', '90', '25', '0', IMAGE_MAIN_MENU);?> |
} else {
tep_db_query("update product set viewed = viewed+1 where id = '" . $products_id . "'");
$product_info_values = tep_db_fetch_array($product_info);
$raw_date_added = $product_info_values['date_added'];
$date_added = strftime(DATE_FORMAT_LONG, mktime(0,0,0,substr($raw_date_added, 5, 2),substr($raw_date_added, -2),substr($raw_date_added, 0, 4)));
$shipping = $product_info_values['shipping'];
$check_special = tep_db_query("select * from specials2 where product_id REGEXP '^".$product_info_values['product_id'].",|,".$product_info_values['product_id'].",|,".$product_info_values['product_id']."$|^".$product_info_values['product_id']."$' and active=1 and (CURDATE() BETWEEN start AND end) AND ((site_id = 1)OR(site_id = '".WEBSITE_ID."'))");
// print "";
//echo "select * from specials2 where MATCH(product_id) AGAINST(\"" . $listing_values['product_id'] . "\" IN BOOLEAN MODE) and active=1 and (CURDATE() BETWEEN start AND end) AND ((site_id = 1)OR(site_id = '".WEBSITE_ID."'))";
if (tep_db_num_rows($check_special)) {
//echo"FOUND IT ";
while($special_values = tep_db_fetch_array($check_special)){
if(!$new_price){
switch($special_values['type']){
case "0":
unset($new_price);
break;
case "1":
$disc_val = (100 - $special_values['rate']);
$new_price = number_format(($product_info_values['product_price'] * ($disc_val/100)),2);
break;
case "2":
$new_price = number_format(($product_info_values['product_price'] - $special_values['rate']),2);
break;
case "3":
$new_price = number_format(($special_values['rate']),2);
break;
default:
}
}
$show_price = $special_values['show_price'];
if($shipping > 0){
if(($special_values['fship']==='1')&&(($special_values['exft']==='0')||(($special_values['exft']==='1')&&($product_info_values['collect']==='0')))){
if((($special_values['ltype'] === '1')&&($product_info_values['product_price'] > $special_values['lrate']))||($special_values['ltype'] != '1')){
$shipping = 0;
}
}
}
}
}
if ($new_price) {
if ($show_price == '1'){
$special_price = '$' . $new_price . '';
}else{
$special_price = 'See In Cart';
}
}
$products_price = ' $' . $product_info_values['product_price'];
if (file_exists(DIR_SERVER_ROOT.DIR_CATALOG.'shared/'.$product_info_values['supplier_id'].'/'.$product_info_values['product_image'])){
if ((is_file(DIR_SERVER_ROOT.DIR_CATALOG.'shared/'.$product_info_values['supplier_id'].'/'.$product_info_values['product_image']))&& (strlen($product_info_values['product_image']) > 2)&& ((stristr($product_info_values['product_image'],'.gif'))|| (stristr($product_info_values['product_image'],'.jpg'))|| (stristr($product_info_values['product_image'],'.jpeg')))){
$p_image = HTTP_SERVER.DIR_CATALOG.'shared/'.$product_info_values['supplier_id'].'/'.$product_info_values['product_image'];
}else{
$p_image = HTTP_SERVER.DIR_CATALOG.'images/default_product_image.gif';
}
}else{
$p_image = HTTP_SERVER.DIR_CATALOG.'images/default_product_image.gif';
}
if (stristr($p_image,'default_product_image.gif')){
$p_image = HTTP_SERVER.DIR_CATALOG.'images/default_product_image.gif';
}
//echo "";
$part_number = $product_info_values['part_number'];
if (($product_info_values['active'] == 1)&&($product_info_values['product_price'] > 0)){
$cart_link = ' ';
}else{
$cart_link = ' ';
}
if (strlen($product_info_values['lrg_image'])){
$large_image = true;
}else{
$large_image = false;
}
$image_thumb = '';
$vehicles = tep_db_query("select product_to_vehicle.yearstart, product_to_vehicle.yearend, product_to_vehicle.note, vehicle_model.Model, vehicle_make.Make from product_to_vehicle, vehicle_model, vehicle_make where product_to_vehicle.product_id = '" . $product_info_values['product_id'] . "' and vehicle_model.ID = product_to_vehicle.vehicle_model_id and vehicle_make.MakeID = vehicle_model.Make_ID order by vehicle_make.Make, vehicle_model.Model");
if (tep_db_num_rows($vehicles)){
while ($vehicles_val = tep_db_fetch_array($vehicles)){
$vehicle_applications .= $vehicles_val['yearstart'] . ' - ' . $vehicles_val['yearend'] . ' ' . $vehicles_val['Make'] . ' ' . $vehicles_val['Model'] . ' ' . $vehicles_val['note'] . ' '."\n";
}
}elseif($product_info_values['universal'] == '1'){
$vehicle_applications = 'Universal Product';
}
$shipping_text = "Shipping:";
?>
|
|
|
|
|
|
Got a question?
Call us now at 877-667-7407.
';
$pi_entry .= '';
echo $pi_entry;
$pi_counter++;
while ($pi = tep_db_fetch_array($moreimgs)) {
$pi_counter++;
$pi_entry = ' - ';
if (strlen($pi['htmlcontent']) > 5) {
$pi_entry .= '
' . $pi['htmlcontent'] . ' ';
}
$pi_entry .= ' ';
echo $pi_entry;
}
?>
'; ?>
'; ?>
-->";
?>
|
|
|
|
|
Retail Price: |
|
Our Low Price: |
=$products_price; ?> |
Sale Price: |
=$special_price?> |
|
|
=$shipping_text;?> |
|
$=number_format(($shipping),2);?> |
|
|
|
|
=$cart_link?> |
|
|
|
|
|
|
|
|
$include_file = DIR_INCLUDES . 'boxes/parts_suggest.php'; include(DIR_INCLUDES . 'include_once.php');
}
?>
|
|