Code: Select all
<?php echo $header; ?><?php echo $column_left; ?>
<div class="nav_middle">
<div class="mid-box">
<div class="nav_title-1"><icon1><?php echo $heading_title; ?></icon1></div>
<div class="msg-box-2">
<?php if ($tags) { ?>
<div class="tags"><b><?php echo $text_tags; ?></b>
<?php foreach ($tags as $tag) { ?>
<a href="<?php echo $tag['href']; ?>" class="product_tag_link"><?php echo $tag['tag']; ?></a>,
<?php } ?>
</div>
<?php } ?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="middle">
<td width="287" class="product_info_L">
<a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" rel="gallery"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" border="0" /></a>
<center><?php echo $text_enlarge; ?></center>
</td>
<td class="product_info_R">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<?php if ($display_price) { ?>
<td class="product_info_b"><b><?php echo $text_price; ?></b></td>
<td class="product_info_b-1"><?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span style="text-decoration:line-through;"><?php echo $price; ?></span> <span style="color:#F00;"><?php echo $special; ?></span>
<?php } ?>
</td>
</tr>
<?php } ?>
<tr>
<td class="product_info_b"><?php echo $text_availability; ?></td>
<td class="product_info_b-1"><?php echo $stock; ?></td>
</tr>
<tr>
<td class="product_info_b"><?php echo $text_model; ?></td>
<td class="product_info_b-1"><?php echo $model; ?></td>
</tr>
<?php if ($manufacturer) { ?>
<tr>
<td class="product_info_b"><?php echo $text_manufacturer; ?></td>
<td class="product_info_b-1"><a href="<?php echo str_replace('&', '&', $manufacturers); ?>"><?php echo $manufacturer; ?></a></td>
</tr>
<?php } ?>
<?php if ($review_status) { ?>
<tr>
<td class="product_info_b"><?php echo $text_average; ?></td>
<td class="product_info_b-1">
<?php if ($average) { ?>
<img src="catalog/view/theme/default/image/stars_<?php echo $average . '.png'; ?>" alt="<?php echo $text_stars; ?>" style="margin-top: 2px;" />
<?php } else { ?>
<?php echo $text_no_rating; ?>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($display_price) { ?>
<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="product">
<?php if ($options) { ?>
<?php echo $text_options; ?>
<?php foreach ($options as $option) { ?>
<?php echo $option['name']; ?>:<br />
<select name="option[<?php echo $option['option_id']; ?>]">
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
<?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
<?php } ?>
</option>
<?php } ?>
</select>
<?php } ?>
<?php } ?>
<?php if ($display_price) { ?>
<?php if ($discounts) { ?>
<b><?php echo $text_discount; ?></b><br />
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-top: 2px; margin-bottom: 15px;">
<table style="width: 100%;">
<tr>
<td style="text-align: right;"><b><?php echo $text_order_quantity; ?></b></td>
<td style="text-align: right;"><b><?php echo $text_price_per_item; ?></b></td>
</tr>
<?php foreach ($discounts as $discount) { ?>
<tr>
<td style="text-align: right;"><?php echo $discount['quantity']; ?></td>
<td style="text-align: right;"><?php echo $discount['price']; ?></td>
</tr>
<?php } ?>
</table>
</div>
<?php } ?>
<?php } ?>
<tr>
<td colspan="2" class="product_info_b-2">
<?php echo $text_qty; ?>
<input type="text" class="input_01" name="quantity" size="3" value="<?php echo $minimum; ?>" />
<a onclick="$('#product').submit();" id="add_to_cart" class="button_cart"><?php echo $button_add_to_cart; ?></a>
<?php if ($minimum > 1) { ?><br/><small><?php echo $text_minimum; ?></small><?php } ?>
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
<input type="hidden" name="redirect" value="<?php echo str_replace('&', '&', $redirect); ?>" />
</td>
</tr>
</form>
<?php } ?>
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="mid-box">
<div class="nav_title-1">
<!-- Tabs -->
<div class="tabs">
<a tab="#tab_description" class="title-s-click"><?php echo $tab_description; ?></a>
<a tab="#tab_image" class="title-s-click"><?php echo $tab_image; ?> (<?php echo count($images); ?>)</a>
<?php if ($review_status) { ?><a tab="#tab_review" class="title-s-click"><?php echo $tab_review; ?></a><?php } ?>
<a tab="#tab_related" class="title-s-click"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
</div></div>
<div class="msg-box-2" id="tab_description">
<?php echo $description; ?>
</div>
<?php if ($review_status) { ?>
<div class="msg-box-2" id="tab_review" style="display:none;">
<div id="review"></div>
<div id="review_title"><?php echo $text_write; ?></div>
<?php echo $entry_name; ?>
<input type="text" name="name" value="" />
<?php echo $entry_review; ?>
<textarea name="text" style="width: 98%;" rows="8"></textarea>
<?php echo $text_note; ?>
<?php echo $entry_rating; ?> <?php echo $entry_bad; ?>
<input type="radio" name="rating" value="1" style="margin: 0;" />
<input type="radio" name="rating" value="2" style="margin: 0;" />
<input type="radio" name="rating" value="3" style="margin: 0;" />
<input type="radio" name="rating" value="4" style="margin: 0;" />
<input type="radio" name="rating" value="5" style="margin: 0;" />
<?php echo $entry_good; ?>
<?php echo $entry_captcha; ?>
<input type="text" name="captcha" value="" autocomplete="off" />
<img src="index.php?route=product/product/captcha" id="captcha" />
<table>
<tr>
<td align="right"><a onclick="review();" class="button"><?php echo $button_continue; ?></a></td>
</tr>
</table>
</div>
<?php } ?>
<div class="msg-box-2" id="tab_image" style="display:none;">
<?php if ($images) { ?>
<div style="display:inline-block;">
<?php foreach ($images as $image) { ?>
<div style="display:inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="thickbox" rel="gallery"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" border="0" /></a><br />
<span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></div>
<?php } ?>
</div>
<?php } else { ?>
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $text_no_images; ?></div>
<?php } ?>
</div>
<div class="msg-box-2" id="tab_related" style="display:none;">
<?php if ($products) { ?>
<table class="list">
<?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
<tr>
<?php for ($j = $i; $j < ($i + 4); $j++) { ?>
<td width="25%"><?php if (isset($products[$j])) { ?>
<a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" border="0"/></a><br />
<a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><?php echo $products[$j]['name']; ?></a><br />
<span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br />
<?php if ($display_price) { ?>
<?php if (!$products[$j]['special']) { ?>
<span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span>
<?php } else { ?>
<span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span>
<?php } ?>
<a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" > </a>
<?php } ?>
<br />
<?php if ($products[$j]['rating']) { ?>
<img src="catalog/view/theme/default/image/stars_<?php echo $products[$j]['rating'] . '.png'; ?>" alt="<?php echo $products[$j]['stars']; ?>" />
<?php } ?>
<?php } ?></td>
<?php } ?>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $text_no_related; ?></div>
<?php } ?>
</div>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
$('#review').slideUp('slow');
$('#review').load(this.href);
$('#review').slideDown('slow');
return false;
});
$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');
function review() {
$.ajax({
type: 'POST',
url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
dataType: 'json',
data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
beforeSend: function() {
$('.success, .warning').remove();
$('#review_button').attr('disabled', 'disabled');
$('#review_title').after('<div class="wait"><img src="catalog/view/theme/default/image/loading_1.gif" alt="" /> <?php echo $text_wait; ?></div>');
},
complete: function() {
$('#review_button').attr('disabled', '');
$('.wait').remove();
},
success: function(data) {
if (data.error) {
$('#review_title').after('<div class="warning">' + data.error + '</div>');
}
if (data.success) {
$('#review_title').after('<div class="success">' + data.success + '</div>');
$('input[name=\'name\']').val('');
$('textarea[name=\'text\']').val('');
$('input[name=\'rating\']:checked').attr('checked', '');
$('input[name=\'captcha\']').val('');
}
}
});
}
//--></script>
<script type="text/javascript"><!--
$.tabs('.tabs a');
//--></script>
</div>
</div>
<?php echo $column_right; ?>
<?php echo $footer; ?>