1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
|
<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>
<div id="productInfo">
<?php if ($messageStack->size('header') > 0) echo '<div class="messageStack">'.$messageStack->output('header').'</div>' ;?>
<?php if ($messageStack->size('review') > 0) echo '<div class="messageStack">'.$messageStack->output('review').'</div>' ;?>
<?php
if ($product_check['total'] < 1) {
?>
<div class="infoText"><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></div>
<div class="navBt">
<?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . IMAGE_BUTTON_CONTINUE . '</a>'; ?>
</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, p.products_image1, p.products_image2, p.products_image3, p.products_image4, 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)$_GET['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)$_GET['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']));
}
?>
<h1 class="<?php echo $language ;?>"><?php echo $product_info['products_name']; ?></h1>
<?php
if (tep_not_null($product_info['products_image'])) {
?>
<div id="productImage" align="center">
<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '</a></p><br><br>'; ?>
<p class="productModel"><?php echo $product_info['products_model']; ?></p>
<table border="0">
<tr valign="middle">
<td align="center"> <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>'; ?><?php
?><p><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE) . '\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></p>
</td>
<td align="center"> <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image2'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></p><br><br>'; ?>
<p><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE) . '\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></p>
</td>
<td align="center"> <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image3'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></p><br><br>'; ?>
<p><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE) . '\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></p>
</td>
<td align="center"> <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image4'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></p><br><br>'; ?>
<p><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE) . '\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></p>
</td>
</tr>
</div>
<?php
}
// temp convertion des tags html en xhtml
$badguy = array("<br>","<s>","<u>","</s>","</u>","&");
$goodguy = array("<br />","<del>","<span class=\"underline\">","</del>","</span>","&");
?>
<div id="productInfos">
<?php $sql = "SELECT * FROM " . TABLE_PRODUCTS ." WHERE products_id='".$_GET['products_id']."'";
$res = mysql_query($sql) or die ('Erreur SQL : impossible d\'effectuer la requête : <br />'.$sql);
$total = mysql_num_rows($res);
if ($total) {
while($row = mysql_fetch_array($res)) {
?>
<table align="left" border="1">
<tr>
<td>
<font face="Verdana">
<?php echo Modèle; ?>
</td>
<td>
<?php echo $row['products_model']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo Coloris; ?>
</td>
<td>
<?php echo $row['products_coloris']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo Puissance; ?>
</td>
<td>
<?php echo $row['products_puissance']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo Rendement; ?>
</td>
<td>
<?php echo $row['products_rendement']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo Dimension; ?>
</td>
<td>
<?php echo $row['products_dimension']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo Prix; ?>
</td>
<td>
<?php echo $row['products_price']; ?>
</font>
</td>
</tr>
<tr>
<td>
<font face="Verdana">
<?php echo "Taille bûche"; ?>
</td>
<td>
<?php echo $row['products_taille_buche']; ?>
</font>
</td>
</tr>
<?php }
}
?>
</div>
<div id="productDescription">
<tr>
<td>
<font face="Verdana">
<?php echo "Commentaire" ?>
</font>
</td>
<td>
<?php
echo stripslashes(str_replace($badguy,$goodguy,$product_info['products_description'])); ?>
</td>
</tr>
</font>
</table>
</div>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<?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)$_GET['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 id="productOptions">
<h4><?php echo TEXT_PRODUCT_OPTIONS ;?></h4>
<?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)$_GET['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)$_GET['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 (isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<p>
<label for="product_option"><?php echo $products_options_name['products_options_name'] . ':'; ?></label>
<?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', 'product_option',$products_options_array, $selected_attribute); ?>
</p>
<?php
}
?>
</div>
<?php
}
?>
<?php /* <p class="formBt">
<?php
echo tep_draw_hidden_field('products_id', $product_info['products_id']);
echo TEXT_PREFIX_QTY.tep_draw_input_field('products_quantity', 'products_quantity', '1', 'size="2"');
?>
<input class="submitBt" type="submit" value="<?php echo IMAGE_BUTTON_IN_CART; ?>" />
</p>
*/ ?>
</form>
<?php
if (tep_not_null($product_info['products_url'])) {
?>
<p id="productUrl"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></p>
<?php
}
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<p id="productDateAvalaible"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p>
<?php
} else {
?>
<?php /* <p id="productDateAdded"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></p>
*/ ?>
<?php
}
?>
<div id="productInfoBack" class="navBt">
<?php echo '<a class="navBt" href="javascript: history.go(-1)">' . IMAGE_BUTTON_BACK . '</a>'; ?>
</div>
<?php
include(DIR_WS_CLASSES . 'xml.php');
$xml_file = DIR_WS_TEMPLATES . $template .'/desc.xml' ;
$xml_options = new xml2object();
$xml_content = join(file($xml_file), "");
$theme_options = $xml_options->parse($xml_content);
if ( $theme_options->template->infos1 == 'tab1' ) {
require(DIR_WS_MODULES . 'product_info_tab.php') ;
} else {
?>
<?php /*
<div id="reviews"><?php require(DIR_WS_MODULES . 'product_reviews.php') ; ?></div>
*/ ?>
<?php
/* if (($osCSS_Cache->read('alsoPurchased-' . $language .'-pID-'.$product_info['products_id'], 3600) === false) ) {
$osCSS_Cache->startBuffer();
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
$osCSS_Cache->stopBuffer();
}
echo $osCSS_Cache->getCache();
*/
}
}
?>
<!-- extra divs to add extra pictures. -->
<div class="extraDiv1"><span></span></div>
<div class="extraDiv2"><span></span></div>
<div class="extraDiv3"><span></span></div>
<div class="extraDiv4"><span></span></div>
<div class="extraDiv5"><span></span></div>
</div> |