Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page Layout Products Attributes


DawnG

Recommended Posts

I've got a heavily modded site and want the Products Attributes drop-down box to be placed before the product description - I would be very grateful to anyone who can show me where I need to change the code.

 

My current product_info.php file is:

 

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License
*/
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
 //   bof added by [email protected] for auction product contribution
    require(DIR_WS_LANGUAGES . $language . '/' . 'auctions.php');

    if (isset($_POST['placebid']) ) {
    //BOF DANS NEW AUCTION CONTRIB
	  $products_id = $_POST['products_id'];
	  $bid_price = $_POST['bid_price'];
	  $auction_id = $_POST['auction_id'];
	  $products_model = $_POST['products_model'];
	  $products_name = $_POST['products_name'];
	  //EOF DANS NEW AUCTION CONTRIB
	  if ( tep_session_is_registered('customer_id') ) {

		    $customers_id = (int)$customer_id;
		    $sql_auction = 'select auctions_bids_id, bid_price from '.TABLE_AUCTIONS_BIDS ." where auctions_id='".$auction_id."' and customers_id='$customers_id'";
		    if (!tep_db_num_rows(tep_db_query($sql_auction)) ) {
						  $sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values('', '$auction_id', '$customers_id', '$bid_price', '', now()) ";
					  $sql_auction99 = 'update '.TABLE_AUCTIONS." set auctions_id='$auction_id', auctions_max= '$bid_price', auctions_nb=auctions_nb+1, auctions_high_cust = '".(int)$customer_id."' where auctions_id='$auction_id'";
			    tep_db_query($sql_auction99);
			    tep_db_query($sql_auction);
		    } else { // auction existed
			  $exist_auction = tep_db_fetch_array(tep_db_query($sql_auction));
			  if ( ($exist_auction['bid_status']!='won')&& ($exist_auction['bid_price']<$bid_price) ){
			    //Auction Update code <-Dans Edit. ******
			    $sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='".$auction_id."',bid_price= '".$bid_price."', bid_date_added= '".date("Y-m-d").' '.date("h:i:s")."' where auctions_id='".$auction_id."' and customers_id='".$customers_id."'";
			  tep_db_query($sql_auction);
			  $sql_auction3 = 'update '.TABLE_AUCTIONS." set auctions_id='$auction_id', auctions_max= '$bid_price2', auctions_nb=auctions_nb+1, auctions_high_cust = '".(int)$customer_id."' where auctions_id='$auction_id'";
			    tep_db_query($sql_auction3);
								  $sql_customer2 = 'select MAX(ab.bid_price) as bid_price2 from '. TABLE_AUCTIONS_BIDS." ab  where ab.auctions_id= '$auction_id' GROUP BY auctions_id";
$hcustomer_query = mysql_query($sql_customer2);
while ($hcustomer = tep_db_fetch_array($hcustomer_query)) {
$bid_price2 = $hcustomer['bid_price2'];
		  }
			    $sql_auction2 = 'update '.TABLE_AUCTIONS." set auctions_id='$auction_id', auctions_max= '$bid_price2', auctions_nb=auctions_nb+1, auctions_high_cust = '".(int)$customer_id."' where auctions_id='$auction_id'";
			    tep_db_query($sql_auction2);
			  } else {
			    echo 'Your bid is lower than the current bid';
			  }
		    }
  // send email notify about higher bid than the other customer's bid who won
  // this still does not work correctly all bidders uderneath highest bidder notified instead of the last bidder.
  //DANS NEW AUCTION CHANGES
global $aaprodname;
$sql_customer = "select  max(ar.bid_price), ar.customers_lastname, ar.customers_firstname,ar.customers_email_address
FROM (SELECT ab.customers_id, ab.bid_price, c.customers_lastname, c.customers_firstname,c.customers_email_address
FROM auctions_bids ab, customers c
WHERE ab.customers_id =c.customers_id and ab.auctions_id ='$auction_id') ar
Group by bid_price DESC
LIMIT 1,1";

$acustomer_query = mysql_query($sql_customer);

while ($acustomer = tep_db_fetch_array($acustomer_query)) {
global $aaprodname;
 $acustomer_firstname = $acustomer['customers_firstname'];
 $acustomer_lastname = $acustomer['customers_lastname'];
 $acustomer_email = $acustomer['customers_email_address'];
 $acustomer_name = $customer_firstname .' '.$customer_lastname;
 $auction_url = tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$products_id);
 $email_text = str_replace('[customer_firstname]',$acustomer_firstname,str_replace('[customer_lastname]',$acustomer_lastname,str_replace('[customer_email]',$acustomer_email,str_replace('[auction_name]',$auction_name,str_replace('[auction_url]',$auction_url,str_replace('[bid_price]',$bid_price,AUCTION_HIGHER_BID_NOTIFY_EMAIL))))));
 tep_mail($acustomer_firstname.' '.$acustomer_lastname, $acustomer_email, 'Auctions at Spikeys :'.$products_model, 'Dear '.$acustomer_firstname.' '.$acustomer_lastname.',<br><br>
You have been outbid for '.$products_model.'!<br><br><strong>
Please see below for auction details:</strong><br>
You have bid on :'.$products_name.'<br>
<br>The current highest bid is :$'.$bid_price.'<br>
The auction number your are bidding on is :# '.$auction_id.'<br>
To place another bid, please log into your account <a href="http://spikeys.co.uk/shop/account.php">http://spikeys.co.uk/shop/account.php.</a> You will need to navigate to the auction product : <a href="http://spikeys.co.uk/shop/account.php">'.$products_name.'</a><br> - in order to make another bid.<br>
Please contact us at <a href="mailto:[email protected]">[email protected]</a> if you have any further queries.<br>
<br>Regards,<br>
<br>The Spikeys Team.<br>
spikeys.co.uk Administration.<br>
<p>**Security notice : spikeys.co.uk will never ask you to reveal your login password. Protect yourself online and keep all login and personal details private and confidential.<br>
A copy of our privacy notice is available online at <a href="http://spikeys.co.uk/shop/privacy.php">http://spikeys.co.uk/shop/privacy.php.</a><br />
 <br>
<br>', 'www.spikeys.co.uk', '[email protected]');
}
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$products_id));
	    } else {
  //		  $navigation->set_snapshot();
		    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
	    }
    }
//DANS AUCTION SCRIPT
$curprodid = (int)$HTTP_GET_VARS['products_id'].'<br>';
//END DANS AUCTION SCRIPT
//echo $curprodid;
  if ($_GET['stat'] = 1) {
  //   eof added by [email protected] for auction product contribution
 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where 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);
} else {
 $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);
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<?php
//DANS AUCTION SCRIPT -REFRESH
$cquery="select products_id from ".TABLE_AUCTIONS_PRODUCTS." where products_id =".(int)$HTTP_GET_VARS['products_id'];
$cresult=mysql_query($cquery);
$cnum=mysql_numrows($cresult);
$z=0;
while ($z < $cnum) {
$casprodid=mysql_result($cresult,$z,"products_id");
//echo $casprodid;
$z++;
}
if ($casprodid==(int)$HTTP_GET_VARS['products_id']) {
header('Refresh: 90');} else {
echo '';}
//END DANS AUCTION SCRIPT
?>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
?>
  <tr>
    <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		    <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
	    </table></td>
	  </tr>
    </table></td>
  </tr>
<?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 . "'");
   //   bof added by [email protected] for auction product contribution
  $auction_price = tep_get_products_auction_price($product_info['products_id']);
  $auction_product = false;
  if (!$auction_price) {
   //   eof added by [email protected] for auction product contribution
	    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
		  $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <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']));
	    }
   //   bof added by [email protected] for auction product contribution
	  //BOF DANS Auction Contrib
  } else {
    $auction_product  =  true;
    $sql_auction  =  'select auctions_id from '.TABLE_AUCTIONS_PRODUCTS." where products_id='".$product_info['products_id']."'";
    $auction_info  =  tep_db_fetch_array(tep_db_query($sql_auction));
    $auction_id  = $auction_info['auctions_id'];
    $databid = mysql_query("select MAX(bid_price) as bid_price from ".TABLE_AUCTIONS_BIDS.' ab,'.TABLE_AUCTIONS_PRODUCTS.' ap where ab.auctions_id=ap.auctions_id and ab.auctions_id='.$auction_id.'')
or die(mysql_error());
while($highbid = mysql_fetch_array( $databid ))
if ($highbid['bid_price'] > 0){
$products_price  = "Highest Bid:$".$highbid['bid_price'];
   //EOF DANS Auction Contrib
  }
  else {$products_price = "$".number_format($auction_price,2);}
  }
   //   eof added by [email protected] for auction product contribution
   if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'];
   } else {
  $products_name = $product_info['products_name'];
   }
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
	    <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <!-- bof added by [email protected] for auction product contribution -->
  <?php
   if ($auction_product) {	 ?>
    <tr><td class="stockWarning"><?php
    if ( !tep_session_is_registered('customer_id') ) {
    echo TEXT_AUCTION_PRODUCT_TITLE; }?></td></tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
  <?php } // end if
  ?>
  <!-- eof added by [email protected] for auction product contribution -->
  <tr>
    <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
	    <tr>
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript: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*2, SMALL_IMAGE_HEIGHT*2, '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*2, SMALL_IMAGE_HEIGHT*2, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
	    </tr>
	  </table>
<?php
   }
?>
	  <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?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) {
?>
	  <table border="0" cellspacing="0" cellpadding="2">
	    <tr>
		  <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
	    </tr>
<?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();
    // BOF Linkmatics attributes sets plus
	  $products_options_query = tep_db_query("
	  SELECT pov.products_options_values_id, pov.products_options_values_name,
		   pa.options_values_price, pa.price_prefix , pase.sort_order
		  FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " .
			    TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " .
			    TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " .
			    TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .
			    TABLE_PRODUCTS_OPTIONS_VALUES . " pov
			    WHERE	  pa.products_id = '" . (int)$_GET['products_id'] . "'
		    AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
		    AND pas2pa.products_id = pa.products_id
		    AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id
		    AND pas.products_options_id = pa.options_id
		    AND pase.products_attributes_sets_id = pas.products_attributes_sets_id
		    AND pase.options_values_id = pa.options_values_id
		    AND pov.products_options_values_id = pa.options_values_id
		    AND pov.language_id = '" . $languages_id . "'
		    ORDER BY pase.sort_order, pa.options_values_id");
	   // >>>>> BOF Linkmatics attributes sets plus patch v1.01
	   if (tep_db_num_rows($products_options_query)== 0 ) {
		 $products_options_query = tep_db_query("
		   SELECT pov.products_options_values_id, pov.products_options_values_name,
				  pa.options_values_price, pa.price_prefix , pa.options_values_id
			 FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " .
					  TABLE_PRODUCTS_OPTIONS_VALUES . " pov
			 WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'
			   AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
			   AND pov.products_options_values_id = pa.options_values_id
			   AND pov.language_id = '" . $languages_id . "'
			 ORDER BY pa.options_values_id");
	   }
	  // <<<<< EOF Linkmatics attributes sets plus patch v1.01
	  // EOF Linkmatics attributes sets plus
    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 (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;
    }
?>
	    <tr>
		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
	    </tr>
<?php
  }
?>
	  </table>
<?php
   }
?>
    </td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>
  <tr>
    <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   }
   if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
    <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   }
   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
  <tr>
    <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
  </tr>
<?php
   } else {
?>
  <tr>
  </tr>
<?php
   }
?>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <!-- //bof moved from bellow by [email protected] for auction product contribution   -->
  <?php if ($auction_product) { ?>
  </form>
  <?php
    }
  ?>
  <!-- eof moved from bellow by [email protected] for auction product contribution -->
    <?php
    //bof added by [email protected] for auction product contribution
						    //rewriten by MarcusDesign
	  if ($auction_product) {
	    include_once(DIR_WS_MODULES.'/auction_bids.php');
								    } else {
						    ?>
								  <tr>
								    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
									  <tr class="infoBoxContents">
									    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
										  <tr>
										    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
										    <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
										    <td class="main" align="right"><?php
				    //BOF dans auction contrib
				    if  ($auction_product) {
		  echo tep_draw_hidden_field('products_id', $product_info['products_id']);
	    } else {
		    echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
	    }
    //EOF DANS AUCTION CONTRIB
    ?></td>
										    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
										  </tr>
									    </table></td>
									  </tr>
								    </table></td>
								  </tr>
								  <tr>
								    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								  </tr>
						    <?php
	  }
						    //eof added by [email protected] for auction product contribution
    ?>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td>
<?php
//added for cross -sell
  if ( (USE_CACHE == 'true') && !SID) {
   echo tep_cache_also_purchased(3600);
 include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
  } else {
 include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
 }
?>
<!-- social bookmarks start //-->
<?php
include(DIR_WS_MODULES . 'social_bookmarks' . '.php');
?>
<!-- social bookmarks finish //-->
    </td>
  </tr>
   </table>
    <!-- //bof moved to above by [email protected] for auction product contribution -->
    <?php if (!$auction_product) { ?>
    </form>
    <?php
	  }
    ?>
    <!--  //eof moved to above by [email protected] for auction product contribution -->
    </td>
  <!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Change this

<?php
   }
?>
			  <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?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) {
?>

to this

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

 

and this

			   <tr>
					  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
					  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
			    </tr>
<?php
	  }
?>
			  </table>
<?php
   }
?>
	    </td>

to this

			   <tr>
					  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
					  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
			    </tr>
<?php
	  }
?>
			  </table>
<?php
   }
?>
                 <p><?php echo stripslashes($product_info['products_description']); ?></p>
	    </td>

 

I posted larger sections of code so you can figure out what piece I mean. What you do in real is to move <p><?php echo stripslashes($product_info['products_description']); ?></p> below the product attributes table

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...