<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/stylesheet.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('img, #header .div3 a, #content .left, #content .right, .box .top');
</script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/json2.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/thickbox/thickbox.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
<script type="text/javascript" src="catalog/view/javascript/ajprices.js"></script>
<script type="text/javascript" src="catalog/view/javascript/user.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript"><!--
function bookmark(url, title) {
if (window.sidebar) { // firefox
window.sidebar.addPanel(title, url, "");
} else if(window.opera && window.print) { // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} else if(document.all) {// ie
window.external.AddFavorite(url, title);
}
}
//--></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<input type="hidden" id="affinfo" value="<?php echo $this->config->get('config_prtype');?>" />
<div id="container">
<div id="header">
<div class="div1">
<div class="div2">
<?php if ($logo) { ?>
<a href="<?php echo str_replace('&', '&', $home); ?>"><img src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a>
<?php } ?>
</div>
<div class="div3"><a href="<?php echo str_replace('&', '&', $special); ?>" style="background-image: url('catalog/view/theme/default/image/special.png');"><?php echo $text_special; ?></a><a onclick="bookmark(document.location, '<?php echo addslashes($title); ?>');" style="background-image: url('catalog/view/theme/default/image/bookmark.png');"><?php echo $text_bookmark; ?></a><a href="<?php echo str_replace('&', '&', $contact); ?>" style="background-image: url('catalog/view/theme/default/image/contact.png');"><?php echo $text_contact; ?></a><a href="<?php echo str_replace('&', '&', $sitemap); ?>" style="background-image: url('catalog/view/theme/default/image/sitemap.png');"><?php echo $text_sitemap; ?></a></div>
<div class="div4"><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
<?php if (!$logged) { ?>
<a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
<?php } else { ?>
<a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
<?php } ?>
<a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></div>
<div class="div5">
<div class="left"></div>
<div class="right"></div>
<div class="center">
<div id="search">
<div class="div8"><?php echo $entry_search; ?> </div>
<div class="div9">
<?php if ($keyword) { ?>
<input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" />
<?php } else { ?>
<input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
<?php } ?>
<label for="filter_price" class="div8" style="float:none;">Цены:</label>
<select id="filter_price">
<option value="">Все</option>
<option value="0:1000">до 1000 руб.</option>
<option value="1000:3000">от 1000 до 3000 руб.</option>
<option value="3000:7000">от 3000 до 7000 руб.</option>
<option value="7000:10000">от 7000 до 10000 руб.</option>
<option value="10000:0">свыше 10000 руб.</option>
</select>
<script>
$("#filter_price [value='<?php echo $filter_price; ?>']").attr("selected", "selected");
</script>
<select id="filter_category_id">
<option value="0"><?php echo $text_category; ?></option>
<?php foreach ($categories as $category) { ?>
<?php if ($category['category_id'] == $category_id) { ?>
<option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
<div class="div10"> <a onclick="moduleSearch();" class="button"><span><?php echo $button_go; ?></span></a> <a href="<?php echo str_replace('&', '&', $advanced); ?>"><?php echo $text_advanced; ?></a></div>
</div>
</div>
</div>
</div>
<div class="div6">
<div class="left"></div>
<div class="right"></div>
<div class="center">
<?php if (isset($common_error)) { ?>
<div class="warning"><?php echo $common_error; ?></div>
<?php } ?>
<div id="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo str_replace('&', '&', $breadcrumb['href']); ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>
<div class="div7" style="display:none;">
<?php if ($currencies) { ?>
<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="currency_form">
<div class="switcher">
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['code'] == $currency_code) { ?>
<div class="selected"><a><?php echo $currency['title']; ?></a></div>
<?php } ?>
<?php } ?>
<div class="option">
<?php foreach ($currencies as $currency) { ?>
<a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
<?php } ?>
</div>
</div>
<div style="display: inline;">
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
<?php } ?>
<?php if ($languages) { ?>
<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="language_form">
<div class="switcher">
<?php foreach ($languages as $language) { ?>
<?php if ($language['code'] == $language_code) { ?>
<div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a></div>
<?php } ?>
<?php } ?>
<div class="option">
<?php foreach ($languages as $language) { ?>
<a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
<?php } ?>
</div>
</div>
<div>
<input type="hidden" name="language_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
<?php } ?>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
function getURLVar(urlVarName) {
var urlHalves = String(document.location).toLowerCase().split('?');
var urlVarValue = '';
if (urlHalves[1]) {
var urlVars = urlHalves[1].split('&');
for (var i = 0; i <= (urlVars.length); i++) {
if (urlVars[i]) {
var urlVarPair = urlVars[i].split('=');
if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
urlVarValue = urlVarPair[1];
}
}
}
}
return urlVarValue;
}
$(document).ready(function() {
route = getURLVar('route');
if (!route) {
$('#tab_home').addClass('selected');
} else {
part = route.split('/');
if (route == 'common/home') {
$('#tab_home').addClass('selected');
} else if (route == 'account/login') {
$('#tab_login').addClass('selected');
} else if (part[0] == 'account') {
$('#tab_account').addClass('selected');
} else if (route == 'checkout/cart') {
$('#tab_cart').addClass('selected');
} else if (part[0] == 'checkout') {
$('#tab_checkout').addClass('selected');
} else {
$('#tab_home').addClass('selected');
}
}
});
//--></script>
<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
if (e.keyCode == 13) {
moduleSearch();
}
});
function moduleSearch() {
pathArray = location.pathname.split( '/' );
//url = location.protocol + "//" + location.host + "/" + pathArray[1] + '/';
url = location.protocol + "//" + location.host + "/";
if (pathArray[1]!="")url+=pathArray[1] + '/';
url += 'index.php?route=product/search';
var filter_keyword = $('#filter_keyword').attr('value')
if (filter_keyword) {
url += '&keyword=' + encodeURIComponent(filter_keyword);
}
var filter_category_id = $('#filter_category_id').attr('value');
if (filter_category_id) {
url += '&category_id=' + filter_category_id;
}
var filter_price = $('#filter_price').attr('value');
if (filter_price) {
url += '&filter_price=' + filter_price;
}
url +='&model=1';
location = url;
}
//--></script>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
$(this).find('.option').slideUp('fast');
});
//--></script>
это header
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
<div class="top">
<div class="left"></div>
<div class="right"></div>
<div class="center">
<h1><?php echo $heading_title; ?></h1>
</div>
</div>
<div class="middle">
<div class="product" style="width: 100%; margin-bottom: 30px;">
<table style="width: 100%; border-collapse: collapse;">
<tr>
<td style="text-align: center; width: 250px; vertical-align: top;"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="thickbox" rel="gallery"><img src="<?php echo $thumb; ?>" height="<?php echo $this->config->get('config_image_thumb_height'); ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" style="margin-bottom: 3px;" /></a><br />
<span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></td>
<td style="padding-left: 15px; width: 296px; vertical-align: top;"><table width="100%">
<?php if ($display_price) { ?>
<tr>
<td><b><?php echo $text_price; ?></b></td>
<td>
<span class="ids" id="<?php echo $product_id; ?>">
<span id="formated_special" class="product_pricesk" style="text-decoration: line-through; color: #F00;" price="<?php echo $special; ?>"></span>
<span id="formated_price" class="product_price" style="color: #900; font-weight: bold;" price="<?php echo $price_value; ?>"></span>
</span>
</td>
</tr>
<?php } ?>
<tr>
<td><b><?php echo $text_availability; ?></b></td>
<td><?php echo $stock; ?></td>
</tr>
<tr>
<td><b><?php echo $text_model; ?></b></td>
<td><?php echo $model; ?></td>
</tr>
<?php if ($manufacturer) { ?>
<tr>
<td><b><?php echo $text_manufacturer; ?></b></td>
<td><a href="<?php echo str_replace('&', '&', $manufacturers); ?>"><?php echo $manufacturer; ?></a></td>
</tr>
<?php } ?>
<?php if ($review_status) { ?>
<tr>
<td><b><?php echo $text_average; ?></b></td>
<td><?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 } ?>
</table>
<br />
<?php if ($display_price) { ?>
<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="product">
<?php if ($options) { ?>
<b><?php echo $text_options; ?></b><br />
<div style="background: #f5ebcf; border: 1px solid #FFCC33; padding: 10px; margin-top: 2px; margin-bottom: 15px;">
<table style="width: 100%;">
<?php foreach ($options as $option) { ?>
<tr>
<td><?php echo $option['name']; ?>:<br />
<?php //100618 ALNAUA Add javascript price recalculate Begin ?>
<?php /*<select name="option[<?php echo $option['option_id']; ?>]"> */?>
<div id="<?php echo $product_id; ?>" class="variants">
<?php if (count($option['option_value'])==1) { ?>
<input type=edit readonly="readonly" name="option[<?php echo $option['option_id']; ?>]" style="max-width:250px;" value="<?php echo $option['option_value'][0]['name']; ?>">
<?php } else {?>
<select name="option[<?php echo $option['option_id']; ?>]" onchange="recalculateprice();" style="max-width:250px;">
</select>
<?php } ?>
</div>
</td>
</tr>
<?php } ?>
</table>
</div>
<?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 } ?>
<div class="content">
<?php echo $text_qty; ?>
<input type="text" name="quantity" size="3" value="<?php echo $minimum; ?>" />
<a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>
<?php if ($minimum > 1) { ?><br/><small><?php echo $text_minimum; ?></small><?php } ?>
</div>
<div>
<input type="hidden" id="price_value" name="price_value" value="" />
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
<input type="hidden" name="redirect" value="<?php echo str_replace('&', '&', $redirect); ?>" />
</div>
</form>
<?php } ?></td>
</tr>
</table>
</div>
<div class="tabs">
<a tab="#tab_description"><?php echo $tab_description; ?></a>
<a tab="#tab_image"><?php echo $tab_image; ?> (<?php echo count($images); ?>)</a>
<?php if ($review_status) { ?><a tab="#tab_review"><?php echo $tab_review; ?></a><?php } ?>
<a tab="#tab_related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
</div>
<div id="tab_description" class="tab_page"><?php echo $description; ?></div>
<?php if ($review_status) { ?>
<div id="tab_review" class="tab_page">
<div id="review"></div>
<div class="heading" id="review_title"><?php echo $text_write; ?></div>
<div class="content"><b><?php echo $entry_name; ?></b><br />
<input type="text" name="name" value="" />
<br />
<br />
<b><?php echo $entry_review; ?></b>
<textarea name="text" style="width: 98%;" rows="8"></textarea>
<span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
<br />
<b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>
<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;" />
<span><?php echo $entry_good; ?></span><br />
<br />
<b><?php echo $entry_captcha; ?></b><br />
<input type="text" name="captcha" value="" autocomplete="off" />
<br />
<img src="index.php?route=product/product/captcha" id="captcha" /></div>
<div class="buttons">
<table>
<tr>
<td align="right"><a onclick="review();" class="button"><span><?php echo $button_continue; ?></span></a></td>
</tr>
</table>
</div>
</div>
<?php } ?>
<div id="tab_image" class="tab_page">
<?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; ?>" style="border: 1px solid #DDDDDD; margin-bottom: 3px;" /></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 id="tab_related" class="tab_page">
<?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 id="<?php echo $products[$j]['product_id']; ?>" 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']; ?>" /></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) { ?>
<span class="ids" id="<?php echo $products[$j]['product_id']; ?>">
<span style="color: #900; font-weight: bold;" class="product_price"></span>
<span style="color: #F00; text-decoration: line-through;" class="product_pricesk"></span>
</span>
<?php } ?>
<a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" > </a>
<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>
</div>
<div class="bottom">
<div class="left"></div>
<div class="right"></div>
<div class="center"></div>
</div>
<?php if ($tags) { ?>
<div class="tags"><?php echo $text_tags; ?>
<?php foreach ($tags as $tag) { ?>
<a href="<?php echo $tag['href']; ?>"><?php echo $tag['tag']; ?></a>,
<?php } ?>
</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>
<?php // 100618 ALNAUA Add javascript price recalculate Begin ?>
<script type="text/javascript"><!--
function recalculateprice(){
var price=Number($(".variants select option:selected").attr('price'));
$('#price_value').val(price);
var pricesk=Number($(".variants select option:selected").attr('pricesk'));
$.ajax({
type: 'post',
url: 'index.php?route=product/product/formatprice',
dataType: 'html',
data: {price: price},
success: function (html) {
$('#formated_price').html(html);
}
});
if(pricesk>0)
$.ajax({
type: 'post',
url: 'index.php?route=product/product/formatprice',
dataType: 'html',
data: {price: pricesk},
success: function (html) {
$('#formated_special').html(html);
}
});
}
//--></script>
<?php // 100618 ALNAUA Add javascript price recalculate End ?>
<?php echo $footer; ?>
это product