Files
AtomicOld/design/atomic/html/product.tpl
2026-02-15 18:29:53 +03:00

653 lines
27 KiB
Smarty
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{* Страница товара *}
<!-- Хлебные крошки /-->
{$bid = 0}
{$ccat = $category->path|count}
<ul class="breadcrumb">
<li><a href="/">Главная</a></li>
{foreach from=$category->path item=cat} {if $bid == 0}{$bid = $cat->id}{/if}
<li><a href="/catalog/{$cat->url}/">{$cat->name|escape}</a></li>
{/foreach}
{if $brand && $ccat < 2}
<li><a href="/catalog/{$cat->url}/{$brand->url}/">{$brand->name|escape}</a></li>
{/if}
<li>{$product->name|escape}</li>
</ul>
<div class="row">
{if !$detect->isMobile()}
<div class="col-sm-3 col-xs-12">
<div class="panel panel-danger collapse-panel">
<div class="panel-heading">
<div class="panel-title"><a href="/catalog/" class="m_link">Интернет магазин</a></div>
</div>
<div class="panel-body">
<div class="v-menu">
{* Рекурсивная функция вывода дерева категорий *}
{function name=categories_tree_index level=0}
{if $categories && $level < 2}
<ul>
{foreach $categories as $c}
{* Показываем только видимые категории *}
{if $c->visible && $c->menu && $c->parent_id != 488}
<li {if $category->id == $c->id} class="active"{/if}>
<a href="/catalog/{$c->url}/" data-category="{$c->id}">{if $c->menu_name}{$c->menu_name}{else}{$c->name}{/if}</a>
{if in_array($category->id, $c->children)}
{categories_tree_index categories=$c->subcategories level=$level+1}
{/if}
</li>
{/if}
{/foreach}
<li><a href="/brands/">Товары по брендам</a></li>
</ul>
{/if}
{/function}
{categories_tree_index categories=$categories}
</div>
</div>
</div>
</div>
{/if}
<div class="col-sm-9 col-xs-12 product-box">
<!-- Хлебные крошки #End /-->
{*<h1 data-product="{$product->id}">{$product->product_h1|escape}</h1>*}
<h1>{$product->name|escape}</h1>
<div class="product-details">
<div class="product" itemscope itemtype="http://schema.org/Product">
<span style="display:none" itemprop="name">{$product->product_h1|escape}</span>
<div class="col-sm-4">
<!-- Большое фото -->
{if $product->image}
<div class="product-image">
<a href="{$product->image->filename|resize:1000:1000}" class="zoom w" {*rel="product-gallery"*} data-rel="group">
<img itemprop="image" class="img-thumbnail" src="{$product->image->filename|resizeProduct:252}" title="{$product->name|escape}" alt="{$product->name|escape}" /></a>
</div>
{else}
<div class="product-image"><img src="/images/zag2.jpg" class="img-thumbnail" alt=""></div>
{/if}
<!-- Большое фото (The End)-->
<!-- Дополнительные фото продукта -->
{if $product->images|count>1}
<div class="product-images">
{* cut удаляет первую фотографию, если нужно начать 2-й - пишем cut:2 и тд *}
{foreach $product->images|cut as $i=>$image}
<a href="{$image->filename|resize:1000:1000}" class="zoom w" {*rel="product-gallery"*} data-rel="group"><img class="img-thumbnail" src="{$image->filename|resize:100:100}" title="{$product->name|escape}" alt="{$product->name|escape}" /></a>
{/foreach}
</div>
{/if}
<!-- Дополнительные фото продукта (The End)-->
</div>
{literal} <script>$.yEcommerce = [];</script> {/literal}
<div class="col-sm-8">
{if $product->variants|count > 0}
<!-- Выбор варианта товара -->
<div style="display: inline" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span class="mdh" itemprop="priceCurrency" data-content="RUB">RUB</span>
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
{literal}<script>$.yEcommerce.push( {/literal}{$v|@json_encode nofilter}{literal} );</script>{/literal}
<tr class="variant">
<td>
<input id="related_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" data-stock="{$v->stock}" {if $v@first}checked{/if} {if $product->variants|count<2} style="display:none;"{/if}/>
</td>
<td style="padding-left: 10px">
{if $v->name}<label class="variant_name" for="related_{$v->id}">{$v->name}</label>{/if}
</td>
<td style="padding-left: 10px">
{if $v->price != 0.00}
<span class="mdh" itemprop="price" data-content="{$v->price}">{$v->price}</span>
<span class="product-price"><small>Цена </small> {$v->price|convert} <small>{$currency->sign|escape}.</small></span>
{if $v->compare_price > 0} <span class="product-compare-price"><small>цена </small> {$v->compare_price|convert} <small>{$currency->sign|escape}</small></span>{/if}
{/if}
</td>
</tr>
{/foreach}
</table>
<div id="params">
{if $featuresvars}
{foreach $featuresvars as $fv}
{$fid = $fv->id}
{if $v->options.$fid|count > 0}
<div class="select">
<label>{$fv->name}:</label> <select name="feature[{$fv->id}]">
{if $fv->nameselect}<option value="">{$fv->nameselect}</option>{/if}
{foreach $fv->options as $fo}
<option value="{$fo}" class="option
{foreach $product->variants as $v}
{if $v->options.$fid}
{foreach $v->options.$fid as $vo}
{if $vo->value == $fo}
var{$v->id}
{/if}
{/foreach}
{/if}
{/foreach}
" disabled>
{$fo}
</option>
{/foreach}
</select></div>
{/if}
{/foreach}
{literal}
<script>
$(function() {
function activeVariant(){
$('#params .select select option').attr('disabled','disabled');
var inp = $("input[name=variant]:checked")
var variant = inp.val();
$('#params .select select option.var'+variant).removeAttr('disabled');
if(inp.attr('data-stock')=='0'){
$('#buy').hide();
$('#prebuy').show();
}else{
$('#buy').show();
$('#prebuy').hide();
}
}
$("input[name=variant]").change(function(){
activeVariant();
});
activeVariant();
});
</script>
{/literal}
{/if}
</div>
<div class="product-buttons">
<div id="buy">
<div class="minus-plus">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default" id="add1" type="button" onclick="javascript:this.form.amount.value= this.form.amount.value<=1 ? 1 :parseInt(this.form.amount.value)-1 ;"><span class="glyphicon glyphicon-minus"></span></button>
</span>
<input type="text" class="form-control" name="amount" value="1">
<span class="input-group-btn">
<button class="btn btn-default" id="add2" type="button" onclick="javascript:this.form.amount.value= this.form.amount.value>=10 ? 10 :parseInt(this.form.amount.value)+1 ;"><span class="glyphicon glyphicon-plus"></span></button>
</span>
</div>
</div>
{*
Кол-во<input id="add1" type="button" value="-" onclick="javascript:this.form.amount.value= this.form.amount.value<=1 ? 1 :parseInt(this.form.amount.value)-1 ;">
<input type="text" style="width:30px" name="amount" value="1">
<input type="button" value="+" id="add2" onclick="javascript:this.form.amount.value= this.form.amount.value>=10 ? 10 :parseInt(this.form.amount.value)+1 ;"><br>
*}
<p>&nbsp;</p>
<button type="submit" class="btn cart-btn" data-result-text="Товар добавлен" >Добавить в корзину</button>
<button class="btn ask-a-question" data-href="#question_form"><i class="fa fa-commenting" aria-hidden="true"></i> Задать вопрос</button>
<button class="btn ask-a-zakaz" data-href="#zakaz_form"><i class="fa fa-pencil-square" aria-hidden="true"></i> Заказать с установкой</button>
</div>
<div id="prebuy" style="display:none;">
{*<p>Нет в наличии</p>*}
<input type="button" class="btn btn-danger addcart preorder" value="Предзаказ" data-stock="{$product->variant->id}" data-id="{$product->variant->id}"/>
</div>
</div>
</form></div>
<!-- Выбор варианта товара (The End) -->
{else}
{/if}
<div class="cards">
<ul>
<li>Бесплатная доставка по СПб при заказе от 10000 рублей.</li>
<li>Доставка по всей России и СНГ.</li>
<li>Сертификат соответствия на продукцию. </li>
<li>Возможна установка в нашем сервисном центре. </li>
</ul>
<img src="/images/cards.png" alt=""></div>
<div class="none" style="display:none;">
<div class="modal2 dialog amount well" id="amount{$product->variant->id}" >
<form class="ajaxform preorder form-horizontal" action="ajax/preorder.php" method="post">
<input name="variant" value="{$product->variant->id}" type="hidden" />
<input name="comment" value="Предзаказ на {$product->name}" type="hidden" />
<span class="header h22">Предзаказ</span>
<p><a href="/products/{$product->url}/">{$product->name|escape}</a></p>
<p>Как только товар будет в наличии, наш менеджер свяжется с Вами.</p>
<div class="cart_form">
<div class="form-group">
<label class="col-sm-3 control-label">Имя</label>
<span class="col-sm-9"><input name="name" class="form-control" type="text" value="{$name|escape}" /></span>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Фамилия</label>
<span class="col-sm-9"><input name="name2" class="form-control" type="text" value="{$name2|escape}" /></span>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Email</label>
<span class="col-sm-9"><input name="email" class="form-control" type="text" value="{$email|escape}" /></span>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Телефон*</label>
<span class="col-sm-9"><input name="phone" class="form-control" type="text" value="{$phone|escape}" required="required" /></span>
</div>
</div>
<p class="clear"></p>
<p class="pull-right"><input class="button btn btn-danger" type="submit" value="Отправить" /></p>
</form>
</div>
</div>
</div>
<!-- Рейтинг -->
<script src="design/{$settings->theme}/js/project.js"></script>
{literal}
<script>
$(function() {
$('.testRater').rater({ postHref: 'ajax/rating.php' });
});
</script>
{/literal}
{*
<div class="testRater" id="product_{$product->id}">
<div class="statVal">
<span class="rater">
<span class="rater-starsOff" style="width:115px;">
<span class="rater-starsOn" style="width:{$product->rating*115/5|string_format:"%.0f"}px"></span>
</span>
<span class="test-text">
<span class="rater-rating">{$product->rating|string_format:"%.1f"}</span>&#160;(голосов <span class="rater-rateCount">{$product->votes|string_format:"%.0f"}</span>)
</span>
</span>
</div>
</div>
*}
<!-- Рейтинг (The End) -->
<!-- TABS -->
{literal}
<script>
$(document).ready(function() {
$("#tabcontent div._tabs").hide(); // Скрываем содержание
$("#tabs li:first").attr("id","current"); // Активируем первую закладку
$("#tabcontent div:first").fadeIn(); // Выводим содержание
$('#tabs a').click(function(e) {
e.preventDefault();
$("#tabcontent div._tabs").hide(); //Скрыть все сожержание
$("#tabs li").attr("id",""); //Сброс ID
$(this).parent().attr("id","current"); // Активируем закладку
$('#' + $(this).attr('title')).fadeIn(); // Выводим содержание текущей закладки
});
});
</script>
{/literal}
<ul id="tabs">
<li><a href="#" title="Описание">Описание</a></li>
<li><a href="#" title="Примеры">Примеры установки</a></li>
<li><a href="#" title="Отзывы">Обсуждение</a></li>
<li><a href="#" title="Оплата">Оплата</a></li>
<li><a href="#" title="Доставка">Доставка</a></li>
<li><a href="#" title="Гарантия">Гарантия</a></li>
<li><a href="#" title="Популярное">Популярное</a></li>
</ul>
<div id="tabcontent">
<div id="Описание" class="_tabs">
<!-- Описание товара -->
{*<span class="h22" data-product="{$product->id}">Описание товара {$product->name|escape}</span>*}
<div class="description">
{images_resize content=$product->body}
</div>
<div itemprop="description" style="display:none;">
{if $product->annotation}{$product->annotation}{else}{$product->body}{/if}
</div>
<!-- Описание товара (The End)-->
</div>
{literal}
<script>
$('.description p').each(function() {
if ($(this).find('.fancybox').length == 1) {
$(this).find('.fancybox').wrap('<div class="col-sm-12"></div>')
$(this).wrapInner('<div class="row"></div>')
}
if ($(this).find('.fancybox').length >= 2) {
$(this).find('.fancybox').wrap('<div class="col-sm-6"></div>')
$(this).wrapInner('<div class="row"></div>')
}
});
</script>
{/literal}
<div id="Примеры" class="_tabs">
{if $related_articles}
<ul>
{foreach $related_articles as $a}
<li>
{if $a->image}<a href="/{$config->worksUrl}/{$a->url}/"><img src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" /></a>{/if}
<span class="h22"><a href="/{$config->worksUrl}/{$a->url}/">{$a->name|escape}</a></span>
<div>{$a->annotation}</div>
<p class="clear"></p>
</li>
{/foreach}
</ul>
{/if}
</div>
<div id="Отзывы" class="_tabs">
<span class="h22">Комментарии</span>
{if $comments}
<!-- Список с комментариями -->
<ul class="comment_list">
{foreach $comments as $comment}
<li style="background-color: transparent;padding:0"></li>
<li style="background-color: transparent;padding:0"><a id="comment_{$comment->id}"></a><hr></li>
<li>
<!-- Имя и дата комментария-->
<p class="comment_header" style="display: block;">
{$comment->name|escape} <span class="product-comment-date">{$comment->date|date}, {$comment->date|time}</span>
{if !$comment->approved}ожидает модерации</b>{/if}
</p>
<!-- Имя и дата комментария (The End)-->
<!-- Комментарий -->
{$comment->text|escape|nl2br}
<!-- Комментарий (The End)-->
</li>
<li style="background-color: transparent;padding:0"><hr></li>
{/foreach}
</ul>
<!-- Список с комментариями (The End)-->
{else}
<p>
Пока нет комментариев
</p>
{/if}
{literal}
<script src="https://www.google.com/recaptcha/api.js?render=6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q"></script>
<script>
grecaptcha.ready(function () {
grecaptcha.execute('6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q', { action: 'contact' }).then(function (token) {
var recaptchaResponse = document.getElementById('recaptchaResponseProduct');
recaptchaResponse.value = token;
});
});
</script>
{/literal}
<!--Форма отправления комментария-->
<div class="well">
<form class="comment_form form-horizontal" method="post">
<span class="h22">Написать комментарий</span>
{if $error}
<div class="message_error">
{if $error=='captcha'}
Неверно введена капча
{elseif $error=='empty_name'}
Введите имя
{elseif $error=='empty_comment'}
Введите комментарий
{/if}
</div>
{/if}
<span class="form-group">
<label class="col-sm-2 control-label">Комментарий</label>
<span class="col-sm-10"><textarea class="comment_textarea form-control" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea></span>
</span>
<span class="form-group">
<label class="col-sm-2 control-label">Имя</label>
<span class="col-sm-10"><input class="input_name form-control" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя"/></span>
</span>
<input type="hidden" name="recaptcha_response" id="recaptchaResponseProduct">
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить" style="margin: 20px 15px 0 0;"/>
<input id="h_email" name="email">
</form>
</div>
<!--Форма отправления комментария (The End)-->
</div>
<div id="Оплата" class="_tabs">
<div class="h4">Для клиентов нашего тюнинг центра по адресу: Санкт-Петербург, Кондратьевский пр. , д. 17 к2К</div>
<ul>
<li>Оплата наличными</li>
<li>Оплата картами Visa, Mastercard, JCB, UnionPay, American Express, МИР</li>
<li>Оплата для ЮР. лиц на расчетный счет компании</li>
</ul>
<hr />
<div class="h4">Для клиентов других регионов России и СНГ.</div>
<p>В регионы товары отправляются ТОЛЬКО со 100% предоплатой, с учетом стоимости доставки.<br />
При заказе услуг по доработке фар и фонарей форма оплаты обсуждается индивидуально.<br />
Для получения более подробной информации обращайтесь к нашим сотрудникам по тел.: +7-921-958-91-00 или на почту info@atomicgarage.ru</p>
<ul>
<li>Оплата через систему Сбербанк Онлайн и отделения Сбербанка</li>
<li>Оплата через систему Альфа-Клик</li>
<li>Оплата для ЮР. лиц на расчетный счет компании</li>
</ul>
</div>
<div id="Доставка" class="_tabs">
<div class="h3 text-center">Доставка товара осуществляется по всей России и СНГ</div>
<hr />
<div class="h3">Самовывоз в Санкт-Петербурге</div>
<p>Самовывоз по адресу: Санкт-Петербург, Кондратьевский пр. , д. 17 к2К</p>
<ul>
<li>тел: <span style="font-size:20px;">+7 (921) 958-91-00</span></li>
<li>тел: <span style="font-size:20px;">+7 (921) 958-92-00</span></li>
</ul>
<p>Режим работы: Пн-Сб 10:00-20:00, Вс - выходной</p>
<hr />
<div class="h4">3) Курьерская служба СДЭК</div>
<p>Компания СДЭК предлагает услуги экспресс-доставки грузов, посылок, документов и писем в любую точку России и мира.</p>
<ul>
<li>Один из лучших способов доставки при соотношение цена - качество!</li>
<li>Доставка осуществляется до адресата, по предварительной договоренности адреса и времени или до ближайшего отделения службы СДЭК.</li>
<li>Сроки поставки от 4 до 10 дней.</li>
<li>Стоимость доставки от 300 до 800 руб.</li>
</ul>
<p>Отправка заказов производится в день заказа, либо на следующий день. <a href="https://www.cdek.ru/ru/tracking/" rel="nofollow" target="_blank">Ссылка для отслеживания</a></p>
</div>
<div id="Гарантия" class="_tabs">
<p>Гарантийный срок на предоставляемый товар в нашем <a href="/tuning-centr/">тюнинг центре</a> Atomic Garage.</p>
<p>На товарные позиции дается гарантия 6-12 месяцев, в зависимости от производителя товара.</p>
<p>Гарантия не распространяется, если автомобиль на который была произведена установка имеет неисправности, такие как:</p>
<ul>
<li>Неисправность генератора</li>
<li>АКБ</li>
<li>Электросети</li>
<li>Негерметичные элементы</li>
</ul>
</div>
<div id="Популярное" class="_tabs">
<div class="h4">Популяные виды услуг:</div>
<ul>
<li><a href="/tuning-centr/regulirovka-sveta-far/">Регулировка света фар</a></li>
<li><a href="/tuning-centr/bronirovanie-far/">Бронирование фар</a></li>
<li><a href="/tuning-centr/polirovka-far/">Полировка фар</a></li>
<li><a href="/tuning-centr/tonirovka-zadnih-fonarej/">Тонирование фар</a></li>
<li><a href="/tuning-centr/ustanovka-signalizacii-na-avtomobil/">Установка сигнализации</a></li>
<li><a href="/tuning-centr/chip-tyuning/">Чип-тюнинг</a></li>
<li><a href="/tuning-centr/ustanovka-sabvuferov/">Установка сабвуферов</a></li>
<li><a href="/tuning-centr/ustanovka-kamery-zadnego-vida-na-avtomobil/">Установка камер заднего вида</a></li>
<li><a href="/tuning-centr/ustanovka-videoregistratora/">Установка видеорегистраторов</a></li>
<li><a href="/tuning-centr/bronirovanie-plenkoj-avtomobilja/">Оклейка автомобиля антигравийной пленкой</a></li>
<li><a href="/tuning-centr/shumoizoljacija-avtomobilja/">Шумоизоляция автомобиля</a></li>
<li><a href="/tuning-centr/detejling/">Детейлинг авто</a></li>
<li><a href="/tuning-centr/poshiv-salona-avto/">Пошив салона</a></li>
<li><a href="/tuning-centr/ustanovka-avtomagnitol/">Установка автомагнитол</a></li>
</ul>
<hr />
</div>
</div>
<div class="block layer">
<h2 align="center">Рекомендуемые товары</h2>
<div id=list class="sortable related_products">
{foreach from=$related_products item=related_product}
<div class="row">
<div class="move cell">
<div class="move_zone"></div>
</div>
<div class="product-image">
<input type=hidden name=related_products[] value='{$related_product->id}'>
<a href="{url id=$related_product->id}">
<img class=product_icon src='{$related_product->images[0]->filename|resize:250:150}' title="{$related_product->name|escape}" alt="{$related_product->name|escape}">
</a>
</div>
<div class="name cell">
<a href="{url id=$related_product->id}">{$related_product->name}</a>
</div>
<div class="icons cell">
<a href='#' class="delete"></a>
</div>
<div class="clear"></div>
</div>
{/foreach}
<div id="new_related_product" class="row" style='display:none;'>
<div class="move cell">
<div class="move_zone"></div>
</div>
<div class="image cell">
<input type=hidden name=related_products[] value=''>
<img class=product_icon src=''>
</div>
<div class="name cell">
<a class="related_product_name" href=""></a>
</div>
<div class="icons cell">
<a href='#' class="delete"></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<!-- TABS (The End)-->
</div>
<div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki,viber,whatsapp,telegram"></div>
<!-- Просмотров --> <div style="text-align:right"><small>Просмотров товара: {$product->views}</small></div> <!-- Просмотров (The End) -->
{if $adminBtn}
<a class="btn btn-warning btn-sm" href="{$adminBtn}" style="position:absolute;top:80px;right:15px" title="редактировать"><i class="fa fa-pencil-square-o"></i></a>
{/if}
</div>
<!-- Описание товара (The End)-->
</div>
</div>
{literal}
<script>
$(function() {
$(".features li:even").addClass('even');
$('a[data-rel=group]').attr('rel', 'product-gallery');
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
});
</script>
{/literal}
{literal}
<script>
function saveData() {
sessionStorage.data = '#comments';
}
</script>
{/literal}
{literal}
<script>
$(function() {
$('#myTab a[href="'+sessionStorage.data+'"]').tab('show');
});
//// yandex Ecommerce
var cat = [];
$('.breadcrumb li a').each(function(k, v){ if(k) cat.push($(v).text()); });
cat = cat.join('/');
window.dataLayer = window.dataLayer || [];
var name = '{/literal}{$product->name|escape}{literal}';
var brand = '{/literal}{$product->brand|escape}{literal}';
var products = [];
$.each($.yEcommerce, function(k, item){
var variant = item.name ? item.name : name;
products.push({
"id": item.id,
"name" : name,
"price": item.price,
"brand": brand,
"category": cat,
"variant" : variant
});
});
dataLayer.push({
"ecommerce": {
"detail": {
"products": products
}
}
});
var $form = $('form.variants');
var id = '{/literal}{$product->id}{literal}';
$form.find('input[type=submit]').click(function(){
if($form.find('input[name=variant]:checked').size() > 0) id = $form.find('input[name=variant]:checked').val();
dataLayer.push({
"ecommerce": {
"add": {
"products": [eCommerceFindProduct(id, products)]
}
}
});
//console.log(dataLayer)
});
function eCommerceFindProduct(id, products){
var res = {};
$.each(products, function(k, item){ if(item.id == id) res = item });
res.quantity = 1;
return res;
}
</script>
{/literal}
{include file='forms/question.tpl'}
{include file='forms/zakaz.tpl'}