add public design files
This commit is contained in:
2
design/carheart/html/.htaccess
Normal file
2
design/carheart/html/.htaccess
Normal file
@@ -0,0 +1,2 @@
|
||||
order deny,allow
|
||||
deny from all
|
||||
27
design/carheart/html/actions.tpl
Normal file
27
design/carheart/html/actions.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{* Список записей блога *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
<li>{$page->name}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
<!-- Заголовок /-->
|
||||
<h1>{$page->header}</h1>
|
||||
{$page->body}
|
||||
{include file='pagination.tpl'}
|
||||
|
||||
<!-- Статьи /-->
|
||||
<div class="blog">
|
||||
{foreach $posts as $post}
|
||||
<div class="col-sm-12">
|
||||
<div class="blog-article">
|
||||
{if $post->image}<div class="blog-image"><a href="/actions/{$post->url}/" class="w"><img class="img-thumbnail" src="{$post->image|resizepost:100:100}" alt="{$post->name|escape}" id="blogimg"/></a></div>{/if}
|
||||
<div class="blog-title"><span class="badge">{$post->date|date|date_format:"%e %m %Y":"":"rus"}</span> <a data-act="{$post->id}" href="/actions/{$post->url}/">{$post->name|escape}</a></div>
|
||||
<div class="blog-annotation">{$post->annotation}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<!-- Статьи #End /-->
|
||||
|
||||
{include file='pagination.tpl'}
|
||||
117
design/carheart/html/actions_post.tpl
Normal file
117
design/carheart/html/actions_post.tpl
Normal file
@@ -0,0 +1,117 @@
|
||||
{* Страница отдельной записи блога *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
<li><a href="/actions/">Акции</a></li>
|
||||
<li>{$post->name|escape}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
<!-- Заголовок /-->
|
||||
<h1 data-act="{$post->id}">{$post->name|escape}</h1>
|
||||
<p>{$post->date|date|date_format:"%e %m %Y":"":"rus"}</p>
|
||||
|
||||
<!-- Тело поста /-->
|
||||
{*if $post->image}
|
||||
<div class="pull-right" style="margin: 0px 0px 15px 15px">
|
||||
<a href="{$post->image|resizepost:1000:1000}" class="zoom w" data-rel="group"><img class="img-thumbnail" src="{$post->image|resizepost:380:380}" alt="{$post->name|escape}" /></a>
|
||||
</div>
|
||||
{/if*}
|
||||
|
||||
{$post->text}
|
||||
|
||||
<!-- Соседние записи /-->
|
||||
<div id="back_forward">
|
||||
{if $prev_post}
|
||||
← <a class="back" id="PrevLink" href="/actions/{$prev_post->url}/">{$prev_post->name}</a>
|
||||
{/if}
|
||||
{if $next_post}
|
||||
<a class="forward" id="NextLink" href="/actions/{$next_post->url}/">{$next_post->name}</a> →
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Комментарии -->
|
||||
<div id="comments">
|
||||
|
||||
<h2>Комментарии</h2>
|
||||
|
||||
{if $comments}
|
||||
<!-- Список с комментариями -->
|
||||
<ul class="comment_list">
|
||||
{foreach $comments as $comment}
|
||||
<a name="comment_{$comment->id}"></a>
|
||||
<li>
|
||||
<!-- Имя и дата комментария-->
|
||||
<div class="comment_header">
|
||||
{$comment->name|escape} <i>{$comment->date|date}, {$comment->date|time}</i>
|
||||
{if !$comment->approved}ожидает модерации</b>{/if}
|
||||
</div>
|
||||
<!-- Имя и дата комментария (The End)-->
|
||||
|
||||
<!-- Комментарий -->
|
||||
{$comment->text|escape|nl2br}
|
||||
<!-- Комментарий (The End)-->
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<!-- Список с комментариями (The End)-->
|
||||
{else}
|
||||
<p>
|
||||
Пока нет комментариев
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<!--Форма отправления комментария-->
|
||||
|
||||
<!--Подключаем js-проверку формы -->
|
||||
<script src="/js/baloon/js/default.js" language="JavaScript" type="text/javascript"></script>
|
||||
<script src="/js/baloon/js/validate.js" language="JavaScript" type="text/javascript"></script>
|
||||
<script src="/js/baloon/js/baloon.js" language="JavaScript" type="text/javascript"></script>
|
||||
<link href="/js/baloon/css/baloon.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<span class="well">
|
||||
<form class="comment_form form-horizontal" method="post" role="form">
|
||||
<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 for="comment_textarea" 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 for="comment_name" 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>
|
||||
<span class="form-group">
|
||||
<span class="col-sm-2"><p class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></p></span>
|
||||
<span class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" format="\d\d\d\d" data-notice="Введите капчу"/></span>
|
||||
</span>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить">
|
||||
</form>
|
||||
</span>
|
||||
<!--Форма отправления комментария (The End)-->
|
||||
|
||||
</div>
|
||||
<!-- Комментарии (The End) -->
|
||||
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
|
||||
$(".content img").addClass( 'img-thumbnail w' );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
16
design/carheart/html/ajax_order.tpl
Normal file
16
design/carheart/html/ajax_order.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="dialog">
|
||||
{if $result}
|
||||
<h3 class="header" style="color:#000;">Заявка на предзаказ оформлена</h3>
|
||||
<p>Как только товар будет в наличии, менеджер магазина свяжется с Вами.</p>
|
||||
{else}
|
||||
<h3 class="header">Ошибка</h3>
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'empty_name'}Введите Имя{/if}
|
||||
{if $error == 'empty_name2'}Введите Фамилию{/if}
|
||||
{if $error == 'empty_email'}Введите email{/if}
|
||||
{if $error == 'empty_phone'}Введите Телефон{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
6
design/carheart/html/ajax_price.tpl
Normal file
6
design/carheart/html/ajax_price.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
<div id="deliveries">
|
||||
<p>Конечная сумма доставки: <span class="delivprice">{$data->rsp->price} руб</span>. <br />
|
||||
Срок доставки составляет от {$data->rsp->term->min} до {$data->rsp->term->max} дней.</p>
|
||||
<input type="hidden" name="delivery_price" value="{$data->rsp->price}" />
|
||||
<p> </p>
|
||||
</div>
|
||||
179
design/carheart/html/article.tpl
Normal file
179
design/carheart/html/article.tpl
Normal file
@@ -0,0 +1,179 @@
|
||||
{* Страница отдельной записи блога *}
|
||||
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
<li><a href="/nashi-raboty/">Примеры работ</a></li>
|
||||
{foreach from=$article->category->path item=cat}
|
||||
<li><a href="/articles/{$cat->url}/">{$cat->name|escape}</a></li>
|
||||
{/foreach}
|
||||
<li>{$article->name|escape}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
|
||||
<!-- Заголовок /-->
|
||||
<h1>{$article->name|escape}</h1>
|
||||
<p>{$article->date|date|date_format:"%e %m %Y":"":"rus"}</p>
|
||||
<p>Количество просмотров: {$article->visited}</p>
|
||||
{if $article->image}<a href="{$article->image|resizepost:800:800}" class="fancybox" data-rel="details"><img class="img-thumbnail" src="{$article->image|resizepost:100:100}" alt="{$article->name|escape}" /></a>{/if}
|
||||
|
||||
<!-- Тело поста / -->
|
||||
{images_resize content=$article->text}
|
||||
<!-- / Тело поста -->
|
||||
|
||||
<!-- Соседние записи /-->
|
||||
{*
|
||||
<div id="back_forward">
|
||||
{if $prev_article}
|
||||
← <a class="back" id="PrevLink" href="/article/{$prev_article->url}/">{$prev_article->name}</a>
|
||||
{/if}
|
||||
{if $next_article}
|
||||
<a class="forward" id="NextLink" href="/article/{$next_article->url}/">{$next_article->name}</a> →
|
||||
{/if}
|
||||
</div>*}
|
||||
|
||||
{if $related_products}
|
||||
<h2>Связанные товары</h2>
|
||||
<ul>
|
||||
{foreach $related_products as $p}
|
||||
<li><a href="/products/{$p->url}/">{$p->name}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<br/>
|
||||
|
||||
{/if}
|
||||
<br/>
|
||||
|
||||
{if $related_articles}
|
||||
<h2>Также советуем посмотреть</h2>
|
||||
<ul>
|
||||
{foreach $related_articles as $a}
|
||||
<li>
|
||||
{if $a->image}<a href="/article/{$a->url}/" class="w"><img class="img-thumbnail" src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" /></a>{/if}
|
||||
<a href="/article/{$a->url}/">{$a->name}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
|
||||
{foreach from=$article_photos item=ph}
|
||||
<div class="add-photo-preview" style="float:left;margin-right:10px;margin-bottom:10px;">
|
||||
<a class="fancybox" data-rel="details" href="{$ph->bigImage}" rel="details">
|
||||
<img class="img-thumbnail w" src="{$ph->image}" style="width:400px">
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{if $article_photos}<div class="clearfix"></div><div style="height:30px"></div>{/if}
|
||||
|
||||
<div id="back_forward" style="margin-left: 0;" class="row">
|
||||
<div class="col-sm-6">
|
||||
{if $prev_article}
|
||||
{*<a class="prev-strelka" href="/catalog/reshetki-radiatora/tovar-1217.html"><span class="fa fa-chevron-left"></span></a>*}
|
||||
<div class="prev-next-title"><a href="/article/{$prev_article->url}/">← {$prev_article->name}</a></div>
|
||||
<div style="float: none;" class="cell">
|
||||
<a href="/article/{$prev_article->url}/">
|
||||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||||
<img src="{$prev_article->image|resizepost:200:140}" alt="Решетка радиатора (4 поперечины)" style="width: 200px; margin-top: -9.5px; display: inline-block;">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="text-align: right;" class="col-sm-6">
|
||||
{if $next_article}
|
||||
<div style="float:left" class="prev-next-title"><a href="/article/{$next_article->url}/">{$next_article->name} →</a></div>
|
||||
{*<a class="next-strelka" href="/catalog/reshetki-radiatora/tovar-3004.html"><span class="fa fa-chevron-right"></span></a>*}
|
||||
<div style="float: none;display: inline-block;" class="cell">
|
||||
<a href="/article/{$next_article->url}/">
|
||||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||||
<img src="{$next_article->image|resizepost:200:140}" alt="Решетка радиатора Audi A4 B8 '07-11 с рамкой под номер, черная" style="width: 200px; margin-top: -3.5px; display: inline-block;">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Комментарии -->
|
||||
<div id="comments">
|
||||
|
||||
<h2>Комментарии</h2>
|
||||
|
||||
{if $comments}
|
||||
<!-- Список с комментариями -->
|
||||
<ul class="comment_list">
|
||||
{foreach $comments as $comment}
|
||||
|
||||
<li> <a name="comment_{$comment->id}"></a>
|
||||
<!-- Имя и дата комментария-->
|
||||
<div class="comment_header">
|
||||
{$comment->name|escape} <i>{$comment->date|date}, {$comment->date|time}</i>
|
||||
{if !$comment->approved}ожидает модерации</b>{/if}
|
||||
</div>
|
||||
<!-- Имя и дата комментария (The End)-->
|
||||
|
||||
<!-- Комментарий -->
|
||||
{$comment->text|escape|nl2br}
|
||||
<!-- Комментарий (The End)-->
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<!-- Список с комментариями (The End)-->
|
||||
{else}
|
||||
<p>
|
||||
Пока нет комментариев
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<!--Форма отправления комментария-->
|
||||
|
||||
<!--Подключаем js-проверку формы -->
|
||||
|
||||
<div class="title">Написать комментарий</div>
|
||||
<div class="well">
|
||||
<form class="form-horizontal comment_form" method="post" action="{$smarty.server.REQUEST_URI}">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error=='captcha'}
|
||||
Неверно введена капча
|
||||
{elseif $error=='empty_name'}
|
||||
Введите имя
|
||||
{elseif $error=='empty_comment'}
|
||||
Введите комментарий
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="comment_name">Комментарий</label>
|
||||
<div class="col-sm-10"><textarea class="comment_textarea form-control" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="comment_name">Имя</label>
|
||||
<div class="col-sm-10"><input class="input_name form-control" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></div>
|
||||
<div class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></div>
|
||||
</div>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить" />
|
||||
<input type="text" name="email" id="h_email">
|
||||
</form>
|
||||
</div>
|
||||
<!--Форма отправления комментария (The End)-->
|
||||
|
||||
</div>
|
||||
<!-- Комментарии (The End) -->
|
||||
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
135
design/carheart/html/articles.tpl
Normal file
135
design/carheart/html/articles.tpl
Normal file
@@ -0,0 +1,135 @@
|
||||
{* Список записей блога *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
{if $article_category}
|
||||
{foreach from=$article_category->path item=cat}
|
||||
{if $cat->id == 3} <li><a href="/nashi-raboty/">{$cat->name|escape}</a></li>
|
||||
{else} <li><a href="/nashi-raboty/{$cat->url}/">{$cat->name|escape}</a></li>
|
||||
{/if}
|
||||
|
||||
|
||||
{/foreach}
|
||||
{elseif $keyword}
|
||||
<li>Поиск</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
{if $article_category}<h1>{$article_category->name}</h1>{/if}
|
||||
|
||||
{*if in_array($article_category->id, array(3))}
|
||||
<div id="hideContactForm" class="hide">
|
||||
{include file='contact_form_inline.tpl'}
|
||||
</div>
|
||||
{/if*}
|
||||
|
||||
|
||||
|
||||
<!-- Тело /-->
|
||||
{images_resize content=$article_category->description}
|
||||
<!--/ Тело -->
|
||||
|
||||
{* Костыль для статей, которые как бренды *}
|
||||
{if $article_category->id == 3}
|
||||
|
||||
|
||||
{if $smarty.get.page < 2}{include file='articles_like_brands.tpl'}{/if}
|
||||
|
||||
{else}
|
||||
|
||||
{include file='articles_like_category.tpl'}
|
||||
{*if $article_category->id != 3}
|
||||
{include file='articles_like_category.tpl'}
|
||||
{/if*}
|
||||
|
||||
{/if}
|
||||
|
||||
<!-- {* Рекурсивная функция вывода дерева категорий *}
|
||||
{function name=article_categories_tree}
|
||||
{if $categories}
|
||||
<ul>
|
||||
{foreach $categories as $c}
|
||||
{* Показываем только видимые категории *}
|
||||
{if $c->visible}
|
||||
<li>
|
||||
<a {if $category->id == $c->id}class="selected"{/if} href="/articles/{$c->url}/">{$c->name}</a>
|
||||
{article_categories_tree categories=$c->subcategories}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/function}
|
||||
|
||||
|
||||
{if !$article_category}
|
||||
{get_article_categories var=article_categories}
|
||||
<div class="article_categories">
|
||||
{article_categories_tree categories=$article_categories}
|
||||
|
||||
</div>
|
||||
|
||||
{else} -->
|
||||
{*<h1>{$article_category->name}</h1>*}
|
||||
|
||||
<!--<div class="article_categories">
|
||||
{article_categories_tree categories=$article_category->subcategories}
|
||||
</div> -->
|
||||
|
||||
{*if $article_category->subcategories}{if $maybeBrand != 'работы' && $maybeBrand != 'CarHeart'}<h2>Все работы по тюнингу {$maybeBrand}</h2>{/if}{/if*}
|
||||
|
||||
{if $article_category->id == 3 && $smarty.get.page < 2}
|
||||
<h2>Все работы{if $smarty.get.page > 1} - страница {$smarty.get.page}{/if}</h2>
|
||||
{/if}
|
||||
|
||||
<div style="text-align:right">{include file='pagination_articles.tpl'}</div>
|
||||
<!-- Статьи /-->
|
||||
<div>
|
||||
<div class="blog">
|
||||
{foreach $articles as $a}
|
||||
<div class="col-sm-12">
|
||||
<div class="blog-article">
|
||||
<div class="blog-image">{if $a->image}<a href="/nashi-raboty/{$a->url}/" class="w">
|
||||
<img class="img-thumbnail" src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" /></a>{/if}</div>
|
||||
<div class="blog-title"><a href="/nashi-raboty/{$a->url}/">{$a->name|escape}</a></div>
|
||||
<div class="blog-annotation">{$a->annotation}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<!-- Статьи #End /-->
|
||||
</div>
|
||||
<div style="text-align:right">{include file='pagination_articles.tpl'}</div>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
{*
|
||||
|
||||
{get_last_articles var=last_articles limit=5}
|
||||
{if $last_articles}
|
||||
<div class="blog_menu">
|
||||
|
||||
{foreach $last_articles as $a}
|
||||
<li><h4><a href="/article/{$a->url}/">{$a->name|escape}</a></h4></li>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
(The End) *}
|
||||
|
||||
<!-- Заголовок /-->
|
||||
|
||||
|
||||
|
||||
{*<h1>{if $page}{$page->name}{elseif $article_category}{$article_category->name}{else}Полезные статьи{/if}</h1>*}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
30
design/carheart/html/articles.tpl.txt
Normal file
30
design/carheart/html/articles.tpl.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
{* Рекурсивная функция вывода дерева категорий *}
|
||||
{function name=article_categories_tree}
|
||||
{if $categories}
|
||||
<ul>
|
||||
{foreach $categories as $c}
|
||||
{* Показываем только видимые категории *}
|
||||
{if $c->visible}
|
||||
<li>
|
||||
<a {if $category->id == $c->id}class="selected"{/if} href="/articles/{$c->url}/">{$c->name}</a>
|
||||
{article_categories_tree categories=$c->subcategories}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/function}
|
||||
|
||||
|
||||
{if !$article_category}
|
||||
{get_article_categories var=article_categories}
|
||||
<div class="article_categories">
|
||||
{article_categories_tree categories=$article_categories}
|
||||
</div>
|
||||
{else}
|
||||
|
||||
{if $article_category && ($article_category->parent_id == 5 )}<h1>{$article_category->name}</h1>{/if}
|
||||
|
||||
<div class="article_categories">
|
||||
{article_categories_tree categories=$article_category->subcategories}
|
||||
</div>
|
||||
13
design/carheart/html/articles_like_brands.tpl
Normal file
13
design/carheart/html/articles_like_brands.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{if $article_category->subcategories}
|
||||
<div class="brands row">
|
||||
{foreach from=$article_category->subcategories item=c}
|
||||
{if !$c->visible}{continue}{/if}
|
||||
<div class="brand col-sm-2 col-xs-4">
|
||||
<div class="brand-image">{if $c->image}<a class="w" href="/nashi-raboty/{$c->url}/" data-articlecategory="{$c->id}">
|
||||
<img class="img-thumbnail" src="{$c->image|resize:100:100}" alt="{$c->name}"></a>{/if}</div>
|
||||
<div class="brand-name"><a class="w" href="/nashi-raboty/{$c->url}/" data-articlecategory="{$c->id}">{$c->name}</a></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
13
design/carheart/html/articles_like_category.tpl
Normal file
13
design/carheart/html/articles_like_category.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{if $article_category->subcategories}
|
||||
<div class="articles row">
|
||||
{foreach from=$article_category->subcategories item=c}
|
||||
{if $c->visible}
|
||||
<div class="article col-sm-4 col-xs-6">
|
||||
<div class="article-image">{if $c->image}<a class="w" href="/nashi-raboty/{$c->url}/" data-articlecategory="{$c->id}"><img class="img-thumbnail" src="{$c->image|resizepost:252:252}" alt="{$c->name}"></a>{/if}</div>
|
||||
<div class="article-name" style="{$name_style}"><a class="w" href="/nashi-raboty/{$c->url}/" data-articlecategory="{$c->id}">{$c->name}</a></div>
|
||||
<div class="article-description">{$c->description}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
23
design/carheart/html/banner/foot-left.banner.tpl
Normal file
23
design/carheart/html/banner/foot-left.banner.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{*Â ASSIGN ÓÊÀÆÈÒÅ ID ÍÎÌÅÐ ÃÐÓÏÏÛ {assign var='group' value='IDÃÐÓÏÏÛ'} *}
|
||||
|
||||
{assign var='group' value='2'}{get_banners group=$group}
|
||||
|
||||
{if $banners}
|
||||
{literal}<style>
|
||||
.foot-slider{
|
||||
position: relative;
|
||||
width:1000px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
height:200px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
}
|
||||
.foot-slider ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
</style>{/literal}
|
||||
<div class="foot-slider" id="Slide-{$group}">
|
||||
<ul>{foreach $banners as $banner}<li><a href="{$banner->url}" title="{$banner->name|escape}"><img src="{$banner->image}" alt=""></a></li>{/foreach}</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{literal}<script type="text/javascript">$('#Slide-{/literal}{$group}{literal}').smSlider({autoPlay:true,delay:3000,hoverPause:true,transition:'fader'});</script>{/literal}
|
||||
{/if}
|
||||
33
design/carheart/html/banner/foot.banner.tpl
Normal file
33
design/carheart/html/banner/foot.banner.tpl
Normal file
@@ -0,0 +1,33 @@
|
||||
{*Â ASSIGN ÓÊÀÆÈÒÅ ID ÍÎÌÅÐ ÃÐÓÏÏÛ {assign var='group' value='IDÃÐÓÏÏÛ'} *}
|
||||
|
||||
{assign var='group' value='2'}{get_banners group=$group}
|
||||
|
||||
{if $banners}
|
||||
<div style="display:table">
|
||||
{foreach $banners as $banner}
|
||||
<div style="display:table-cell;text-align:center;vertical-align:middle;">
|
||||
<a href="{$banner->url}" title="{$banner->name|escape}"><img src="{$banner->image}" alt=""></a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
{*
|
||||
{literal}<style>
|
||||
.head-slider{
|
||||
position: relative;
|
||||
width:700px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
height:200px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
}
|
||||
.head-slider ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
</style>{/literal}
|
||||
<div class="head-slider" id="Slide-{$group}">
|
||||
<ul>{foreach $banners as $banner}<li><a href="{$banner->url}" title="{$banner->name|escape}"><img src="{$banner->image}" alt=""></a></li>{/foreach}</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{literal}<script type="text/javascript">$('#Slide-{/literal}{$group}{literal}').smSlider({autoPlay:true,delay:3000,hoverPause:true,transition:'fader'});</script>{/literal}
|
||||
*}
|
||||
{/if}
|
||||
30
design/carheart/html/banner/left.banner.tpl
Normal file
30
design/carheart/html/banner/left.banner.tpl
Normal file
@@ -0,0 +1,30 @@
|
||||
{*Â ASSIGN ÓÊÀÆÈÒÅ ID ÍÎÌÅÐ ÃÐÓÏÏÛ {assign var='group' value='IDÃÐÓÏÏÛ'} *}
|
||||
|
||||
{assign var='group' value='1'}{get_banners group=$group}
|
||||
|
||||
{if $banners}
|
||||
{foreach $banners as $banner}
|
||||
<a href="{$banner->url}" title="{$banner->name|escape}"><img src="{$banner->image}" alt=""></a><br>
|
||||
{/foreach}
|
||||
{*
|
||||
{literal}<style>
|
||||
.right-slider{
|
||||
position: relative;
|
||||
width:260px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
height:260px; /************ÓÊÀÆÈÒÅ ÐÀÇÌÅÐÛ ÁÀÍÍÅÐÀ*****************/
|
||||
}
|
||||
.right-slider ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
</style>{/literal}
|
||||
<div class="right-slider" id="Slide-{$group}">
|
||||
<ul>{foreach $banners as $banner}<li><a href="{$banner->url}" title="{$banner->name|escape}"><img src="{$banner->image}" alt=""></a></li>{/foreach}</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{literal}<script type="text/javascript">$('#Slide-{/literal}{$group}{literal}').smSlider({autoPlay:true,delay:3000,hoverPause:true,transition:'fader'});</script>{/literal}
|
||||
*}
|
||||
|
||||
|
||||
{/if}
|
||||
27
design/carheart/html/blog.tpl
Normal file
27
design/carheart/html/blog.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{* Список записей блога *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
<li>{$page->name}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
<!-- Заголовок /-->
|
||||
<h1>{$page->name}</h1>
|
||||
|
||||
{include file='pagination.tpl'}
|
||||
|
||||
<!-- Статьи /-->
|
||||
<div class="blog">
|
||||
{foreach $posts as $post}
|
||||
<div class="col-sm-12">
|
||||
<div class="blog-article">
|
||||
{if $post->image}<div class="blog-image"><a href="/tehinfo/{$post->url}/" class="w"><img class="img-thumbnail" src="{$post->image|resizepost:100:100}" alt="{$post->name|escape}" id="blogimg"/></a></div>{/if}
|
||||
<div class="blog-title"><span class="badge">{$post->date|date|date_format:"%e %m %Y":"":"rus"}</span> <a data-post="{$post->id}" href="/tehinfo/{$post->url}/">{$post->name|escape}</a></div>
|
||||
<div class="blog-annotation">{$post->annotation}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<!-- Статьи #End /-->
|
||||
|
||||
{include file='pagination.tpl'}
|
||||
10
design/carheart/html/brands.tpl
Normal file
10
design/carheart/html/brands.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
{if $category->brands}
|
||||
<div class="brands row">
|
||||
{foreach from=$category->brands item=b}
|
||||
<div class="brand col-sm-2 col-xs-4">
|
||||
<div class="brand-image">{if $b->image}<a class="w" href="/brands/{$b->url}/" data-brand="{$b->id}"><img class="img-thumbnail" src="/{$config->brands_images_dir}{$b->image}" alt="{$b->name}"></a>{/if}</div>
|
||||
<div class="brand-name"><a class="w" href="/brands/{$b->url}/" data-brand="{$b->id}">{$b->name}</a></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
12
design/carheart/html/brands_all.tpl
Normal file
12
design/carheart/html/brands_all.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{get_brands var=all_brands}
|
||||
{if $all_brands}
|
||||
<div class="brands row">
|
||||
{foreach $all_brands as $b}
|
||||
{if !$b->visible}{continue}{/if}
|
||||
<div class="brand col-sm-2 col-xs-4">
|
||||
<div class="brand-image">{if $b->image}<a class="w" href="/brands/{$b->url}/" data-brand="{$b->id}"><img class="img-thumbnail" src="/{$config->brands_images_dir}{$b->image}" alt="{$b->name}"></a>{/if}</div>
|
||||
<div class="brand-name"><a class="w" href="/brands/{$b->url}/" data-brand="{$b->id}">{$b->name}</a></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
40
design/carheart/html/callback.tpl
Normal file
40
design/carheart/html/callback.tpl
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="callBack"><div class="call-me"><a href="#call">Обратный звонок</a></div></div>
|
||||
|
||||
{if $call_sent}
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
alert("Ваша заявка принята. Мы свяжемся с Вами в ближайшее время");
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
<div style="display:none;">
|
||||
<div id="call">
|
||||
<br><h2 style="/*#a2062d;*/ font-size: 21px;" align=center>Заказ обратного звонка</h2>
|
||||
<form id="mail_form" class="form feedback_form" method="post" style="width: 38%;">
|
||||
<p class="reset-margin-padding callbacklines"></p>
|
||||
<label class="labe_txt">Имя</label>
|
||||
<div style="clear:both"></div>
|
||||
<input type="text" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя" id="nickname_field" value="" class="input-text" style=""/><br/>
|
||||
|
||||
<label class="labe_txt">Номер телефона</label>
|
||||
<div style="clear:both"></div>
|
||||
<input data-format=".+" data-notice="Введите номер телефона" value="" name="phone" maxlength="255" type="text" class="input-text"/>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<input class="button" type="submit" name="callback" value="Заказать" style="background: #99f; border: 0;padding: 3px;color: #fff;font-weight: bold; text-decoration:none;margin-top:10px;float:right;"/>
|
||||
</form>
|
||||
<br><br><br>
|
||||
<h3 align="center"> Введите пожалуйста ваше имя и телефон. <br>Наши менеджеры свяжутся с вами в ближайшее время.</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
$('.call-me a').fancybox();
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
525
design/carheart/html/cart.tpl
Normal file
525
design/carheart/html/cart.tpl
Normal file
@@ -0,0 +1,525 @@
|
||||
{* Шаблон корзины *}
|
||||
|
||||
<h1>
|
||||
{if $cart->purchases}В корзине {$cart->total_products} {$cart->total_products|plural:'товар':'товаров':'товара'}
|
||||
{else}Корзина пуста{/if}
|
||||
</h1>
|
||||
{if $cart->purchases}
|
||||
<form method="post" name="cart" class="_preorder">
|
||||
{* Список покупок *}
|
||||
<table id="purchases" class="table table-striped">
|
||||
<tr>
|
||||
<th>Изображение</th>
|
||||
<th>Наименование</th>
|
||||
<th>Цена</th>
|
||||
<th>Кол-во</th>
|
||||
<th>Итого</th>
|
||||
<th>Удалить</th>
|
||||
</tr>
|
||||
{literal} <script>$.yEcommerce = [];</script> {/literal}
|
||||
{foreach from=$cart->purchases item=purchase}
|
||||
{literal}
|
||||
<script>
|
||||
var x = {/literal}{$purchase->variant|@json_encode nofilter}{literal}
|
||||
x.product = {/literal}{$purchase->product|@json_encode nofilter}{literal}
|
||||
$.yEcommerce.push( x );
|
||||
</script>
|
||||
{/literal}
|
||||
<tr>
|
||||
{* Изображение товара *}
|
||||
<td>
|
||||
{$image = $purchase->product->images|first}
|
||||
{if $image}
|
||||
<a href="/products/{$purchase->product->url}/"><img src="{$image->filename|resize:50:50}" alt="{$product->name|escape}"></a>
|
||||
{/if}
|
||||
</td>
|
||||
{* Название товара *}
|
||||
<td style="font-size: 80%">
|
||||
<a href="/products/{$purchase->product->url}/">{$purchase->product->name|escape}</a>
|
||||
{$purchase->variant->name|escape}
|
||||
<div class="features">
|
||||
{foreach from=$purchase->options item=opt key=ok}
|
||||
{assign var=f value=$features[$ok]}
|
||||
{assign var=opts value=$purchase->features[$ok]}
|
||||
<p>
|
||||
<label>{$f->name} </label>
|
||||
<span>
|
||||
{$opt}
|
||||
</span>
|
||||
</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
{* Цена за единицу *}
|
||||
<td>
|
||||
{($purchase->variant->price)|convert} {$currency->sign}
|
||||
</td>
|
||||
{* Количество *}
|
||||
<td>
|
||||
<select name="amounts[{$purchase->variant->id}]" class="amounts form-control" onchange="document.cart.submit();">
|
||||
{section name=amounts start=1 loop=$purchase->variant->stock+1 step=1}
|
||||
<option value="{$smarty.section.amounts.index}" {if $purchase->amount==$smarty.section.amounts.index}selected{/if}>{$smarty.section.amounts.index} {$settings->units}</option>
|
||||
{/section}
|
||||
</select>
|
||||
</td>
|
||||
{* Цена *}
|
||||
<td>
|
||||
{($purchase->variant->price*$purchase->amount)|convert} {$currency->sign}
|
||||
</td>
|
||||
{* Удалить из корзины *}
|
||||
<td>
|
||||
<a class="remove-from-cart" data-id="{$purchase->variant->id}" href="/cart/remove/{$purchase->variant->id}/" style="color:red !important;">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<!--<img src="design/{$settings->theme}/images/delete.png" title="Удалить из корзины" alt="Удалить из корзины">-->
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $user->discount}
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>скидка</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>
|
||||
{$user->discount} %
|
||||
</th>
|
||||
<th class="remove"></th>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $coupon_request}
|
||||
<tr class="coupon">
|
||||
<th></th>
|
||||
<th colspan="3">Код купона или подарочного ваучера
|
||||
{if $coupon_error}
|
||||
<div class="message_error">
|
||||
{if $coupon_error == 'invalid'}Купон недействителен{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<input type="text" name="coupon_code" value="{$cart->coupon->code|escape}" class="coupon_code">
|
||||
</div>
|
||||
{if $cart->coupon->min_order_price>0}(купон {$cart->coupon->code|escape} действует для заказов от {$cart->coupon->min_order_price|convert} {$currency->sign}){/if}
|
||||
<div>
|
||||
<input type="button" name="apply_coupon" value="Применить купон" onclick="document.cart.submit();">
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
{if $cart->coupon_discount>0}
|
||||
−{$cart->coupon_discount|convert} {$currency->sign}
|
||||
{/if}
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{literal}
|
||||
<script>
|
||||
$("input[name='coupon_code']").keypress(function(event){
|
||||
if(event.keyCode == 13){
|
||||
$("input[name='name']").attr('data-format', '');
|
||||
$("input[name='email']").attr('data-format', '');
|
||||
document.cart.submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th class="price" colspan="4">
|
||||
Итого:
|
||||
<span id="sub_price" style="display: inline;">{$cart->total_price}</span>
|
||||
<span id="subtotal_price"></span> {$currency->sign}
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
{* Связанные товары *}
|
||||
{*
|
||||
{if $related_products}
|
||||
<h2>Так же советуем посмотреть</h2>
|
||||
<!-- Список каталога товаров-->
|
||||
<ul class="tiny_products">
|
||||
{foreach $related_products as $product}
|
||||
<!-- Товар-->
|
||||
<li class="product">
|
||||
<!-- Фото товара -->
|
||||
{if $product->image}
|
||||
<div class="image">
|
||||
<a href="/products/{$product->url}"><img src="{$product->image->filename|resize:200:200}" alt="{$product->name|escape}"/></a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Фото товара (The End) -->
|
||||
<!-- Название товара -->
|
||||
<h3><a data-product="{$product->id}" href="/products/{$product->url}">{$product->name|escape}</a></h3>
|
||||
<!-- Название товара (The End) -->
|
||||
{if $product->variants|count == 1}
|
||||
<!-- Выбор варианта товара -->
|
||||
<table>
|
||||
{foreach $product->variants as $v}
|
||||
<tr class="variant">
|
||||
<td>
|
||||
{if $v->name}<label class="variant_name" for="related_{$v->id}">{$v->name}</label>{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $v->compare_price > 0}<span class="compare_price">{$v->compare_price|convert}</span>{/if}
|
||||
<span class="price">{$v->price|convert} <span class="currency">{$currency->sign|escape}</span></span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cart?variant={$v->id}">в корзину</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<!-- Выбор варианта товара (The End) -->
|
||||
{else}
|
||||
Нет в наличии
|
||||
{/if}
|
||||
</li>
|
||||
<!-- Товар (The End)-->
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
*}
|
||||
{*/*order-on-one-page*/*}
|
||||
{literal}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#deliveries .first").click();
|
||||
});
|
||||
function change_payment_method($id) {
|
||||
$("#delivery_payment_"+$id+" .pay_first").attr('checked','checked');
|
||||
$(".delivery_payment").css("display","none");
|
||||
$("#delivery_payment_"+$id).css("display","block");
|
||||
if($id == 2 || $id == 5){
|
||||
$('._hide2').show();
|
||||
$('._hide').hide();
|
||||
|
||||
$('._hide input').each(function(){
|
||||
var t = $(this).attr('data-format');
|
||||
$(this).attr('data-format2',t);
|
||||
$(this).removeAttr('data-format');
|
||||
});
|
||||
}else{
|
||||
$('._hide').show();
|
||||
$('._hide2').show();
|
||||
$('._hide input').each(function(){
|
||||
var t = $(this).attr('data-format2');
|
||||
$(this).attr('data-format',t);
|
||||
$(this).removeAttr('data-format2');
|
||||
});
|
||||
}
|
||||
if($id == 1){
|
||||
$('._hide2').hide();
|
||||
$('._hide2 input').each(function(){
|
||||
var t = $(this).attr('data-format');
|
||||
$(this).attr('data-format2',t);
|
||||
$(this).removeAttr('data-format');
|
||||
});
|
||||
}else{
|
||||
if($id != 2 && $id != 5){
|
||||
$('._hide').show();
|
||||
$('._hide2').show();
|
||||
$('._hide2 input').each(function(){
|
||||
var t = $(this).attr('data-format2');
|
||||
$(this).attr('data-format',t);
|
||||
$(this).removeAttr('data-format2');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{*/*/order-on-one-page*/*}
|
||||
{* Доставка *}
|
||||
{if $deliveries}
|
||||
<h2>Выберите способ доставки:</h2>
|
||||
<div id="deliveries" class="list-group well">
|
||||
{foreach $deliveries as $delivery}
|
||||
<div class="radio">
|
||||
<label for="deliveries_{$delivery->id}">
|
||||
<input {*/*order-on-one-page*/*}{if $delivery@first}class="first"{/if} onclick="change_payment_method({$delivery->id})"{*/*/order-on-one-page*/*} type="radio" name="delivery_id" value="{$delivery->id}" {if $delivery_id==$delivery->id}checked{elseif $delivery@first}checked{/if} id="deliveries_{$delivery->id}">
|
||||
{$delivery->name}
|
||||
{if $cart->total_price < $delivery->free_from && $delivery->price > 0}
|
||||
<span id="delivery_price_{$delivery->id}" class="price">({$delivery->price})</span> {$currency->sign}
|
||||
{elseif $cart->total_price >= $delivery->free_from}
|
||||
<span id="delivery_price_{$delivery->id}" class="price">(бесплатно)</span>
|
||||
{else}
|
||||
<span id="delivery_price_{$delivery->id}" class="price">{if $delivery->ems==1}(Выберите город){/if}</span>
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
{if $delivery->ems==1}
|
||||
<div class="list-group-item">
|
||||
<p>Тарифы и сроки доставки можно рассчитать ниже: </p>
|
||||
<input type="hidden" name="weight" id="weight" value="{$cart->total_weight}" />
|
||||
<label for="city2">Выберите пункт назначения</label>
|
||||
<div class="col-sm-4">
|
||||
<select name="city2" id="city2" class="form-control">
|
||||
<option value="">Выбирать</option>
|
||||
{foreach $acity AS $k=>$c}
|
||||
<option value="{$k}">{$c}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div id="ajax">
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
{if $delivery->description}<div class="list-group-item">{$delivery->description}</div>{/if}
|
||||
{/if}
|
||||
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="title" id="total" style="text-align:right;">Итого: <span>{$cart->subtotal_price|convert}</span> {$currency->sign}</div>
|
||||
{*/*order-on-one-page*/*}
|
||||
{if $deliveries}
|
||||
{foreach $deliveries as $delivery}
|
||||
{if $delivery->payment_methods}
|
||||
<div class="delivery_payment {if $delivery@first}first{/if}" id="delivery_payment_{$delivery->id}" style="display:none" >
|
||||
<h2>Выберите способ оплаты</h2>
|
||||
<div id="deliveries" class="list-group well">
|
||||
{foreach $delivery->payment_methods as $payment_method}
|
||||
|
||||
<div class="radio">
|
||||
{$total_price_with_delivery = $cart->total_price}
|
||||
{if !$delivery->separate_payment && $cart->total_price < $delivery->free_from}
|
||||
{$total_price_with_delivery = $cart->total_price + $delivery->price}
|
||||
{/if}
|
||||
<label for="payment_{$delivery->id}_{$payment_method->id}">
|
||||
<input class="{if $payment_method@first}pay_first{/if}" type=radio name=payment_method_id value='{$payment_method->id}' {if $payment_method@first}checked{/if} id=payment_{$delivery->id}_{$payment_method->id}>
|
||||
{$payment_method->name}, к оплате <span class="ems_price">{$total_price_with_delivery|convert:$payment_method->currency_id}</span> {$all_currencies[$payment_method->currency_id]->sign}</label>
|
||||
</div>
|
||||
<div class="description">
|
||||
{if $payment_method->description}<div class="list-group-item">{$payment_method->description}</div>{/if}
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{*/*/order-on-one-page*/*}
|
||||
{* Выбор способа оплаты *}
|
||||
{*if $payment_methods && !$payment_method}
|
||||
<h2>Выберите способ оплаты:</h2>
|
||||
<ul id="deliveries" class="costs">
|
||||
{foreach $payment_methods as $payment_method}
|
||||
<li>
|
||||
<div class="checkbox">
|
||||
<input type=radio name=payment_method_id value='{$payment_method->id}' {if $payment_method@first}checked{/if} id=payment_{$payment_method->id}>
|
||||
</div>
|
||||
<h3><label for=payment_{$payment_method->id}> {$payment_method->name}{*, к оплате {$cart->total_price|convert:$payment_method->currency_id} {$all_currencies[$payment_method->currency_id]->sign}*}</label></h3>
|
||||
{*<div class="description">
|
||||
{$payment_method->description}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if*}
|
||||
<div class="title">Адрес получателя</div>
|
||||
<div id="adrcart" class="well">
|
||||
<div class="form-horizontal cart_form" style="overflow: hidden;">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'empty_name'}Введите Имя{/if}
|
||||
{if $error == 'empty_name2'}Введите Фамилию{/if}
|
||||
{if $error == 'empty_email'}Введите email{/if}
|
||||
{if $error == 'empty_phone'}Введите Телефон{/if}
|
||||
{if $error == 'empty_country'}Введите Страну{/if}
|
||||
{if $error == 'empty_region'}Введите Регион{/if}
|
||||
{if $error == 'empty_city'}Введите Город{/if}
|
||||
{if $error == 'empty_city2'}Введите город в EMS{/if}
|
||||
{if $error == 'empty_indx'}Введите Индекс{/if}
|
||||
{if $error == 'empty_adress'}Введите Адрес Доставки{/if}
|
||||
{if $error == 'captcha'}Капча введена неверно{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Имя*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="name" type="text" value="{$user->name}" data-format=".+" data-notice="Введите имя"/></div>
|
||||
</div>
|
||||
<div class="form-group _hide _hide2">
|
||||
<label for="name2" class="col-sm-2 control-label">Фамилия*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="name2" type="text" value="{$user->name2}" data-format=".+" data-notice="Введите фамилию" /></div>
|
||||
</div>
|
||||
<div class="form-group _hide">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="email" type="text" value="{$user->email}"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone" class="col-sm-2 control-label">Телефон*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="phone" type="text" value="{$user->phone}" data-format=".+" data-notice="Введите телефон"/></div>
|
||||
</div>
|
||||
<div class="form-group _hide _hide2">
|
||||
<label for="country" class="col-sm-2 control-label">Страна*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="country" type="text" value="{$user->country}" data-format=".+" data-notice="Введите страну"/></div>
|
||||
</div>
|
||||
<div class="form-group _hide _hide2">
|
||||
<label for="region" class="col-sm-2 control-label">Регион*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="region" type="text" value="{$user->region}" data-format=".+" data-notice="Введите регион"/></div>
|
||||
</div>
|
||||
<div class="form-group _hide">
|
||||
<label for="city" class="col-sm-2 control-label">Город*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="city" type="text" value="{$user->city}" data-format=".+" data-notice="Введите город"/></div>
|
||||
</div>
|
||||
<div class="form-group _hide _hide2">
|
||||
<label for="indx" class="col-sm-2 control-label">Индекс*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="indx" type="text" value="{$user->indx}" data-format=".+" data-notice="Введите индекс" /></div>
|
||||
</div>
|
||||
<div class="form-group _hide">
|
||||
<label for="address" class="col-sm-2 control-label" style="padding-left: 0;padding-right: 10px;">Адрес доставки*</label>
|
||||
<div class="col-sm-10"><input class="form-control" name="address" type="text" value="{$user->adress}" data-format=".+" data-notice="Введите адрес"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment" class="col-sm-2 control-label">Комментарий к заказу</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" name="comment" id="order_comment"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"><div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha'/></div></div>
|
||||
<div class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></div>
|
||||
</div>
|
||||
<input type="submit" name="checkout" class="button btn btn-danger pull-right" value="Оформить заказ">
|
||||
|
||||
</div>
|
||||
Поля, отмеченные звездочкой (*) – обязательны для заполнения.
|
||||
</form>
|
||||
{else}
|
||||
В корзине нет товаров
|
||||
{/if}
|
||||
</div>
|
||||
<script>
|
||||
/*function select_delivery_method(method_id)
|
||||
{
|
||||
radiobuttons = document.getElementsByName('delivery_id');
|
||||
for(var i=0;i<radiobuttons.length;i++)
|
||||
{
|
||||
if(radiobuttons[i].value == method_id)
|
||||
{
|
||||
radiobuttons[i].checked = 1;
|
||||
}
|
||||
}
|
||||
var subtotal = parseFloat(document.getElementById('sub_price').innerHTML);
|
||||
var delivery = 0;
|
||||
if(document.getElementById('delivery_price_'+method_id))
|
||||
delivery = parseFloat(document.getElementById('delivery_price_'+method_id).innerHTML);
|
||||
total = subtotal+delivery;
|
||||
document.getElementById('subtotal_price').innerHTML = total;
|
||||
}*/
|
||||
</script>
|
||||
<script>
|
||||
//select_delivery_method(1);
|
||||
</script>
|
||||
<script>
|
||||
{literal}
|
||||
$(function() {
|
||||
/*$('.deliver li').click(function(){
|
||||
if ($(this).is(":nth-child(2)")) {
|
||||
$('.costs li:first-child').slideUp("slow");
|
||||
$('#payment_11').attr('checked', false);
|
||||
$('#payment_8').attr('checked', true);
|
||||
}
|
||||
else {
|
||||
$('.costs li:first-child').slideDown("slow");
|
||||
$('#payment_8').attr('checked', false);
|
||||
$('#payment_11').attr('checked', true);
|
||||
}
|
||||
})
|
||||
*/
|
||||
$('select#city2').change(function(){
|
||||
$("div#ajax").html("Загрузка...");
|
||||
$('select#city2').parents('li').find('label span.price').text("Загрузка...");
|
||||
var city2 = $( "select#city2 option:selected" ).val();
|
||||
$.ajax({
|
||||
data: {to: city2, weight: $('input[name="weight"]').val()},
|
||||
url: "ajax/ems.php",
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
var html = $(data);
|
||||
//var pr = parseInt(html.find('p span').text().replace(/\s+/g, ''));
|
||||
var pr = html.find('p span').text();
|
||||
$("div#ajax").html("");
|
||||
$("#ajax").append(data);
|
||||
$('select#city2').parents('li').find('label span.price').text(pr);
|
||||
calctotal();
|
||||
}
|
||||
});
|
||||
});
|
||||
function calctotal(){
|
||||
var total = parseInt($('table th.price > span').text().replace(/\s+/g, '')), radio;
|
||||
total = total?total:0;
|
||||
if (radio = $("input[type='radio']:checked")){
|
||||
var add = parseInt($(radio).parents('li').find('span.price').text().replace(/\s+/g, ''));
|
||||
//alert(add );
|
||||
add = (add)?(add):(0);
|
||||
total+=add;
|
||||
delivery_id = radio.val();
|
||||
if (delivery_id == 3) {
|
||||
$('#delivery_payment_' + delivery_id + ' span.ems_price').html(total);
|
||||
}
|
||||
}
|
||||
$('#total > span').text(total);
|
||||
}
|
||||
$('input[type=radio]').change(function() {
|
||||
calctotal();
|
||||
});
|
||||
calctotal();
|
||||
});
|
||||
|
||||
var __form = {};
|
||||
setInterval(function(){
|
||||
|
||||
var phone = $('._preorder input[name=phone]').val();
|
||||
var email = $('._preorder input[name=email]').val();
|
||||
if(phone.length < 4 && email.length < 4) return;
|
||||
|
||||
var form = $('._preorder').serializeArray(), _form = {};
|
||||
for(var i in form) _form[form[i].name] = form[i].value;
|
||||
$.each(_form, function(k, v){
|
||||
if(typeof __form[k] != 'undefined' && __form[k] == v) return;
|
||||
__form = _form;
|
||||
$.post('/ajax/orderTrack.php', _form );
|
||||
return false;
|
||||
});
|
||||
|
||||
}, 2000);
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
$('.remove-from-cart').click(function(e){
|
||||
e.preventDefault();
|
||||
var id = $(this).attr('data-id');
|
||||
var href = $(this).attr('href');
|
||||
dataLayer.push({
|
||||
"ecommerce": {
|
||||
"remove": {
|
||||
"products": [eCommerceFindProductRemove(id, $.yEcommerce)]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.location.href = href;
|
||||
});
|
||||
|
||||
|
||||
function eCommerceFindProductRemove(id, products){
|
||||
var res = {};
|
||||
$.each(products, function(k, item){ if(item.id == id) res = item });
|
||||
return {
|
||||
id: id,
|
||||
name: res.product && res.product.name ? res.product.name : res.name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
31
design/carheart/html/cart_informer.tpl
Normal file
31
design/carheart/html/cart_informer.tpl
Normal file
@@ -0,0 +1,31 @@
|
||||
{* Информера корзины (отдаётся аяксом) *}
|
||||
|
||||
{if $cart->total_products>0}
|
||||
<table id="top-cart-informer" class="notempty">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2" class="icon"><span class="glyphicon glyphicon-shopping-cart"></span></td>
|
||||
<td class="bsk_item">товаров: </td>
|
||||
<td class="bsk_value"><span id="b_count3">{$cart->total_products} {$cart->total_products|plural:'шт':'шт':'шт'}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bsk_item">на сумму: </td>
|
||||
<td class="bsk_value"><span id="b_sum3">{$cart->total_price|convert} {$currency->sign|escape}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{else}
|
||||
<table id="top-cart-informer" class="empty">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2" class="icon"><span class="glyphicon glyphicon-shopping-cart"></span></td>
|
||||
<td class="bsk_item">товаров: </td>
|
||||
<td class="bsk_value"><span id="b_count3">0 шт.</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bsk_item">на сумму: </td>
|
||||
<td class="bsk_value"><span id="b_sum3">0 руб.</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
11
design/carheart/html/cart_payment.tpl
Normal file
11
design/carheart/html/cart_payment.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{foreach $payment_methods as $payment_method}
|
||||
<li>
|
||||
<div class="checkbox">
|
||||
<input type=radio name=payment_method_id value='{$payment_method->id}' {if $payment_method@first}checked{/if} id=payment_{$payment_method->id}>
|
||||
</div>
|
||||
<h3><label for=payment_{$payment_method->id}> {$payment_method->name}{*, ê îïëàòå {$cart->total_price|convert:$payment_method->currency_id} {$all_currencies[$payment_method->currency_id]->sign}*}</label></h3>
|
||||
<div class="description">
|
||||
{$payment_method->description}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
37
design/carheart/html/category.tpl
Normal file
37
design/carheart/html/category.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{if $category->id != 488 && $category->id != 556}
|
||||
{if $category->subcategories}
|
||||
<div class="categories row">
|
||||
{foreach from=$category->subcategories item=c}
|
||||
{* Показываем только видимые категории *}
|
||||
{if $c->visible && $c->menu}
|
||||
<div class="category col-sm-4 col-xs-6">
|
||||
<div class="category-image">
|
||||
<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">
|
||||
{if $c->image}
|
||||
<img class="img-thumbnail" src="/{$config->categories_images_dir}{$c->image}?v=2" alt="{$c->name}">
|
||||
{else}
|
||||
<img src="/images/zag2.jpg" alt="">
|
||||
{/if}
|
||||
</a></div>
|
||||
<div class="category-name">
|
||||
<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">{$c->name}</a>
|
||||
<div class="category_anons">{$c->anons}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="brands row">
|
||||
{foreach from=$category->subcategories item=c}
|
||||
{if $c->visible && $c->menu}
|
||||
<div class="brand col-sm-2 col-xs-4" {if $category->id == 556} style="min-height:178px;"{/if}>
|
||||
<div class="brand-image">{if $c->image}<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}"><img class="img-thumbnail" src="/{$config->categories_images_dir}{$c->image}" alt="{$c->name}"></a>{/if}</div>
|
||||
<div class="brand-name"><a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">{$c->name}</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
12
design/carheart/html/category_like_brands.tpl
Normal file
12
design/carheart/html/category_like_brands.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{if $category->subcategories}
|
||||
<div class="brands row">
|
||||
{foreach from=$category->subcategories item=c}
|
||||
{if $c->visible && $c->menu}
|
||||
<div class="brand col-sm-2 col-xs-4">
|
||||
<div class="brand-image">{if $c->image}<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}"><img class="img-thumbnail" src="/{$config->categories_images_dir}{$c->image}" alt="{$c->name}"></a>{/if}</div>
|
||||
<div class="brand-name"><a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">{$c->name}</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
55
design/carheart/html/contact_form_and_social.tpl
Normal file
55
design/carheart/html/contact_form_and_social.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
<div class="h4">Сервис на карте</div>
|
||||
<div class="row mb">
|
||||
<div class="col-sm-9">map here</div>
|
||||
|
||||
<div class="col-sm-3"><div class="pull-right"><img alt="" src="/files/uploads/ch-logo1.png" />
|
||||
<div class="text-center"><span style="font-size:16px;"><span style="color: rgb(255, 255, 255);">ул. Победы Коммунизма д. 1</span></span></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="social-and-form row">
|
||||
<div class="col-sm-4 vk">
|
||||
<div class="h3">Мы в социальных сетях</div>
|
||||
{* <div id="vk_groups"></div> *}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="h3" id="chRequestFormHeader">Оставьте заявку</div>
|
||||
<div class="well">
|
||||
<form id="chRequestForm" class="clearfix">
|
||||
<input type="text" class="hide" name="user" placeholder="user">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding-bottom: 4px;">Оставьте свой телефон или электронный адрес и мы свяжемся с Вами.</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="name" name="Имя" placeholder="Имя">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="tel" class="form-control" id="phone" name="Телефон" placeholder="Телефон" data-validation="phone">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="email" class="form-control" id="mail" name="E-mail" placeholder="E-mail" data-validation="email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<textarea id="message" name="Комментарии" class="form-control" style="height: 145px" placeholder="Комментарии"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" name="submit" onclick="yaCounter23568694.reachGoal('zayavka');" class="form-submit btn btn-danger btn-block">Оставить заявку</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="id" value="{$page->id}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{literal}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#chRequestForm').sendForm({'header' : '#chRequestFormHeader'});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
29
design/carheart/html/contact_form_inline.tpl
Normal file
29
design/carheart/html/contact_form_inline.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="contact-form well">
|
||||
<div class="col-xs-12 h3" id="chCallbackFormHeader">Оставьте заявку и мы перезвоним и уточним все детали</div>
|
||||
<form id="chCallbackForm2" class="clearfix">
|
||||
<input type="text" class="hide" name="user" placeholder="user">
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="sr-only"></label>
|
||||
<input type="text" class="form-control" name="Имя" placeholder="Имя">
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="sr-only"></label>
|
||||
<input type="text" class="form-control" name="Телефон" placeholder="Телефон *" data-validation="phone">
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="sr-only"></label>
|
||||
<input type="text" class="form-control" name="Марка и модель авто" placeholder="Марка и модель авто">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" name="submit" onclick="yaCounter23568694.reachGoal('zayavka');" class="form-submit btn btn-danger btn-block">Оставить заявку</button>
|
||||
</div>
|
||||
<input type="hidden" name="id" value="{$page->id}">
|
||||
</form>
|
||||
</div>
|
||||
{literal}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#chCallbackForm2').sendForm({'header' : '#chCallbackFormHeader'});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
187
design/carheart/html/email_order.tpl
Normal file
187
design/carheart/html/email_order.tpl
Normal file
@@ -0,0 +1,187 @@
|
||||
{* Шаблон письма пользователю о заказе *}
|
||||
|
||||
{$subject = "Заказ №`$order->id`" scope=parent}
|
||||
<h1 style="font-weight:normal;font-family:arial;">
|
||||
<a href="{$config->root_url}/order/{$order->url}">Ваш заказ №{$order->id}</a>
|
||||
на сумму {$order->total_price|convert:$currency->id} {$currency->sign}
|
||||
{if $order->paid == 1}оплачен{else}еще не оплачен{/if},
|
||||
{if $order->status == 0}ждет обработки{elseif $order->status == 1}в обработке{elseif $order->status == 2}выполнен{/if}
|
||||
</h1>
|
||||
{if $additional_message}
|
||||
{$additional_message}
|
||||
{/if}
|
||||
<table cellpadding="6" cellspacing="0" style="border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="padding:6px; width:170; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Статус
|
||||
</td>
|
||||
<td style="padding:6px; width:330; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{if $order->status == 0}
|
||||
ждет обработки
|
||||
{elseif $order->status == 1}
|
||||
в обработке
|
||||
{elseif $order->status == 2}
|
||||
выполнен
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:6px; width:170; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Оплата
|
||||
</td>
|
||||
<td style="padding:6px; width:330; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{if $order->paid == 1}
|
||||
<font color="green">оплачен</font>
|
||||
{else}
|
||||
не оплачен
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if $order->name}
|
||||
<tr>
|
||||
<td style="padding:6px; width:170; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Имя, фамилия
|
||||
</td>
|
||||
<td style="padding:6px; width:330; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->name|escape} {$order->name2|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->email}
|
||||
<tr>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Email
|
||||
</td>
|
||||
<td style="padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->email|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->phone}
|
||||
<tr>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Телефон
|
||||
</td>
|
||||
<td style="padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->phone|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->address}
|
||||
<tr>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Страна, Регион, Город, адрес доставки,индекс
|
||||
</td>
|
||||
<td style="padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->country|escape}, {$order->region|escape}, {$order->city|escape}, {$order->address|escape}, {$order->indx|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->comment}
|
||||
<tr>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Комментарий
|
||||
</td>
|
||||
<td style="padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->comment|escape|nl2br}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Дата
|
||||
</td>
|
||||
<td style="padding:6px; width:170; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->date|date} {$order->date|time}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 style="font-weight:normal;font-family:arial;">Вы заказали:</h1>
|
||||
|
||||
<table cellpadding="6" cellspacing="0" style="border-collapse: collapse;">
|
||||
|
||||
{foreach name=purchases from=$purchases item=purchase}
|
||||
<tr>
|
||||
<td align="center" style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$image = $purchase->product->images[0]}
|
||||
<a href="{$config->root_url}/products/{$purchase->product->url}"><img border="0" src="{$image->filename|resize:50:50}"></a>
|
||||
</td>
|
||||
<td style="padding:6px; width:250; padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
<a href="{$config->root_url}/products/{$purchase->product->url}">{$purchase->product_name}</a>
|
||||
{$purchase->variant_name}
|
||||
{if $order->paid && $purchase->variant->attachment}
|
||||
<br>
|
||||
<a href="{$config->root_url}/order/{$order->url}/{$purchase->variant->attachment}"><font color="green">Скачать {$purchase->variant->attachment}</font></a>
|
||||
{/if}
|
||||
<div class="features">
|
||||
{foreach from=$purchase->options item=opt key=ok}
|
||||
{assign var=f value=$features[$ok]}
|
||||
<p>
|
||||
<label>{$f->name} </label>
|
||||
<span>
|
||||
{$opt}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td align=right style="padding:6px; text-align:right; width:150; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$purchase->amount} {$settings->units} × {$purchase->price|convert:$currency->id} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{if $order->discount}
|
||||
<tr>
|
||||
<td style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;"></td>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Скидка
|
||||
</td>
|
||||
<td align=right style="padding:6px; text-align:right; width:170; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->discount} %
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $order->coupon_discount>0}
|
||||
<tr>
|
||||
<td style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;"></td>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
Купон {$order->coupon_code}
|
||||
</td>
|
||||
<td align=right style="padding:6px; text-align:right; width:170; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
−{$order->coupon_discount} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $delivery && !$order->separate_delivery}
|
||||
<tr>
|
||||
<td style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;"></td>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$delivery->name}
|
||||
</td>
|
||||
<td align="right" style="padding:6px; text-align:right; width:170; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;">
|
||||
{$order->delivery_price|convert:$currency->id} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<td style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;"></td>
|
||||
<td style="padding:6px; background-color:#f0f0f0; border:1px solid #e0e0e0;font-family:arial;font-weight:bold;">
|
||||
Итого
|
||||
</td>
|
||||
<td align="right" style="padding:6px; text-align:right; width:170; background-color:#ffffff; border:1px solid #e0e0e0;font-family:arial;font-weight:bold;">
|
||||
{$order->total_price|convert:$currency->id} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
Вы всегда можете проверить состояние заказа по ссылке:<br>
|
||||
<a href="{$config->root_url}/order/{$order->url}">{$config->root_url}/order/{$order->url}</a>
|
||||
<br>
|
||||
13
design/carheart/html/email_password_remind.tpl
Normal file
13
design/carheart/html/email_password_remind.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{* Письмо восстановления пароля *}
|
||||
|
||||
{$subject = 'Новый пароль' scope=parent}
|
||||
<html>
|
||||
<body>
|
||||
<p>{$user->name|escape}, на сайте <a href='http://{$config->root_url}/'>{$settings->site_name}</a> был сделан запрос на восстановление вашего пароля.</p>
|
||||
<p>Вы можете изменить пароль, перейдя по следующей ссылке:</p>
|
||||
<p><a href='{$config->root_url}/user/password_remind/{$code}'>Изменить пароль</a></p>
|
||||
<p>Эта ссылка действует в течение нескольких минут.</p>
|
||||
<p>Если это письмо пришло вам по ошибке, проигнорируйте его.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
48
design/carheart/html/feedback.tpl
Normal file
48
design/carheart/html/feedback.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
{* Страница с формой обратной связи *}
|
||||
<h1>{$page->name|escape}</h1>
|
||||
{$page->body}
|
||||
<div class="title">Обратная связь</div>
|
||||
<div class="well">
|
||||
{if $message_sent}
|
||||
{$name|escape}, ваше сообщение отправлено.
|
||||
{else}
|
||||
<form class="form feedback_form form-horizontal" method="post">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error=='captcha'}
|
||||
Неверно введена капча
|
||||
{elseif $error=='empty_name'}
|
||||
Введите имя
|
||||
{elseif $error=='empty_email'}
|
||||
Введите email
|
||||
{elseif $error=='empty_text'}
|
||||
Введите сообщение
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Имя</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" data-format=".+" data-notice="Введите имя" value="{$name|escape}" name="name" maxlength="255" type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" data-format="email" data-notice="Введите email" value="{$email|escape}" name="email" maxlength="255" type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-2 control-label">Сообщение</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" data-format=".+" data-notice="Введите сообщение" value="{$message|escape}" name="message">{$message|escape}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"><div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></div> </div>
|
||||
<div class="col-sm-2"><input class="form-control" class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" format="\d\d\d\d" notice="Введите капчу"/></div>
|
||||
</div>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="feedback" value="Отправить" />
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
41
design/carheart/html/feedback/edit.tpl
Normal file
41
design/carheart/html/feedback/edit.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
<h2>Редактировать отзыв</h2>
|
||||
<form id="f_form2">
|
||||
<div class="form-group">
|
||||
<label>Ваше имя*</label>
|
||||
<input type="text" class="form-control" name="name" value="{$feed_row->name}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="text" class="form-control" name="email" value="{$feed_row->email}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Комментарий*</label>
|
||||
<textarea class="form-control" name="text">{$feed_row->text}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images2">
|
||||
{foreach from=$feedback_imgs[$feed_row->id] item=row4 key=i}
|
||||
<div class="f-preview" data-id="{$i}">
|
||||
<a href="/feedback/images/{$row4->name}" class="fancybox" rel="gal{$row4->id}"><img src="{$row4->img}"></a>
|
||||
<div><button data-id="{$i}" data-bid="{$row4->id}" class="btn btn-danger btn-xs f-image-remove" type="button"><b>X</b></button></div>
|
||||
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-success fileinput-btn" ><i class="fa fa-plus"> Добавить фото</i>
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_name_error2" style="display: none;">Укажите ваше имя</div>
|
||||
<div class="alert alert-danger f-error" id="f_text_error2" style="display: none;">введите текст комментария</div>
|
||||
|
||||
<button type="submit" class="btn btn-default" id="f_submit_btn2"><i class="fa fa-check"></i> Отправить</button>
|
||||
<p class="help-block">*Обязательное поле</p>
|
||||
<input type="hidden" name="id" value="{$feed_row->id}">
|
||||
<input type="hidden" name="url" value="edit_save">
|
||||
</form>
|
||||
34
design/carheart/html/feedback/form.tpl
Normal file
34
design/carheart/html/feedback/form.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
<div class="h3" id="set_feedback">Оставить отзыв</div>
|
||||
<form id="f_form">
|
||||
<div class="form-group">
|
||||
<label>Ваше имя*</label>
|
||||
<input type="text" class="form-control" name="name">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="text" class="form-control" name="email">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Комментарий*</label>
|
||||
<textarea class="form-control" name="text"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images"></div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-default fileinput-btn"><i class="fa fa-plus"></i> Добавить фото
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_name_error" style="display: none;">Укажите ваше имя</div>
|
||||
<div class="alert alert-danger f-error" id="f_text_error" style="display: none;">введите текст комментария (не меньше 10 символов)</div>
|
||||
|
||||
<button type="submit" class="btn btn-danger" id="f_submit_btn"><i class="fa fa-check"></i> Отправить</button>
|
||||
<p class="help-block">Поля со * - обязательны</p>
|
||||
<input type="hidden" name="parent_id" value="0">
|
||||
</form>
|
||||
|
||||
<div class="alert alert-success" id="f_success" style="display: none;">Спасибо за Ваше мнение. Ваш отзыв будет опубликован после проверки модератором.</div>
|
||||
77
design/carheart/html/feedback/main.tpl
Normal file
77
design/carheart/html/feedback/main.tpl
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<div style="margin: 10px 0 10px 0;"><a class="btn btn-danger" href="/otzyvy/#f_form">Оставить отзыв</a></div>
|
||||
|
||||
{foreach from=$feedback item=row}
|
||||
|
||||
<div class="well {$row->style} feed_{$row->id}" style="margin-bottom: 4px;">
|
||||
|
||||
|
||||
<div class="h4" style="margin-bottom: 5px;">
|
||||
<span><span>{$row->name}</span></span>
|
||||
<span style="font-size: 11px;">{$row->date}</span>
|
||||
{if $smarty.session.admin == 'admin' && $row->email}<span style="font-size:12px"> [{$row->email}]</span>{/if}
|
||||
</div>
|
||||
|
||||
<span>{$row->text}</span>
|
||||
|
||||
<div>
|
||||
{foreach from=$feedback_imgs[$row->id] item=row2}
|
||||
<div class="f-preview" style="margin-top: 5px;">
|
||||
<a href="/feedback/images/{$row2->name}" class="fancybox" data-rel="gal{$row->id}"><img alt="" src="{$row2->img}"></a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
|
||||
{if $smarty.session.admin == 'admin'}
|
||||
<br>
|
||||
<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?edit={$row->id}">Изменить</a>
|
||||
<a class="btn btn-warning btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?reply={$row->id}">Ответить</a>
|
||||
{if $row->active == 0}
|
||||
<button class="btn btn-success btn-mini f_activate" style="padding: 3px;font-size: 11px;" data-id="{$row->id}">Включить</button>
|
||||
{/if}
|
||||
<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="{$row->id}">Удалить</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
{foreach from=$feedback_replies item=row3}
|
||||
{if $row3->parent_id == $row->id}
|
||||
<div class="well feed_{$row3->id}" style="margin-bottom: 4px;margin-left:60px;">
|
||||
|
||||
|
||||
<div class="h4" style="margin-bottom: 5px;">
|
||||
<span><span>{$row3->name}</span></span>
|
||||
<span style="font-size: 11px;">{$row3->date}</span>
|
||||
</div>
|
||||
|
||||
<span>{$row3->text}</span>
|
||||
|
||||
<div>
|
||||
{foreach from=$feedback_imgs[$row3->id] item=row4}
|
||||
<div class="f-preview" style="margin-top: 5px;">
|
||||
<a href="/feedback/images/{$row4->name}" class="fancybox" data-rel="gal{$row3->id}"><img src="{$row4->img}" alt=""></a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
|
||||
{if $smarty.session.admin == 'admin'}
|
||||
<br>
|
||||
<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?edit={$row3->id}">Изменить</a>
|
||||
<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="{$row3->id}">Удалить</button>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{/foreach}
|
||||
|
||||
{include file='pagination_new.tpl'}
|
||||
|
||||
{include file='feedback/form.tpl'}
|
||||
|
||||
25
design/carheart/html/feedback/reply.tpl
Normal file
25
design/carheart/html/feedback/reply.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
<h2>Ответ на отзыв</h2>
|
||||
<i>{$feed_row->name}</i><br>{$feed_row->text}
|
||||
<form id="f_form2" style="margin-top: 20px;">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Комментарий*</label>
|
||||
<textarea class="form-control" name="text"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images2"></div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-success fileinput-btn" ><i class="fa fa-plus"> Добавить фото</i>
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_text_error2" style="display: none;">введите текст комментария</div>
|
||||
|
||||
<button type="submit" class="btn btn-default" id="f_submit_btn2"><i class="fa fa-check"></i> Отправить</button>
|
||||
<p class="help-block">*Обязательное поле</p>
|
||||
<input type="hidden" name="parent_id" value="{$feed_row->id}">
|
||||
<input type="hidden" name="name" value="Ответ">
|
||||
<input type="hidden" name="email" value="">
|
||||
<input type="hidden" name="url" value="save_reply">
|
||||
</form>
|
||||
24
design/carheart/html/graphic_block_services.tpl
Normal file
24
design/carheart/html/graphic_block_services.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="h3">Преимущества работы с нами</div>
|
||||
<div class="service-icons row">
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i1"></span>
|
||||
<div class="icon-title">Гарантия на работы</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i2"></span>
|
||||
<div class="icon-title">Гарантия на герметичность фар</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i3"></span>
|
||||
<div class="icon-title">Сертификаты РСТ</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i4"></span>
|
||||
<div class="icon-title">Индивидуальные решения</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i5"></span>
|
||||
<div class="icon-title">Более 5 лет работы с оптикой</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i6"></span>
|
||||
<div class="icon-title">Маркировка фар под ксенон</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2"><span class="sprite i7"></span>
|
||||
<div class="icon-title">Тюнинг авто любого направления</div>
|
||||
</div>
|
||||
</div>
|
||||
97
design/carheart/html/hits.tpl
Normal file
97
design/carheart/html/hits.tpl
Normal file
@@ -0,0 +1,97 @@
|
||||
{* Для того чтобы обернуть центральный блок в шаблон, отличный от index.tpl *}
|
||||
{* Укажите нужный шаблон строкой ниже. Это работает и для других модулей *}
|
||||
{$wrapper = 'index.tpl' scope=parent}
|
||||
|
||||
{* Заголовок страницы *}
|
||||
|
||||
|
||||
{* Тело страницы *}
|
||||
{$page->body}
|
||||
|
||||
{if $products}
|
||||
<!-- Список товаров-->
|
||||
<ul id="catalog">
|
||||
|
||||
{foreach $products as $product}
|
||||
<!-- Товар-->
|
||||
<li class="product">
|
||||
|
||||
<!-- Фото товара -->
|
||||
{if $product->image}
|
||||
<div class="image">
|
||||
<a href="/products/{$product->url}/"><img src="{$product->image->filename|resize:200:200}" alt="{$product->name|escape}"/></a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Фото товара (The End) -->
|
||||
|
||||
<!-- Название товара -->
|
||||
<h3><a product_id="{$product->id}" href="/products/{$product->url}/">{$product->name|escape}</a></h3>
|
||||
<!-- Название товара (The End) -->
|
||||
|
||||
<!-- Описание товара -->
|
||||
<div>{$product->annotation}</div>
|
||||
<!-- Описание товара (The End) -->
|
||||
|
||||
{if $product->variants|count > 0}
|
||||
<!-- Цена и заказ товара -->
|
||||
<form class="cart" method="get" action="cart">
|
||||
|
||||
<!-- Выбор варианта товара -->
|
||||
{* Не показывать выбор варианта, если он один и без названия *}
|
||||
<select name="variant" {if $product->variants|count==1 && !$product->variant->name}style='display:none;'{/if}>
|
||||
{foreach $product->variants as $v}
|
||||
<option value="{$v->id}" {if $v->compare_price > 0}compare_price="{$v->compare_price|convert}"{/if} price="{$v->price|convert}">
|
||||
{$v->name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<!-- Выбор варианта товара (The End) -->
|
||||
|
||||
<!-- Цена товара -->
|
||||
<div class="price">
|
||||
<strike>
|
||||
{if $product->variant->compare_price > 0}
|
||||
{$product->variant->compare_price|convert}
|
||||
{/if}
|
||||
</strike>
|
||||
<span>{$product->variant->price|convert}</span>
|
||||
<i>{$currency->sign|escape}</i>
|
||||
</div>
|
||||
<!-- Цена товара (The End) -->
|
||||
|
||||
<!-- В корзину -->
|
||||
<input type="submit" class="add_to_cart" value="В корзину" added_text="Добавлено"/>
|
||||
<!-- В корзину (The End) -->
|
||||
|
||||
</form>
|
||||
<!-- Цена и заказ товара (The End)-->
|
||||
{/if}
|
||||
|
||||
</li>
|
||||
<!-- Товар (The End)-->
|
||||
{/foreach}
|
||||
|
||||
</ul>
|
||||
{/if}
|
||||
<!--Каталог товаров (The End)-->
|
||||
|
||||
<!-- Аяксовая корзина -->
|
||||
<script src="js/ajax-cart.js"></script>
|
||||
|
||||
<script>
|
||||
{literal}
|
||||
$(function() {
|
||||
// Выбор вариантов
|
||||
$('select[name=variant]').change(function() {
|
||||
price = $(this).find('option:selected').attr('price');
|
||||
compare_price = '';
|
||||
if(typeof $(this).find('option:selected').attr('compare_price') == 'string')
|
||||
compare_price = $(this).find('option:selected').attr('compare_price');
|
||||
$(this).find('option:selected').attr('compare_price');
|
||||
$(this).closest('form').find('span').html(price);
|
||||
$(this).closest('form').find('strike').html(compare_price);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
453
design/carheart/html/index.tpl
Normal file
453
design/carheart/html/index.tpl
Normal file
@@ -0,0 +1,453 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
{if !$additional_title}{assign var="additional_title" value=""}{/if}
|
||||
|
||||
<base href="https://atomicgarage.ru/">
|
||||
<title>{$meta_title|escape}{if !$no_additional_title}{$additional_title}{/if}{if $smarty.get.page > 1} | страница № {$smarty.get.page}{/if}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
|
||||
<meta name="description" content="{$meta_description|escape}{if $smarty.get.page > 1} - страница {$smarty.get.page}{/if}" >
|
||||
<meta name="keywords" content="{$meta_keywords|escape}{if $smarty.get.page > 1}, страница {$smarty.get.page}{/if}" >
|
||||
{*<link rel="apple-touch-icon" href="/design/{$settings->theme|escape}/favicon.png">
|
||||
<link rel="icon" href="/design/{$settings->theme|escape}/favicon.png"> *}
|
||||
<link rel="icon" href="/design/{$settings->theme|escape}/images/ch-logo.png">
|
||||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/slate/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic">
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Russo+One&subset=latin,cyrillic">
|
||||
<link rel="stylesheet" type="text/css" href="/design/{$settings->theme|escape}/css/styles.css?{uniqid()}">
|
||||
{if $smarty.session.admin == 'admin'}
|
||||
<link rel="stylesheet" type="text/css" href="/js/admintooltip/css/admintooltip.css" >
|
||||
{/if}
|
||||
{if $detect->isMobile()}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="/design/{$settings->theme|escape}/css/mobile.css?{uniqid()}">
|
||||
{else}
|
||||
<link rel="stylesheet" type="text/css" href="/design/{$settings->theme|escape}/css/desktop.css?{uniqid()}">
|
||||
{/if}
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
|
||||
|
||||
<script src="/sovetnik-killer.js?v=5" type="text/javascript"></script>
|
||||
{if $rel_canonical}<link rel="canonical" href="{$rel_canonical}"/>{/if}
|
||||
</head>
|
||||
<body class="{if $detect->isMobile()}{if $detect->isTablet()}mobile tablet{else}mobile{/if}{else}desktop{/if}">
|
||||
<div class="container wrapper">
|
||||
<header>
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-xs-4"> <a href="/" class="logo"><img src="/design/{$settings->theme|escape}/images/ch-logo.png" alt="logo"></a> </div>
|
||||
<div class="col-sm-4 col-xs-3">
|
||||
<div class="top-text1 chs">Визуальный тюнинг авто</div>
|
||||
{*<div class="top-text2 hidden-xs">Продажа и профессиональная установка биксеноновых линз, ходовых огней, LED ПТФ и другой продукции. Тюнинг фар, установка линз любой сложности.
|
||||
<div class="top-text3"><a href="/dostavka/">Доставка по всей России и СНГ</a></div>
|
||||
</div>*}
|
||||
</div>
|
||||
<div id="hidden-cart" class="col-sm-3 hidden-xs">
|
||||
<div id="top-shopcart" class="cart">
|
||||
<div class="cart-links">
|
||||
{if $user}
|
||||
<span id="username"><a href="/user">{$user->name}</a>{if $group->discount>0}, ваша скидка — {$group->discount}%{/if} </span> | <a id="logout" href="/user/logout/">выйти</a>
|
||||
{else}
|
||||
<!-- noindex --><a rel="nofollow" href="/user/login/">вход</a> | <a rel="nofollow" id="register" href="/user/register/">регистрация</a><!-- /noindex -->
|
||||
{/if}
|
||||
</div>
|
||||
<div class="cart-info">
|
||||
<div onclick="javascript: window.location.href='/cart/';" style="cursor: pointer;" title="Оформить покупки">
|
||||
<div id="basket_ajax">
|
||||
<div id="cart_informer">
|
||||
{* Обновляемая аяксом корзина должна быть в отдельном файле *}
|
||||
{include file='cart_informer.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 col-xs-5 text-right">
|
||||
<div class="city">Санкт-Петербург</div>
|
||||
<div class="phone">+7 (921) 0000000</div>
|
||||
<div class="phone">+7 (921) 00000000</div>
|
||||
<div class="link "><a href="javascript:void(0)" class="callme_viewform">обратный звонок</a></div>
|
||||
<div class="email hidden-xs"><a class="w" href="mailto:info@atomicgarage.ru">info@atomicgarage.ru</a></div>
|
||||
<form action="/search/" style="padding:10px 0px;" class="hidden-xs" method="get">
|
||||
|
||||
<div class="input-group top-serch">
|
||||
<input type="text" class="form-control input-sm input_search" name="keyword" value="{$keyword|escape}" placeholder="">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-danger btn-sm" type="submit"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
{*<a class="navbar-brand" href="/"><span class="glyphicon glyphicon-home"></span></a>*}
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="/">Главная</a></li>
|
||||
|
||||
{foreach name=page from=$pages item=p}
|
||||
{* Выводим только страницы из первого меню *}
|
||||
{if $p->menu_id == 1 and $p->name|escape != "Главная"}
|
||||
|
||||
|
||||
<li{if $page && $page->id == $p->id} class="active"{/if}>
|
||||
<a href="/{$p->url}{if ($p->url != '')}/{/if}">{$p->name|escape}</a>
|
||||
</li>
|
||||
|
||||
{if $p->id == 28}
|
||||
<li{if $page->id == 86} class="active"{/if}>
|
||||
<a href="/catalog/">Интернет-магазин</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $detect->isMobile()}<li><a href="https://atomicgarage.ru/actions/">Акции и скидки</a></li>{/if}
|
||||
</ul>
|
||||
{*<!--
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<form action="products?" style="width:185px; padding:10px 0px;">
|
||||
<input type="hidden" name="{if $keyword}{$keyword}{else}_keyword{/if}" value="search">
|
||||
<input type="hidden" name="keyword" value="">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm input_search" name="keyword" value="{$keyword|escape}" placeholder="">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-danger btn-sm" type="submit"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span> </div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
-->*}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{* MOBILE *}
|
||||
{if $detect->isMobile() && !$detect->isTablet()}
|
||||
|
||||
{if $services_view}
|
||||
<div class="sidebar clearfix">
|
||||
{include file='sidebar_catalog.tpl'}
|
||||
</div>
|
||||
<div class="content clearfix">
|
||||
{include file='services.tpl'}
|
||||
</div>
|
||||
{else}
|
||||
<div class="sidebar clearfix">
|
||||
{include file='sidebar_catalog.tpl'}
|
||||
</div>
|
||||
<div class="content clearfix">
|
||||
{$content}
|
||||
{include file='banner/foot.banner.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* / MOBILE *}
|
||||
{else}
|
||||
{* DESKTOP *}
|
||||
|
||||
{if $services_view}
|
||||
{include file='services.tpl'}
|
||||
{else}
|
||||
<div class="row">
|
||||
<div class="col-sm-3 sidebar">
|
||||
{include file='sidebar_catalog.tpl'}
|
||||
<div class="widgets">
|
||||
<div class="banner-alert">
|
||||
{include file='banner/left.banner.tpl'}
|
||||
</div>
|
||||
{*<div class="banner-alert" style="margin-bottom: 30px">
|
||||
<img src="/images/aurobanner.jpg" style="width:100%; height:auto;">
|
||||
</div> *}
|
||||
{*<div class="banner-alert">
|
||||
<img src="/images/ba.png" style="width:100%; height:auto;">
|
||||
</div>*}
|
||||
<div class="button-set">
|
||||
<p><a href="/brands/" class="btn btn-danger btn-lg btn-block btn-sidebar">товары по маркам <span class="b1"></span></a></p>
|
||||
{*<p><a href="/podbor-avtolamp/" class="btn btn-danger btn-lg btn-block">подбор автоламп <span class="b2"></span></a></p>*}
|
||||
<p><a href="/actions/" class="btn btn-danger btn-lg btn-block">акции и скидки <span class="b3"></span></a></p>
|
||||
<p><a href="https://www.drive2.ru/" target="_blank" rel="nofollow" class="btn btn-danger btn-lg btn-block">drive2.ru</a></p>
|
||||
|
||||
<!--<a href="https://www.youtube.com/channel/UCBYgdRpMO5brgjEf4W8dqcg/feed?view_as=public" rel="nofollow" target="_blank" class="btn btn-danger btn-lg btn-block">YouTube</a>-->
|
||||
<ul class="social-icons list-inline">
|
||||
<li class="btn-danger"><a rel="nofollow" href="https://instagram.com/atomicgarage.ru/" target="_blank"><i class="social-sm social-instagram"></i></a></li>
|
||||
<li class="btn-danger"><a rel="nofollow" href="https://www.youtube.com/" target="_blank"><i class="social-sm social-youtube"></i></a></li>
|
||||
<li class="btn-danger"><a rel="nofollow" href="https://vk.com/" target="_blank"><i class="social-sm social-vk"></i></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{*
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title">Статьи</div>
|
||||
</div>
|
||||
<div class="panel-body news-widget">
|
||||
|
||||
{get_posts var=last_posts limit=7}
|
||||
{if $last_posts}
|
||||
{foreach $last_posts as $post}
|
||||
<div class="news-block" data-post="{$post->id}"><!--<div class="news-date">{$post->date|date|date_format:"%e %m %Y":"":"rus"}</div>--> <a class="news-title" href="/tehinfo/{$post->url}/">{$post->name|escape}</a></div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="panel-footer"><a href="/tehinfo/">все статьи</a></div>
|
||||
</div> *}
|
||||
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title">ВКонтакте</div>
|
||||
</div>
|
||||
<div class="panel-body vk">
|
||||
<!-- VK Widget -->
|
||||
{*<div id="vk_groups"></div>*}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<!-- content -->
|
||||
<div class="content">
|
||||
{*include file='sub_pages.tpl'*}
|
||||
{$content}
|
||||
{include file='banner/foot.banner.tpl'}
|
||||
</div>
|
||||
<!-- /content -->
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
{* DESKTOP *}
|
||||
<div class="push"></div>
|
||||
</div>
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 lh">
|
||||
<div itemscope itemtype="https://schema.org/Organization">
|
||||
<span class="mdh" itemprop="name">Магазин и Сервис</span>
|
||||
<span class="mdh" itemprop="description">Основное направление нашей деятельности — тюнинг автомобильной оптики любой сложности. Индивидуальный подход к каждому клиенту и широкий ассортимент предлагаемой продукции позволит разработать эксклюзивный проект для вашего автомобиля и реализовать любую Вашу идею. Интересующего Вас товара нет на сайте? Не беда — привезем под заказ! Находитесь в другом городе? Нам часто присылают детали на переделку. Мы любим свою работу и знаем, что хорошее отношение зачастую важнее денег.</span>
|
||||
<div class="title">Магазин / Сервис</div>
|
||||
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
||||
<p> г. <span itemprop="addressLocality">Санкт-Петербург</span>, <span itemprop="streetAddress">ул. Победы Коммунизма</span> <br>
|
||||
Режим работы: пн-вс 11:00-20:00<br>
|
||||
<span itemprop="telephone">+7 (921) 000000</span><br>
|
||||
<span itemprop="telephone">+7 (921) 00000</span><br>
|
||||
<a href="/contact/">карта проезда</a>
|
||||
</div>
|
||||
{*<div style="height: 80px"></div>*}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
<div class="title w">Информация</div>
|
||||
<p> <a href="/dostavka/">Способы доставки</a><br>
|
||||
<a href="/oplata/">Способы оплаты</a><br>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
<div class="title w">Служба поддержки</div>
|
||||
<p><a href="javascript:void(0)" class="callme_viewform">Связаться с нами</a><br>
|
||||
{*<a href="/info/">Сотрудничество</a><br>
|
||||
<a href="/garantiya/">Гарантия</a><br>
|
||||
<a href="/vozvrat-tovara/">Возврат товара</a> *}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
<div class="title w">Личный кабинет</div>
|
||||
<p><a href="/user/">Личный Кабинет</a><br>
|
||||
<a href="/user/">История заказов</a><br>
|
||||
<a href="/sitemap/">Карта сайта</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="hidden-xs">
|
||||
|
||||
{literal}
|
||||
|
||||
{/literal}
|
||||
|
||||
{if !$detect->isMobile()}
|
||||
{literal}
|
||||
|
||||
|
||||
{/literal}
|
||||
{/if}
|
||||
{literal}
|
||||
<!-- noindex -->
|
||||
<!-- Yandex.Metrika counter -->
|
||||
<script type="text/javascript">
|
||||
var yaParams = {};
|
||||
</script>
|
||||
|
||||
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
<!-- /noindex -->
|
||||
{literal}
|
||||
<!--VK-->
|
||||
|
||||
<!--VK-->
|
||||
{/literal}
|
||||
<!-- noindex -->
|
||||
|
||||
|
||||
<!-- /noindex -->
|
||||
{/literal}
|
||||
|
||||
{*}<script type="text/javascript" src="//yastatic.net/share/share.js" charset="utf-8"></script>
|
||||
<div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="link" data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir,gplus"></div>
|
||||
*}
|
||||
|
||||
</div>
|
||||
|
||||
{if $detect->isMobile()}
|
||||
<ul class="list-inline">
|
||||
<li><a rel="nofollow" href="https://instagram.com/atomicgarage.ru/" target="_blank"><i class="social-sm social-instagram"></i></a></li>
|
||||
<li><a rel="nofollow" href="https://www.youtube.com/channel/UCBYgdRpMO5brgjEf4W8dqcg" target="_blank"><i class="social-sm social-youtube"></i></a></li>
|
||||
<li><a rel="nofollow" href="https://vk.com/carheart" target="_blank"><i class="social-sm social-vk"></i></a></li>
|
||||
<li style="vertical-align: top"><a rel="nofollow" href="https://www.drive2.ru/users/carheart/" target="_blank" class="btn btn-danger btn-sm">Drive2.ru</a></li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-8"></div>
|
||||
<div class="col-sm-4">
|
||||
<div class="copyright text-right">© <span>Site</span> - Тюнинг Автомобильной оптики</div>
|
||||
<div class="eto-design text-right">Создание и продвижение сайта: <a href="https://www.eto-design.ru" target="_blank" rel="nofollow">студия это дизайн</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="back-top"><span id="#top"></span></div>
|
||||
</footer>
|
||||
<link rel="stylesheet" property="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.css" media="screen">
|
||||
<link rel="stylesheet" property="stylesheet" type="text/css" href="/design/{$settings->theme|escape}/js/sm.slider/smslider.css" media="screen">
|
||||
<link rel="stylesheet" property="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" property="stylesheet" type="text/css" href="/js/baloon/css/baloon.css">
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.js"></script>
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/jquery.flexslider-min.js"></script>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
|
||||
$('.content table:not("form table")').removeAttr('style').removeAttr('class').removeAttr('border').removeAttr('cellpadding').removeAttr('cellspacing').removeAttr('align').addClass('table table-striped table-bordered');
|
||||
|
||||
$(function() {
|
||||
$('.flexslider').flexslider();
|
||||
$('.flex-control-nav').addClass('pagination pagination-sm');
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$("#back-top").hide();
|
||||
// fade in #back-top
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 100)
|
||||
{
|
||||
$('#back-top').fadeIn();
|
||||
if ($('#bas_items').text() != "пока нет товаров")
|
||||
{
|
||||
$('#xcart').addClass("flatrow");
|
||||
$('.tableFloatingHeader').css('top','50px');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#back-top').fadeOut();
|
||||
$('#xcart').removeClass("flatrow");
|
||||
$('.tableFloatingHeader').css('top','0px');
|
||||
}
|
||||
});
|
||||
// scroll body to 0px on click
|
||||
$('#back-top span').click(function () {
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 800);
|
||||
});
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/extra.js?v=21"></script>
|
||||
<script type="text/javascript" src="//vk.com/js/api/openapi.js?115"></script>
|
||||
<script type="text/javascript" src="/js/ctrlnavigate.js"></script>
|
||||
<!--<script type="text/javascript" src="/design/{$settings->theme|escape}/js/jquery-ui.min.js"></script>-->
|
||||
<script type="text/javascript" src="/feedback/js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/ajax_cart.js"></script>
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/shopcart-view.js?{uniqid()}"></script>
|
||||
<script type="text/javascript" src="/js/baloon/js/baloon.js"></script>
|
||||
{*if !$detect->isMobile()}
|
||||
<script type="text/javascript" src="/callme/js/callme.js"></script>
|
||||
{/if*}
|
||||
|
||||
{*<script type="text/javascript" src="/callme/js/callme.js"></script>*}
|
||||
|
||||
{*
|
||||
<link property="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script>
|
||||
*}
|
||||
|
||||
<script type="text/javascript" src="/js/autocomplete/jquery.autocomplete-min.js"></script>
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/sm.slider/jquery.smslider.min.js"></script>
|
||||
{if $smarty.session.admin == 'admin'}
|
||||
<script type="text/javascript" src="/js/admintooltip/admintooltip.js"></script>
|
||||
{/if}
|
||||
{if $detect->isMobile() && !$detect->isTablet()}
|
||||
<script type="text/javascript" src="/design/{$settings->theme|escape}/js/collapse-panel.js?v=4"></script>
|
||||
{/if}
|
||||
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$('a.fancybox').each(function(){
|
||||
var $this = $(this);
|
||||
if(typeof $this.attr('data-rel') != 'undefined') $this.attr('rel', $this.attr('data-rel'));
|
||||
})
|
||||
|
||||
$('.fancybox').fancybox({
|
||||
helpers: {
|
||||
overlay: {
|
||||
locked: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//console.log(Notification);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/feedback/js/uploader.js"></script>
|
||||
<script type="text/javascript" src="/feedback/js/feedback.js"></script>
|
||||
|
||||
<link rel="stylesheet" property="stylesheet" type="text/css" href="/design/carheart/js/bxslider/jquery.bxslider.min.css">
|
||||
<script src="/design/carheart/js/bxslider/jquery.bxslider.min.js"></script>
|
||||
|
||||
{/literal}
|
||||
{if $smarty.session.admin == 'admin'}<script type="text/javascript" src="/feedback/feedback_admin.js"></script>{/if}
|
||||
|
||||
<a href="/catalog/" id="right-cat-btn" style="display:none" rel="nofollow" target="_blank">
|
||||
<span>Каталог продукции</span>
|
||||
</a>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
25
design/carheart/html/login.tpl
Normal file
25
design/carheart/html/login.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{* Страница входа пользователя *}
|
||||
{$meta_title = "Вход" scope=parent}
|
||||
|
||||
<div class="title">Вход</div>
|
||||
<div class="well">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'login_incorrect'}Неверный логин или пароль
|
||||
{elseif $error == 'user_disabled'}Ваш аккаунт еще не активирован.
|
||||
{else}{$error}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form class="form login_form form-horizontal" method="post">
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10"><input class="form-control" type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">Пароль (<a href="/user/password_remind/">напомнить</a>)</label>
|
||||
<div class="col-sm-10"><input class="form-control" type="password" name="password" data-format=".+" data-notice="Введите пароль" value="" /></div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-danger pull-right" name="login" value="Войти">
|
||||
</form>
|
||||
</div>
|
||||
291
design/carheart/html/main.tpl
Normal file
291
design/carheart/html/main.tpl
Normal file
@@ -0,0 +1,291 @@
|
||||
{* Главная страница магазина *}
|
||||
{* Слайдер *}
|
||||
|
||||
<div class="flexslider">
|
||||
<ul class="slides">
|
||||
{* <li style="background: rgba(46, 51, 56, 0.65) url(/design/carheart/images/s1.png) no-repeat right center;">
|
||||
<p>
|
||||
<span class="title">Требуются установщики дополнительного оборудования!</span>
|
||||
|
||||
Работа в отапливаемых боксах. Предоставление полного набора требуемых инструментов. Полная занятость. Молодой дружный коллектив. Более 4-х лет в сфере дополнительного оборудования для авто.<br />
|
||||
Присылайте резюме в свободной форме на электронную почту.
|
||||
|
||||
</p>
|
||||
</li>*}
|
||||
|
||||
<li style="background: rgb(0,127,196) no-repeat scroll right center !important">
|
||||
<p>
|
||||
<span class="title">Имя слайда</span>
|
||||
|
||||
Текст слайда
|
||||
|
||||
<a href="#" class="ai-more">ссылка</a>
|
||||
|
||||
</p>
|
||||
</li>
|
||||
{*
|
||||
<li style="background: rgba(46, 51, 56, 0.65) url(/design/carheart/images/s1.png) no-repeat right center;">
|
||||
<span class="title">Добро пожаловать в магазин Кархарт!</span>
|
||||
<p>Основное направление нашей деятельности — тюнинг автомобильной оптики любой сложности.</p>
|
||||
</li>
|
||||
|
||||
<li style="background: rgba(46, 51, 56, 0.65) url(/design/carheart/images/s2.png) no-repeat right center;">
|
||||
<span class="title">Реализация ваших идей!</span>
|
||||
<p>Индивидуальный подход к каждому клиенту и широкий ассортимент предлагаемой продукции позволит разработать эксклюзивный проект для вашего автомобиля и реализовать любую Вашу идею.</p>
|
||||
</li>
|
||||
|
||||
<li style="background: rgba(46, 51, 56, 0.65) url(/design/carheart/images/s3.png) no-repeat right center;">
|
||||
<span class="title">Запчасти в наличии и под заказ!</span>
|
||||
<p>Интересующего Вас товара нет на сайте? Не беда — привезем под заказ! Находитесь в другом городе? Нам часто присылают детали на переделку. Мы любим свою работу и знаем, что хорошее отношение зачастую важнее денег.</p>
|
||||
</li>
|
||||
*}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{*
|
||||
<div class="flexslider">
|
||||
<ul class="slides">
|
||||
|
||||
<li style="background: rgba(46, 51, 56, 0.65) url("/design/carheart/images/s1.png") no-repeat scroll right center; width: 100%; float: left; margin-right: -100%; position: relative; opacity: 1; display: block; z-index: 2;" class="flex-active-slide">
|
||||
<span class="title">Внимание!!!</span>
|
||||
<p>С 15 августа 2015 г. открывается новый магазин и сервис по адресу: ул. Школьная д. 75 корп. 3.<br /><br />
|
||||
С 1 сентября 2015 г. магазин по адресу пр. Тореза д. 79 корп. 1 переезжает по новому адресу, который сейчас уточняется.</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
*}
|
||||
|
||||
|
||||
{* Для того чтобы обернуть центральный блок в шаблон, отличный от index.tpl *}
|
||||
{* Укажите нужный шаблон строкой ниже. Это работает и для других модулей *}
|
||||
{$wrapper = 'index.tpl' scope=parent}
|
||||
{* Заголовок страницы *}
|
||||
{*<h1>$page->header</h1>*}
|
||||
{* Тело страницы *}
|
||||
{* $page->body *}
|
||||
{* Рекомендуемые товары *}
|
||||
{if $detect->isMobile() && !$detect->isTablet()}
|
||||
{assign var="x" value=4}
|
||||
{else}
|
||||
{assign var="x" value=3}
|
||||
{/if}
|
||||
{get_featured_products var=featured_products limit=$x}
|
||||
{if $featured_products}
|
||||
<!-- Список товаров-->
|
||||
<div class="title">Рекомендуемые товары</div>
|
||||
<div class="home-output row">
|
||||
{foreach $featured_products as $product}
|
||||
<!-- Товар22-->
|
||||
<div class="product col-sm-4 col-xs-6">
|
||||
<!-- Фото товара22 -->
|
||||
{if $product->image}
|
||||
<div class="product-image">
|
||||
<a href="/products/{$product->url}/" class="w"><img class="img-thumbnail" src="{$product->image->filename|resize:242:128}" alt="{$product->name|escape}"></a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Фото товара (The End) -->
|
||||
<!-- Название товара -->
|
||||
<a class="product-name" data-product="{$product->id}" href="/products/{$product->url}/">{$product->name|escape}</a>
|
||||
<!-- Название товара (The End) -->
|
||||
{if $product->variants|count > 0}
|
||||
<!-- Выбор варианта товара -->
|
||||
{*<formss class="variants" action="/cart">*}
|
||||
{foreach $product->variants as $v}
|
||||
{if $v@first || $v->price<$pmin}
|
||||
{assign var="pmin" value=$v->price}
|
||||
{assign var="vmin" value=$v->id}
|
||||
{assign var="nmin" value=$v->name}
|
||||
{assign var="smin" value=$v->stock}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
<form class="variants" action="/cart">
|
||||
<input style="display:none" name="variant" value="{$vmin}" type="radio" checked >
|
||||
|
||||
<div class="col-sm-6">
|
||||
<span class="product-price"><small>от</small> {$pmin|convert} <small>{$currency->sign|escape}</small></span>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{if $smin !='0'}
|
||||
<input type="submit" class="btn btn-danger" value="в корзину" data-result-text="добавлено">
|
||||
{else}
|
||||
<input type="button" class="btn btn-danger preorder" data-id="{$product->variant->id}" value="Предзаказ">
|
||||
{/if}
|
||||
</div>
|
||||
</form>
|
||||
<!-- Выбор варианта товара (The End) -->
|
||||
{else}
|
||||
<p>Нет в наличии</p>
|
||||
<input type="button" class="btn btn-danger preorder" data-id="{$product->variant->id}" value="Предзаказ">
|
||||
{/if}
|
||||
<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|escape:'html'}" type="hidden" />
|
||||
<span class="header h22">Предзаказ</span>
|
||||
<p><a href="/products/{$product->url}/">{$product->name|escape}</a></p>
|
||||
<p>Как только товар будет в наличии, наш менеджер свяжется с Вами.</p>
|
||||
<div class="line 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}" /></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>
|
||||
<!-- Товар (The End)-->
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{* Новинки *}
|
||||
{if $detect->isMobile() && !$detect->isTablet()}
|
||||
{assign var="x" value=4}
|
||||
{else}
|
||||
{assign var="x" value=3}
|
||||
{/if}
|
||||
{get_new_products var=new_products limit=$x}
|
||||
{if $new_products}
|
||||
<div class="title">Новинки</div>
|
||||
<!-- Список товаров-->
|
||||
<div class="home-output row">
|
||||
{foreach $new_products as $product}
|
||||
<!-- Товар-->
|
||||
<div class="product col-sm-4 col-xs-6">
|
||||
<!-- Фото товара -->
|
||||
{if $product->image}
|
||||
<div class="product-image">
|
||||
<a href="/products/{$product->url}/" class="w"><img class="img-thumbnail" src="{$product->image->filename|resize:242:128}" alt="{$product->name|escape}"></a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Фото товара (The End) -->
|
||||
<!-- Название товара -->
|
||||
<a class="product-name" data-product="{$product->id}" href="/products/{$product->url}/">{$product->name|escape}</a>
|
||||
<!-- Название товара (The End) -->
|
||||
{if $product->variants|count > 0}
|
||||
<!-- Выбор варианта товара4 -->
|
||||
|
||||
{foreach $product->variants as $v}
|
||||
{if $v@first || $v->price<$pmin}
|
||||
{assign var="pmin" value=$v->price}
|
||||
{assign var="vmin" value=$v->id}
|
||||
{assign var="nmin" value=$v->name}
|
||||
{assign var="smin" value=$v->stock}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<form class="variants" action="/cart">
|
||||
<input style="display:none" name="variant" value="{$vmin}" type="radio" checked >
|
||||
|
||||
<div class="col-sm-6">
|
||||
<span class="product-price"><small>от</small> {$pmin|convert} <small>{$currency->sign|escape}</small></span>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
{if $smin !='0'}
|
||||
<input type="submit" class="btn btn-danger" value="в корзину" data-result-text="добавлено">
|
||||
{else}
|
||||
<input type="button" class="btn btn-danger preorder" data-id="{$product->variant->id}" value="Предзаказ">
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!-- Выбор варианта товара (The End) -->
|
||||
{else}
|
||||
<p>Нет в наличии</p>
|
||||
<input type="button" class="btn btn-danger preorder" data-id="{$product->variant->id}" value="Предзаказ">
|
||||
{/if}
|
||||
<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|escape:'html'}" type="hidden" />
|
||||
<span class="header h22">Предзаказ</span>
|
||||
<p><a href="/products/{$product->url}/">{$product->name|escape}</a></p>
|
||||
<div class="line 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}" /></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>
|
||||
<!-- Товар (The End)-->
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Меню услуг -->
|
||||
{if $service_items}
|
||||
{*<div class="title">Популярные услуги</div>*}
|
||||
{foreach $service_items_start as $top}
|
||||
|
||||
<h3>{$top->name}</h3>
|
||||
|
||||
<div class="blog-menu row" style="margin-bottom:0">
|
||||
{foreach $service_items as $s}
|
||||
{if $s->startId != $top->id}{continue}{/if}
|
||||
<div class="blog-unit col-sm-6">
|
||||
{if $s->image}<a href="/tuning-centr/{$s->url}/" class="w">
|
||||
<img class="img-thumbnail" style="float: left; width:100px; margin: 0px 15px 5px 0px" src="{$s->image|resizepage:100:100}" alt="{$s->name|escape}" ></a>{/if}
|
||||
<a class="b w" href="/tuning-centr/{$s->url}/">{$s->name|escape}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
{*<div style="text-align: right"><a href="/tuning-centr/" style="text-decoration:none">Смотреть все услуги</a></div>*}
|
||||
{/if}
|
||||
<!-- Меню услуг (The End) -->
|
||||
|
||||
<!-- Меню статей -->
|
||||
{* Выбираем в переменную $last_articles последние записи *}
|
||||
{get_last_articles var=last_articles limit=8}
|
||||
{if $last_articles}
|
||||
<div class="title">Последние выполненные работы</div>
|
||||
<div class="blog-menu row" style="margin-bottom:0">
|
||||
{foreach $last_articles as $a}
|
||||
<div class="blog-unit col-sm-6">
|
||||
{if $a->image}<a href="/nashi-raboty/{$a->url}/" class="w">
|
||||
<img class="img-thumbnail" style="float: left; width:100px; margin: 0px 15px 5px 0px" src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" ></a>{/if}
|
||||
<a class="b w" href="/nashi-raboty/{$a->url}/">{$a->name|escape}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div style="text-align: right"><a href="/nashi-raboty/" style="text-decoration:none">Смотреть все работы</a></div>
|
||||
{/if}
|
||||
<!-- Меню статей (The End) -->
|
||||
|
||||
|
||||
|
||||
270
design/carheart/html/order.tpl
Normal file
270
design/carheart/html/order.tpl
Normal file
@@ -0,0 +1,270 @@
|
||||
{* Страница заказа *}
|
||||
|
||||
{$meta_title = "Ваш заказ №`$order->id`" scope=parent}
|
||||
|
||||
<h1>Ваш заказ №{$order->id}
|
||||
{if $order->status == 0}принят{/if}
|
||||
{if $order->status == 1}в обработке{elseif $order->status == 2}выполнен{/if}
|
||||
{if $order->paid == 1}, оплачен{else}{/if}
|
||||
</h1>
|
||||
|
||||
{* Список покупок *}
|
||||
{literal} <script>$.yEcommerce = [];</script> {/literal}
|
||||
<table id="purchases">
|
||||
|
||||
{foreach $purchases as $purchase}
|
||||
{literal}
|
||||
<script>
|
||||
var x = {/literal}{$purchase->variant|@json_encode nofilter}{literal}
|
||||
x.product = {/literal}{$purchase->product|@json_encode nofilter}{literal}
|
||||
x.amount = {/literal}{$purchase->amount|@json_encode nofilter}{literal}
|
||||
$.yEcommerce.push( x );
|
||||
</script>
|
||||
{/literal}
|
||||
<tr>
|
||||
{* Изображение товара *}
|
||||
<td class="image">
|
||||
{$image = $purchase->product->images|first}
|
||||
{if $image}
|
||||
<a href="/products/{$purchase->product->url}"><img src="{$image->filename|resize:50:50}" alt="{$product->name|escape}"></a>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{* Название товара *}
|
||||
<td class="name">
|
||||
<a href="/products/{$purchase->product->url}">{$purchase->product_name|escape}</a>
|
||||
{$purchase->variant_name|escape}
|
||||
{if $order->paid && $purchase->variant->attachment}
|
||||
<a class="download_attachment" href="/order/{$order->url}/{$purchase->variant->attachment}/">скачать файл</a>
|
||||
{/if}
|
||||
<div class="features">
|
||||
{foreach from=$purchase->options item=opt key=ok}
|
||||
{assign var=f value=$features[$ok]}
|
||||
<p>
|
||||
<label>{$f->name} {$ok}</label>
|
||||
<span>
|
||||
{$opt}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{* Цена за единицу *}
|
||||
<td class="price">
|
||||
{($purchase->price)|convert} {$currency->sign}
|
||||
</td>
|
||||
|
||||
{* Количество *}
|
||||
<td class="amount">
|
||||
× {$purchase->amount} {$settings->units}
|
||||
</td>
|
||||
|
||||
{* Цена *}
|
||||
<td class="price">
|
||||
{($purchase->price*$purchase->amount)|convert} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{* Скидка, если есть *}
|
||||
{if $order->discount > 0}
|
||||
<tr>
|
||||
<th class="image"></th>
|
||||
<th class="name">скидка</th>
|
||||
<th class="price"></th>
|
||||
<th class="amount"></th>
|
||||
<th class="price">
|
||||
{$order->discount} %
|
||||
</th>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Если стоимость доставки входит в сумму заказа *}
|
||||
{if !$order->separate_delivery && $order->delivery_price>0}
|
||||
<tr>
|
||||
<td class="image>"</td>
|
||||
<td class="name">{$delivery->name|escape}</td>
|
||||
<td class="price"></td>
|
||||
<td class="amount"></td>
|
||||
<td class="price">
|
||||
{$order->delivery_price|convert} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Итого *}
|
||||
<tr>
|
||||
<th class="image"></th>
|
||||
<th class="name">итого</th>
|
||||
<th class="price"></th>
|
||||
<th class="amount"></th>
|
||||
<th class="price">
|
||||
{$order->total_price|convert} {$currency->sign}
|
||||
</th>
|
||||
</tr>
|
||||
{* Если стоимость доставки не входит в сумму заказа *}
|
||||
{if $order->separate_delivery}
|
||||
<tr>
|
||||
<td class="image>"</td>
|
||||
<td class="name">{$delivery->name|escape}</td>
|
||||
<td class="price"></td>
|
||||
<td class="amount"></td>
|
||||
<td class="price">
|
||||
{$order->delivery_price|convert} {$currency->sign}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
<p> </p>
|
||||
{* Детали заказа *}
|
||||
<h2 align="center">Детали заказа</h2>
|
||||
<table id="order_info" width="70%" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
Дата заказа
|
||||
</td>
|
||||
<td>
|
||||
{$order->date|date} в
|
||||
{$order->date|time}
|
||||
</td>
|
||||
</tr>
|
||||
{if $order->name}
|
||||
<tr>
|
||||
<td>
|
||||
Имя
|
||||
</td>
|
||||
<td>
|
||||
{$order->name|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->email}
|
||||
<tr>
|
||||
<td>
|
||||
Email
|
||||
</td>
|
||||
<td>
|
||||
{$order->email|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->phone}
|
||||
<tr>
|
||||
<td>
|
||||
Телефон
|
||||
</td>
|
||||
<td>
|
||||
{$order->phone|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->address}
|
||||
<tr>
|
||||
<td>
|
||||
Адрес доставки
|
||||
</td>
|
||||
<td>
|
||||
{$order->address|escape}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $order->comment}
|
||||
<tr>
|
||||
<td>
|
||||
Комментарий
|
||||
</td>
|
||||
<td>
|
||||
{$order->comment|escape|nl2br}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
{if !$order->paid}
|
||||
{* Выбор способа оплаты *}
|
||||
{if $payment_methods && !$payment_method}
|
||||
<form method="post">
|
||||
<h2>Выберите способ оплаты</h2>
|
||||
<ul id="deliveries">
|
||||
{foreach $payment_methods as $payment_method}
|
||||
<li>
|
||||
<div class="checkbox">
|
||||
<input type=radio name=payment_method_id value='{$payment_method->id}' {if $payment_method@first}checked{/if} id=payment_{$payment_method->id}>
|
||||
</div>
|
||||
<h3><label for=payment_{$payment_method->id}> {$payment_method->name}, к оплате {$order->total_price|convert:$payment_method->currency_id} {$all_currencies[$payment_method->currency_id]->sign}</label></h3>
|
||||
<div class="description">
|
||||
{$payment_method->description}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<input type='submit' class="button" value='Закончить заказ'>
|
||||
</form>
|
||||
|
||||
{* Выбраный способ оплаты *}
|
||||
{elseif $payment_method}
|
||||
<h2 align="center">Способ оплаты — {$payment_method->name}
|
||||
<form method=post><input type=submit name='reset_payment_method' value='Выбрать другой способ оплаты'></form>
|
||||
</h2>
|
||||
<p align="center">
|
||||
{$payment_method->description}
|
||||
</p>
|
||||
<h2 align="right">
|
||||
Итого к оплате {$order->total_price|convert:$payment_method->currency_id} {$all_currencies[$payment_method->currency_id]->sign}
|
||||
</h2>
|
||||
|
||||
{* Форма оплаты, генерируется модулем оплаты *}
|
||||
{checkout_form order_id=$order->id module=$payment_method->module}
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{literal}
|
||||
|
||||
<script src="/js/jquery.cookie.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
var ids = $.cookie('ecommerce_purchased') ? $.cookie('ecommerce_purchased').split(',') : [];
|
||||
var order_id = {/literal}{$order->id}{literal};
|
||||
if($.inArray(order_id+'', ids) != -1) return;
|
||||
|
||||
var products = [];
|
||||
|
||||
$.each($.yEcommerce, function(k, item){
|
||||
var variant = item.name ? item.name : name;
|
||||
products.push({
|
||||
"id": item.id,
|
||||
"name" : item.product && item.product.name ? item.product.name : item.name,
|
||||
"price": item.price,
|
||||
"quantity": item.amount
|
||||
});
|
||||
});
|
||||
|
||||
//console.log(products);return;
|
||||
|
||||
ids.push(order_id);
|
||||
|
||||
$.cookie('ecommerce_purchased', ids.join(','), { expires: 30, path: '/' });
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
dataLayer.push({
|
||||
"ecommerce": {
|
||||
"purchase": {
|
||||
"actionField": {
|
||||
"id" : order_id,
|
||||
"goal_id" : "19982020",
|
||||
},
|
||||
"products": products
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//console.log(dataLayer)
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{/literal}
|
||||
|
||||
|
||||
40
design/carheart/html/page.tpl
Normal file
40
design/carheart/html/page.tpl
Normal file
@@ -0,0 +1,40 @@
|
||||
{* Шаблон текстовой страницы *}
|
||||
<!-- Заголовок страницы* -->
|
||||
{*<div class="title" data-page="{$page->id}">{$page->header|escape}</div>*}
|
||||
<h1>{$page->header|escape}</h1>
|
||||
|
||||
{* Костыль для раздела - товары по маркам, выводить все бренды *}
|
||||
{if in_array($page->id, array(12))}
|
||||
{include file='brands_all.tpl'}
|
||||
{/if}
|
||||
|
||||
<!-- Тело страницы -->
|
||||
{$page->body}
|
||||
|
||||
{if $catalog_categories}
|
||||
<div class="categories row">
|
||||
{foreach from=$catalog_categories item=c}
|
||||
{* Показываем только видимые категории *}
|
||||
{if $c->visible && $c->menu}
|
||||
<div class="category col-sm-4 col-xs-6">
|
||||
<div class="category-image">{if $c->image}<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">
|
||||
<img class="img-thumbnail" src="/{$config->categories_images_dir}{$c->image}" alt="{$c->name}">
|
||||
</a>{/if}</div>
|
||||
<div class="category-name">
|
||||
<a class="w" href="/catalog/{$c->url}/" data-category="{$c->id}">{$c->name}</a>
|
||||
<div class="category_anons">{$c->anons}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
{if $page->id == 35}
|
||||
{if $smarty.get.edit && $smarty.session.admin == 'admin'}{include file='feedback/edit.tpl'}{/if}
|
||||
{if $smarty.get.reply && $smarty.session.admin == 'admin'}{include file='feedback/reply.tpl'}{/if}
|
||||
{if !$smarty.get.edit && !$smarty.get.reply}{include file='feedback/main.tpl'}{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
2
design/carheart/html/pages.tpl
Normal file
2
design/carheart/html/pages.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
{* Шаблон текстовой страницы *}
|
||||
|
||||
42
design/carheart/html/pagination.tpl
Normal file
42
design/carheart/html/pagination.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
{* Постраничный вывод *}
|
||||
{if $total_pages_num>1}
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
{*url*}
|
||||
<!-- Листалка страниц -->
|
||||
<ul class="pagination pagination-sm">
|
||||
{* Количество выводимых ссылок на страницы *}
|
||||
{if !$visible_pages}{$visible_pages = 13}{/if}
|
||||
{* По умолчанию начинаем вывод со страницы 1 *}
|
||||
{$page_from = 1}
|
||||
{* Если выбранная пользователем страница дальше середины "окна" - начинаем вывод уже не с первой *}
|
||||
{if $current_page_num > floor($visible_pages/2)}
|
||||
{$page_from = max(1, $current_page_num-floor($visible_pages/2)-1)}
|
||||
{/if}
|
||||
{* Если выбранная пользователем страница близка к концу навигации - начинаем с "конца-окно" *}
|
||||
{if $current_page_num > $total_pages_num-ceil($visible_pages/2)}
|
||||
{$page_from = max(1, $total_pages_num-$visible_pages-1)}
|
||||
{/if}
|
||||
{* До какой страницы выводить - выводим всё окно, но не более ощего количества страниц *}
|
||||
{$page_to = min($page_from+$visible_pages, $total_pages_num-1)}
|
||||
{* Ссылка на 1 страницу отображается всегда *}
|
||||
<li {if $current_page_num==1}class="active"{/if}><a href="{$smarty.server.SCRIPT_URL}">1</a></li>{*$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI*}
|
||||
{* Выводим страницы нашего "окна" *}
|
||||
{section name=pages loop=$page_to start=$page_from}
|
||||
{* Номер текущей выводимой страницы *}
|
||||
{$p = $smarty.section.pages.index+1}
|
||||
{* Для крайних страниц "окна" выводим троеточие, если окно не возле границы навигации *}
|
||||
{if ($p == $page_from+1 && $p!=2) || ($p == $page_to && $p != $total_pages_num-1)}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{url page=$p}">...</a></li>
|
||||
{else}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{url page=$p}">{$p}</a></li>
|
||||
{/if}
|
||||
{/section}
|
||||
{* Ссылка на последнююю страницу отображается всегда *}
|
||||
<li {if $current_page_num==$total_pages_num}class="active"{/if}><a href="{url page=$total_pages_num}">{$total_pages_num}</a></li>
|
||||
{if $current_page_num>1}<li><a class="prev_page_link" href="{if $current_page_num !=2}{url page=$current_page_num-1}{else}{$smarty.server.SCRIPT_URL}{/if}">←назад</a></li>{/if}
|
||||
{if $current_page_num<$total_pages_num}<li><a class="next_page_link" href="{url page=$current_page_num+1}">вперед→</a></li>{/if}
|
||||
</ul>
|
||||
<!-- Листалка страниц (The End) -->
|
||||
{/if}
|
||||
42
design/carheart/html/pagination_articles.tpl
Normal file
42
design/carheart/html/pagination_articles.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
{* Постраничный вывод *}
|
||||
{if $total_pages_num>1}
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
{*url*}
|
||||
<!-- Листалка страниц -->
|
||||
<ul class="pagination pagination-sm">
|
||||
{* Количество выводимых ссылок на страницы *}
|
||||
{if !$visible_pages}{$visible_pages = 13}{/if}
|
||||
{* По умолчанию начинаем вывод со страницы 1 *}
|
||||
{$page_from = 1}
|
||||
{* Если выбранная пользователем страница дальше середины "окна" - начинаем вывод уже не с первой *}
|
||||
{if $current_page_num > floor($visible_pages/2)}
|
||||
{$page_from = max(1, $current_page_num-floor($visible_pages/2)-1)}
|
||||
{/if}
|
||||
{* Если выбранная пользователем страница близка к концу навигации - начинаем с "конца-окно" *}
|
||||
{if $current_page_num > $total_pages_num-ceil($visible_pages/2)}
|
||||
{$page_from = max(1, $total_pages_num-$visible_pages-1)}
|
||||
{/if}
|
||||
{* До какой страницы выводить - выводим всё окно, но не более ощего количества страниц *}
|
||||
{$page_to = min($page_from+$visible_pages, $total_pages_num-1)}
|
||||
{* Ссылка на 1 страницу отображается всегда *}
|
||||
<li {if $current_page_num==1}class="active"{/if}><a href="{pagurl}">1</a></li>{*$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI*}
|
||||
{* Выводим страницы нашего "окна" *}
|
||||
{section name=pages loop=$page_to start=$page_from}
|
||||
{* Номер текущей выводимой страницы *}
|
||||
{$p = $smarty.section.pages.index+1}
|
||||
{* Для крайних страниц "окна" выводим троеточие, если окно не возле границы навигации *}
|
||||
{if ($p == $page_from+1 && $p!=2) || ($p == $page_to && $p != $total_pages_num-1)}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{pagurl page=$p}">...</a></li>
|
||||
{else}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{pagurl page=$p}">{$p}</a></li>
|
||||
{/if}
|
||||
{/section}
|
||||
{* Ссылка на последнююю страницу отображается всегда *}
|
||||
<li {if $current_page_num==$total_pages_num}class="active"{/if}><a href="{pagurl page=$total_pages_num}">{$total_pages_num}</a></li>
|
||||
{if $current_page_num>1}<li><a class="prev_page_link" href="{if $current_page_num !=2}{pagurl page=$current_page_num-1}{else}{pagurl}{/if}">←назад</a></li>{/if}
|
||||
{if $current_page_num<$total_pages_num}<li><a class="next_page_link" href="{pagurl page=$current_page_num+1}">вперед→</a></li>{/if}
|
||||
</ul>
|
||||
<!-- Листалка страниц (The End) -->
|
||||
{/if}
|
||||
66
design/carheart/html/pagination_new.tpl
Normal file
66
design/carheart/html/pagination_new.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
{* Постраничный вывод *}
|
||||
{if $total_pages_num>1}
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
{*url*}
|
||||
<!-- Листалка страниц -->
|
||||
<ul class="pagination pagination-sm">
|
||||
{* Количество выводимых ссылок на страницы *}
|
||||
{if !$visible_pages}{$visible_pages = 13}{/if}
|
||||
{* По умолчанию начинаем вывод со страницы 1 *}
|
||||
{$page_from = 1}
|
||||
{* Если выбранная пользователем страница дальше середины "окна" - начинаем вывод уже не с первой *}
|
||||
{if $current_page_num > floor($visible_pages/2)}
|
||||
{$page_from = max(1, $current_page_num-floor($visible_pages/2)-1)}
|
||||
{/if}
|
||||
{* Если выбранная пользователем страница близка к концу навигации - начинаем с "конца-окно" *}
|
||||
{if $current_page_num > $total_pages_num-ceil($visible_pages/2)}
|
||||
{$page_from = max(1, $total_pages_num-$visible_pages-1)}
|
||||
{/if}
|
||||
{* До какой страницы выводить - выводим всё окно, но не более ощего количества страниц *}
|
||||
{$page_to = min($page_from+$visible_pages, $total_pages_num-1)}
|
||||
{* Ссылка на 1 страницу отображается всегда *}
|
||||
<li {if $current_page_num==1}class="active"{/if}><a href="{pagurl}">1</a></li>{*$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI*}
|
||||
{* Выводим страницы нашего "окна" *}
|
||||
{section name=pages loop=$page_to start=$page_from}
|
||||
{* Номер текущей выводимой страницы *}
|
||||
{$p = $smarty.section.pages.index+1}
|
||||
{* Для крайних страниц "окна" выводим троеточие, если окно не возле границы навигации *}
|
||||
{if ($p == $page_from+1 && $p!=2) || ($p == $page_to && $p != $total_pages_num-1)}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{pagurl page=$p}">...</a></li>
|
||||
{else}
|
||||
<li {if $p==$current_page_num}class="active"{/if}><a href="{pagurl page=$p}">{$p}</a></li>
|
||||
{/if}
|
||||
{/section}
|
||||
{* Ссылка на последнююю страницу отображается всегда *}
|
||||
<li {if $current_page_num==$total_pages_num}class="active"{/if}><a href="{pagurl page=$total_pages_num}">{$total_pages_num}</a></li>
|
||||
{if $current_page_num>1}<li><a class="prev_page_link" href="{if $current_page_num !=2}{pagurl page=$current_page_num-1}{else}{pagurl}{/if}">←назад</a></li>{/if}
|
||||
{if $current_page_num<$total_pages_num}<li><a class="next_page_link" href="{pagurl page=$current_page_num+1}">вперед→</a></li>{/if}
|
||||
</ul>
|
||||
<!-- Листалка страниц (The End) -->
|
||||
{/if}
|
||||
|
||||
{if !$bottomPag && $page->id != 35}
|
||||
<div class="sort-order">
|
||||
<select id="sort-order">
|
||||
<option value="0">Сортировать по</option>
|
||||
<option value="min_price" {if $sort_order == 'min_price'}selected="selected"{/if}>Цена (по возрастанию)</option>
|
||||
<option value="max_price" {if $sort_order == 'max_price'}selected="selected"{/if}>Цена (по убыванию)</option>
|
||||
<option value="views" {if $sort_order == 'views'}selected="selected"{/if}>По популярности</option>
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
// $(function(){
|
||||
$('#sort-order').change(function(){
|
||||
var val = $('#sort-order').val();
|
||||
var q = val != 0 ? '?order=' + val : '';
|
||||
document.location.href = document.location.pathname + q;
|
||||
});
|
||||
// });
|
||||
</script>
|
||||
{/literal}
|
||||
26
design/carheart/html/password_remind.tpl
Normal file
26
design/carheart/html/password_remind.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
{* Письмо пользователю для восстановления пароля *}
|
||||
|
||||
{if $email_sent}
|
||||
<h1>Вам отправлено письмо</h1>
|
||||
|
||||
<p>На {$email|escape} отправлено письмо для восстановления пароля.</p>
|
||||
{else}
|
||||
<h1>Напоминание пароля</h1>
|
||||
<div class="well">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'user_not_found'}
|
||||
<span class="text-danger">Пользователь не найден</span>
|
||||
{else}{$error}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form class="form form-horizontal" method="post">
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-6 control-label">Введите email, который вы указывали при регистрации</label>
|
||||
<div class="col-sm-6"><input class="form-control" type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255"/></div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-danger pull-right" name="login" value="Вспомнить">
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
173
design/carheart/html/post.tpl
Normal file
173
design/carheart/html/post.tpl
Normal file
@@ -0,0 +1,173 @@
|
||||
{* Страница отдельной записи блога *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
<li><a href="/{$page->url}/">{$page->name|escape}</a></li>
|
||||
<li>{$post->name|escape}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
<!-- Заголовок /-->
|
||||
<h1 data-post="{$post->id}">{$post->name|escape}</h1>
|
||||
<p>{$post->date|date|date_format:"%e %m %Y":"":"rus"}</p>
|
||||
|
||||
<!-- Тело поста /-->
|
||||
{*if $post->image}
|
||||
<div class="pull-right" style="margin: 0px 0px 15px 15px">
|
||||
<a href="{$post->image|resizepost:1000:1000}" class="zoom w" data-rel="group"><img class="img-thumbnail" src="{$post->image|resizepost:380:380}" alt="{$post->name|escape}" /></a>
|
||||
</div>
|
||||
{/if*}
|
||||
|
||||
{*$post->text*}
|
||||
{images_resize content=$post->text}
|
||||
|
||||
<!-- Соседние записи /-->
|
||||
{*
|
||||
<div id="back_forward">
|
||||
{if $prev_post}
|
||||
← <a class="back" id="PrevLink" href="/tehinfo/{$prev_post->url}/">{$prev_post->name}</a>
|
||||
{/if}
|
||||
{if $next_post}
|
||||
<a class="forward" id="NextLink" href="/tehinfo/{$next_post->url}/">{$next_post->name}</a> →
|
||||
{/if}
|
||||
</div>
|
||||
*}
|
||||
|
||||
<div id="back_forward" style="margin-left: 0;" class="row">
|
||||
<div class="col-sm-6">
|
||||
{if $prev_post}
|
||||
{*<a class="prev-strelka" href="/catalog/reshetki-radiatora/tovar-1217.html"><span class="fa fa-chevron-left"></span></a>*}
|
||||
<div class="prev-next-title"><a href="/tehinfo/{$prev_post->url}/">← {$prev_post->name}</a></div>
|
||||
<div style="float: none;" class="cell">
|
||||
<a href="/tehinfo/{$prev_post->url}/">
|
||||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||||
<img src="{$prev_post->image|resizepost:200:140}" alt="Решетка радиатора (4 поперечины)" style="width: 200px; margin-top: -9.5px; display: inline-block;">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="text-align: right;" class="col-sm-6">
|
||||
{if $next_post}
|
||||
<div class="prev-next-title"><a href="/tehinfo/{$next_post->url}/">{$next_post->name} →</a></div>
|
||||
{*<a class="next-strelka" href="/catalog/reshetki-radiatora/tovar-3004.html"><span class="fa fa-chevron-right"></span></a>*}
|
||||
<div style="float: none;display: inline-block;" class="cell">
|
||||
<a href="/tehinfo/{$next_post->url}/">
|
||||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||||
<img src="{$next_post->image|resizepost:200:140}" alt="Решетка радиатора Audi A4 B8 '07-11 с рамкой под номер, черная" style="width: 200px; margin-top: -3.5px; display: inline-block;">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Получить консультацию</h2>
|
||||
<div class="well">
|
||||
<form class="comment_form2 form-horizontal" id="call_form" method="post" onsubmit="sendCallback();return false;">
|
||||
|
||||
<span class="form-group">
|
||||
<label for="c_name" class="col-sm-2 control-label">Имя</label>
|
||||
<span class="col-sm-10"><input class="input_name form-control" type="text" id="c_name" name="name" /></span>
|
||||
</span>
|
||||
|
||||
<span class="form-group">
|
||||
<label for="c_tel" class="col-sm-2 control-label">Телефон</label>
|
||||
<span class="col-sm-10"><input class="input_name form-control" type="text" id="c_tel" name="tel" /></span>
|
||||
</span>
|
||||
<div style="margin-top:10px">
|
||||
<input class="btn btn-danger pull-right" type="submit" id="c_submit" value="Отправить">
|
||||
</div>
|
||||
<input type="hidden" id="c_tema" value="{$post->name|escape}">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Комментарии -->
|
||||
<div id="comments">
|
||||
|
||||
<h2>Комментарии</h2>
|
||||
|
||||
{if $comments}
|
||||
<!-- Список с комментариями -->
|
||||
<ul class="comment_list">
|
||||
{foreach $comments as $comment}
|
||||
<a name="comment_{$comment->id}"></a>
|
||||
<li>
|
||||
<!-- Имя и дата комментария-->
|
||||
<div class="comment_header">
|
||||
{$comment->name|escape} <i>{$comment->date|date}, {$comment->date|time}</i>
|
||||
{if !$comment->approved}ожидает модерации</b>{/if}
|
||||
</div>
|
||||
<!-- Имя и дата комментария (The End)-->
|
||||
|
||||
<!-- Комментарий -->
|
||||
{$comment->text|escape|nl2br}
|
||||
<!-- Комментарий (The End)-->
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<!-- Список с комментариями (The End)-->
|
||||
{else}
|
||||
<p>
|
||||
Пока нет комментариев
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<!--Форма отправления комментария-->
|
||||
|
||||
<!--Подключаем js-проверку формы -->
|
||||
<script src="/js/baloon/js/default.js" type="text/javascript"></script>
|
||||
<script src="/js/baloon/js/validate.js" type="text/javascript"></script>
|
||||
<script src="/js/baloon/js/baloon.js" type="text/javascript"></script>
|
||||
<link href="/js/baloon/css/baloon.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<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 for="comment_text" 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 for="comment_name" 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>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"><p class="captcha"><img alt="" src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></p></div>
|
||||
<span class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></span>
|
||||
</div>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить">
|
||||
</form>
|
||||
</div>
|
||||
<!--Форма отправления комментария (The End)-->
|
||||
|
||||
</div>
|
||||
<!-- Комментарии (The End) -->
|
||||
|
||||
{* Скрипт для листания через ctrl → *}
|
||||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
|
||||
$(".content img").addClass( 'img-thumbnail w' );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
438
design/carheart/html/product.tpl
Normal file
438
design/carheart/html/product.tpl
Normal file
@@ -0,0 +1,438 @@
|
||||
{* Страница товара *}
|
||||
<!-- Хлебные крошки /-->
|
||||
{$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 < 3}
|
||||
<li><a href="/catalog/{$cat->url}/{$brand->url}/">{$brand->name|escape}</a></li>
|
||||
{/if}
|
||||
<li>{$product->name|escape}</li>
|
||||
</ul>
|
||||
<!-- Хлебные крошки #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|resize:252:252}" alt="{$product->product->name|escape}" /></a>
|
||||
</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}" 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>
|
||||
{if $v->name}<label class="variant_name" for="related_{$v->id}">{$v->name}</label>{/if}
|
||||
</td>
|
||||
<td>
|
||||
{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 type="text/javascript">
|
||||
$(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> </p>
|
||||
<input type="submit" class="btn btn-danger" value="Добавить в корзину" data-result-text="Товар добавлен"/>
|
||||
</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="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 type="text/javascript">
|
||||
$(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> (голосов <span class="rater-rateCount">{$product->votes|string_format:"%.0f"}</span>)
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
*}
|
||||
<!-- Рейтинг (The End) -->
|
||||
<!-- Просмотров --> <div style="text-align:right"><small>Просмотров товара: {$product->views}</small></div> <!-- Просмотров (The End) -->
|
||||
<!-- TABS -->
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
$(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>
|
||||
</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">
|
||||
<!-- Доставка товара -->
|
||||
|
||||
<!-- Доставка товара (The End)-->
|
||||
</div>
|
||||
<div id="Оплата" class="_tabs">
|
||||
<!-- Оплата товара -->
|
||||
|
||||
<!-- Оплата товара (The End)-->
|
||||
</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}
|
||||
<!--Форма отправления комментария-->
|
||||
<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>
|
||||
<span class="form-group">
|
||||
<span class="col-sm-2"><span style="display:block" class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha'/></span></span>
|
||||
<span class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></span>
|
||||
</span>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить" />
|
||||
<input id="h_email" name="email">
|
||||
</form>
|
||||
</div>
|
||||
<!--Форма отправления комментария (The End)-->
|
||||
</div>
|
||||
<div id="Примеры" class="_tabs">
|
||||
{if $related_articles}
|
||||
<ul>
|
||||
{foreach $related_articles as $a}
|
||||
<li>
|
||||
{if $a->image}<a href="/article/{$a->url}/"><img src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" /></a>{/if}
|
||||
<span class="h22"><a href="/article/{$a->url}/">{$a->name|escape}</a></span>
|
||||
<div>{$a->annotation}</div>
|
||||
<p class="clear"></p>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<!-- TABS (The End)-->
|
||||
</div>
|
||||
|
||||
|
||||
{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)-->
|
||||
{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 type='text/javascript'>
|
||||
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}
|
||||
286
design/carheart/html/products.tpl
Normal file
286
design/carheart/html/products.tpl
Normal file
@@ -0,0 +1,286 @@
|
||||
{* Список товаров *}
|
||||
<!-- Хлебные крошки /-->
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/">Главная</a></li>
|
||||
{if $category}
|
||||
{foreach from=$category->path item=cat}
|
||||
<li><a href="/catalog/{$cat->url}/">{$cat->name|escape}</a></li>
|
||||
{/foreach}
|
||||
{if $brand}
|
||||
<li><a href="/catalog/{$cat->url}/{$brand->url}/">{$brand->name|escape}</a></li>
|
||||
{/if}
|
||||
{elseif $brand}
|
||||
<li><a href="/brands/{$brand->url}/">{$brand->name|escape}</a></li>
|
||||
{elseif $keyword}
|
||||
<li>Поиск</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<!-- Хлебные крошки #End /-->
|
||||
{* Заголовок страницы *}
|
||||
{if $keyword}
|
||||
<h1>Поиск {$keyword|escape}</h1>
|
||||
{if !$products}
|
||||
Наш поиск по сайту не смог найти то, что Вы ищете.<br />
|
||||
Но, возможно, этот товар есть в наличии. Позвоните нам по телефонам, указанным в контактах или закажите обратный звонок на сайте, чтобы наш менеджер смог Вас проконсультировать.
|
||||
{/if}
|
||||
{elseif $page && $page->name}
|
||||
<h1>{$page->name|escape}</h1>
|
||||
{else}
|
||||
{if $brand && !$category}{$td = 'Товары для тюнинга '}{else}{$td=''}{/if}
|
||||
{if $category->parent_id == 488 && $brand}
|
||||
<h1>{$category->category_h1|escape} {$keyword|escape}</h1>
|
||||
{else}
|
||||
<h1>
|
||||
{if $category->category_h1}
|
||||
{$category->category_h1|escape} {$td}{$brand->name|escape} {$keyword|escape}{if $smarty.get.page > 1} - страница {$smarty.get.page}{/if}
|
||||
{else}Все товары{if $brand} для автомобилей {$brand->name}{/if}{if $smarty.get.page > 1} - страница {$smarty.get.page}{/if}
|
||||
{/if}
|
||||
</h1>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
{* Описание страницы (если задана) *}
|
||||
{$page->body}
|
||||
{if $current_page_num==1}
|
||||
{* Описание категории *}
|
||||
{$category->description}
|
||||
{/if}
|
||||
|
||||
|
||||
{* Фильтр по брендам *}
|
||||
{*include file='brands.tpl'*}
|
||||
|
||||
{* Описание бренда *}
|
||||
{$brand->description}
|
||||
{* Фильтр по свойствам *}
|
||||
{if $features}
|
||||
<table id="features">
|
||||
{foreach $features as $f}
|
||||
<tr>
|
||||
<td class="feature_name" data-feature="{$f->id}">
|
||||
{$f->name}:
|
||||
</td>
|
||||
<td class="feature_values">
|
||||
<a href="{url params=[$f->id=>null, page=>null]}/" {if !$smarty.get.$f@key}class="selected"{/if}>Все</a>
|
||||
{foreach $f->options as $o}
|
||||
<a href="{url params=[$f->id=>$o->value, page=>null]}/" {if $smarty.get.$f@key == $o->value}class="selected"{/if}>{$o->value|escape}</a>
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<!--Каталог товаров
|
||||
{if $products || 1}
|
||||
{* Сортировка *}
|
||||
{if $products|count>0}
|
||||
<div class="sort" align="right">
|
||||
Сортировать по
|
||||
<a {if $sort=='position'} class="selected"{/if} href="{url sort=position page=null}">умолчанию</a>
|
||||
<a {if $sort=='price'} class="selected"{/if} href="{url sort=price page=null}">цене</a>
|
||||
<a {if $sort=='name'} class="selected"{/if} href="{url sort=name page=null}">названию</a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Каталог товаров-->
|
||||
{if $category->subcategories && $category->id != 246 && $category->id != 24 && $category->id != 15} {*if1*}
|
||||
|
||||
{* подразделы *}
|
||||
|
||||
{* Костыль для разделов, которые как бренды *}
|
||||
{if in_array($category->id, array(257, 15, 50, 32, 33, 43, 415))}
|
||||
|
||||
{include file='category_like_brands.tpl'}
|
||||
|
||||
{else}
|
||||
|
||||
{include file='category.tpl'}
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
{else} {* /if1*}
|
||||
|
||||
|
||||
{if $category->id == 15} {*if2*}
|
||||
|
||||
{include file='category_like_brands.tpl'}
|
||||
|
||||
<div class="h3">Все товары</div>
|
||||
|
||||
{/if} {* /if2*}
|
||||
|
||||
|
||||
|
||||
{if $category->id == 246 || $category->id == 24}{include file='category.tpl'}<div class="h3">Все товары</div>{/if}
|
||||
|
||||
{*if $category->id == 15}<div class="h3">Все товары</div>{/if*}
|
||||
|
||||
<div style="text-align: right;">{include file='pagination_new.tpl'}</div>
|
||||
<!-- Список товаров-->
|
||||
{literal} <script>$.yEcommerce = [];</script> {/literal}
|
||||
<div class="products clearfix">
|
||||
{foreach $products as $product}
|
||||
|
||||
<!-- Товар-->
|
||||
<div class="product cleafix" itemscope itemtype="http://schema.org/Product">
|
||||
<!-- Фото товара -->
|
||||
{if $product->image}
|
||||
<div class="product-image col-sm-3">
|
||||
<a href="/products/{$product->url}/" class="w"><img itemprop="image" src="{$product->image->filename|resize:200:200}" alt="{$product->name|escape}" class="img-thumbnail"/></a>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Фото товара (The End) -->
|
||||
<div class="product-info col-sm-9">
|
||||
<!-- Название товара -->
|
||||
<span class="{if $product->featured}featured{/if}" itemprop="name"><a class="product-name" data-product="{$product->id}" href="/products/{$product->url}/" itemprop="url">{$product->name|escape}</a></span>
|
||||
<!-- Название товара (The End) -->
|
||||
<!-- Описание товара -->
|
||||
<div class="product-annotation" itemprop="description">{$product->annotation}</div>
|
||||
<!-- Описание товара (The End) -->
|
||||
{if $product->variants|count > 0}
|
||||
<!-- Выбор варианта товара-->
|
||||
<!-- Выбор варианта -->
|
||||
{assign var="pmin" value=99999999}
|
||||
{assign var="priceFlag" value=0}
|
||||
{foreach $product->variants as $v}
|
||||
{if $v@first || $v->price<$pmin}
|
||||
{assign var="pmin" value=$v->price}
|
||||
{assign var="vmin" value=$v->id}
|
||||
{assign var="nmin" value=$v->name}
|
||||
{assign var="smin" value=$v->stock}
|
||||
|
||||
{/if}
|
||||
{if $v->price != $pmin && $pmin != 99999999}
|
||||
{assign var="priceFlag" value=1}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
var x = {/literal}{$product|@json_encode nofilter}{literal}
|
||||
x._price = {/literal}{$pmin}{literal}
|
||||
$.yEcommerce.push( x );
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
|
||||
<form class="variants" action="/cart">
|
||||
<input style="display:none" name="variant" value="{$vmin}" type="radio" checked />
|
||||
<div class="text-right col-sm-9" style="padding-right: 0px;">
|
||||
<span class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span class="mdh" itemprop="priceCurrency" data-content="RUB">RUB</span><span class="mdh" itemprop="price" data-content="{$pmin}">{$pmin}</span>
|
||||
{if $priceFlag == 1}<small>цена от</small>{else}<small>цена</small>{/if}
|
||||
|
||||
{$pmin|convert} <small>{$currency->sign|escape}</small></span>
|
||||
{if $v->compare_price > 0} <span class="product-compare-price">
|
||||
{if $priceFlag == 1}<small>цена от</small>{else}<small>цена</small>{/if}
|
||||
{$v->compare_price|convert} <small>{$currency->sign|escape}</small></span>{/if}
|
||||
</div>
|
||||
<div class="text-right col-sm-3" style="padding-right: 0px;">
|
||||
{if $smin !='0'}
|
||||
<a data-product="{$product->id}" href="/products/{$product->url}/" class="btn btn-danger">Купить
|
||||
{*<input type="button" class="btn btn-danger" value="Купить" data-result-text="добавлено"/>*}
|
||||
</a>
|
||||
{else}
|
||||
<input type="button" class="btn btn-danger preorder" data-id="{$product->variant->id}" value="Предзаказ"/>
|
||||
{/if}
|
||||
</div>
|
||||
</form>
|
||||
<!-- End Выбор варианта -->
|
||||
<!-- Выбор варианта товара (The End) -->
|
||||
{else}
|
||||
Нет в наличии
|
||||
{/if}
|
||||
<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|escape:'html'}" type="hidden" />
|
||||
<span class="header h22">Предзаказ</span>
|
||||
<p><a href="/products/{$product->url}/">{$product->name|escape}</a></p>
|
||||
<p>Как только товар будет в наличии, наш менеджер свяжется с Вами.</p>
|
||||
<div class="line 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" required="required" value="{$phone|escape}" /></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>
|
||||
</div>
|
||||
<!-- Товар (The End)-->
|
||||
{/foreach}
|
||||
</div>
|
||||
{assign var="bottomPag" value=1}
|
||||
<div style="text-align:right">{include file='pagination_new.tpl'}</div>
|
||||
{/if}
|
||||
<!-- Список товаров (The End)-->
|
||||
{else}
|
||||
{if $category->subcategories}
|
||||
<a href="/catalog/{$c->url}/">{$c->name}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $category->text_bottom}
|
||||
{$category->text_bottom}
|
||||
{/if}
|
||||
|
||||
<!--Каталог товаров (The End)-->
|
||||
|
||||
{literal}
|
||||
|
||||
<script>
|
||||
//// 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 products = [];
|
||||
|
||||
$.each($.yEcommerce, function(k, item){
|
||||
products.push({
|
||||
"id": item.id,
|
||||
"name" : item.name,
|
||||
"price": item._price,
|
||||
"brand": item.brand,
|
||||
"category": cat,
|
||||
//"variant" : variant
|
||||
});
|
||||
});
|
||||
|
||||
dataLayer.push({
|
||||
"ecommerce": {
|
||||
"detail": {
|
||||
"products": products
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
{/literal}
|
||||
37
design/carheart/html/register.tpl
Normal file
37
design/carheart/html/register.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{* Страница регистрации *}
|
||||
|
||||
{$meta_title = "Регистрация" scope=parent}
|
||||
|
||||
<div class="title">Регистрация</div>
|
||||
<div class="well">
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'empty_name'}Введите имя
|
||||
{elseif $error == 'empty_email'}Введите email
|
||||
{elseif $error == 'empty_password'}Введите пароль
|
||||
{elseif $error == 'user_exists'}Пользователь с таким email уже зарегистрирован
|
||||
{elseif $error == 'captcha'}Неверно введена капча
|
||||
{else}{$error}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form class="form register_form form-horizontal" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Имя</label>
|
||||
<div class="col-sm-10"><input class="form-control" type="text" name="name" data-format=".+" data-notice="Введите имя" value="{$name|escape}" maxlength="255" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10"><input class="form-control" type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">Пароль</label>
|
||||
<div class="col-sm-10"><input class="form-control" type="password" name="password" data-format=".+" data-notice="Введите пароль" value="" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"><div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></div> </div>
|
||||
<div class="col-sm-2"><input class="form-control" class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-danger pull-right" name="register" value="Зарегистрироваться">
|
||||
</form>
|
||||
</div>
|
||||
29
design/carheart/html/search.tpl
Normal file
29
design/carheart/html/search.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Поиск по сайту</h1>
|
||||
|
||||
<form action="/search/" style="padding:10px 0px;" class="hidden-xs" method="get">
|
||||
<div class="input-group top-serch">
|
||||
<input type="text" class="form-control input-sm input_search" name="keyword" value="{$smarty.get.keyword}" placeholder="" autocomplete="off">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-danger btn-sm" type="submit"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{$no_results}
|
||||
|
||||
|
||||
{foreach $items as $item}
|
||||
|
||||
{if $item->_header}
|
||||
<div class="h2">{$item->_header}</div>
|
||||
{continue}
|
||||
{/if}
|
||||
<div>
|
||||
<div>
|
||||
<a href="{$item->url}">{$item->name}</a>
|
||||
</div>
|
||||
<div>
|
||||
{$item->annotation}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
41
design/carheart/html/service.tpl
Normal file
41
design/carheart/html/service.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
<div class="service-view row">
|
||||
<div class="col-sm-12">
|
||||
<div class="content">
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 service-header">
|
||||
<h1>{$page->header}</h1>
|
||||
</div>
|
||||
<div class="col-sm-12">{$page->toptext}</div>
|
||||
{*<div class="col-sm-12">
|
||||
<img src="{$page->image|resizepage:390:113}" alt="{$page->name}" class="pull-left img-pull-left">
|
||||
{$page->toptext}
|
||||
</div>*}
|
||||
</div>
|
||||
</div>
|
||||
{include file='contact_form_inline.tpl'}
|
||||
{include file='graphic_block_services.tpl'}
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{$page->body}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- хиты продаж -->
|
||||
{if $related_products}{include file='service_products.tpl'}{/if}
|
||||
<!-- / хиты продаж -->
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{$page->bottext}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- другие услуги -->
|
||||
{include file='service_other.tpl'}
|
||||
<!-- / другие услуги -->
|
||||
{include file='contact_form_and_social.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
37
design/carheart/html/service_other.tpl
Normal file
37
design/carheart/html/service_other.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{if $related_articles}
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="infoblock other-services row">
|
||||
<div class="col-sm-12">
|
||||
<div class="h3">Примеры работ</div>
|
||||
</div>
|
||||
{foreach from=$related_articles item=related_page}
|
||||
<div class="col-sm-3" style="min-height:242px;">
|
||||
<div class="oth-image"><a rel="nofollow" target="_blank" href="/article/{$related_page->url}/">{if $related_page->image}<img src="{$related_page->image|resizepage:242:198}" alt="{$page->name}" class="thumbnail w">{else}<img src="/images/empty.jpg" class="thumbnail w">{/if}</a></div>
|
||||
<div class="oth-title"><a rel="nofollow" target="_blank" href="/article/{$related_page->url}/">{$related_page->name}</a></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
{if $related_pages}
|
||||
<div class="clearfix">
|
||||
<div class="infoblock other-services row">
|
||||
<div class="col-sm-12">
|
||||
<div class="h3">Другие услуги</div>
|
||||
</div>
|
||||
{foreach from=$related_pages item=related_page}
|
||||
<div class="col-sm-3">
|
||||
<div class="oth-image"><a rel="nofollow" target="_blank" href="{$related_page->parentUrl}{$related_page->url}/">{if $related_page->image}<img src="{$related_page->image|resizepage:242:198}" alt="{$page->name}" class="thumbnail w">{else}<img src="/images/empty.jpg" class="thumbnail w">{/if}</a></div>
|
||||
<div class="oth-title"><a rel="nofollow" target="_blank" href="{$related_page->parentUrl}{$related_page->url}/">{$related_page->name}</a></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
20
design/carheart/html/service_products.tpl
Normal file
20
design/carheart/html/service_products.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="clearfix">
|
||||
<div class="h3">Хиты продаж</div>
|
||||
<div class="related_products hits">
|
||||
{foreach from=$related_products item=related_product}
|
||||
<div class="col-sm-3">
|
||||
<div class="hit-image">
|
||||
<a rel="nofollow" target="_blank" href="/products/{$related_product->url}/">
|
||||
{if $related_product->image}
|
||||
<img class="thumbnail w" alt="" src="{$related_product->image->filename|escape|resize:200:100}" />
|
||||
{else}<img src="/images/empty.jpg" class="thumbnail w" alt="">{/if}</a>
|
||||
</div>
|
||||
<div class="hit-title">{$related_product->name}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 hit-price"><small>от</small> {round($related_product->variant->price)} <small>руб.</small></div>
|
||||
<div class="col-xs-6 hit-button"><a rel="nofollow" target="_blank" class="btn btn-danger" href="/products/{$related_product->url}/">Побробнее</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
62
design/carheart/html/services.tpl
Normal file
62
design/carheart/html/services.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
<ul class="breadcrumb">
|
||||
{foreach $breadcrumb as $unit}
|
||||
<li><a href="/{$unit->href}">{$unit->anchor}</a></li>
|
||||
{/foreach}
|
||||
<li><span>{$page->name}</span></li>
|
||||
</ul>
|
||||
|
||||
{if $sub_pages}
|
||||
<div class="services-view row">
|
||||
<div class="col-sm-12">
|
||||
<div class="content">
|
||||
{*<div class="page-content">
|
||||
<div class="row"> {if $page->image}
|
||||
<div class="col-sm-12">
|
||||
<h1>{$page->header}</h1>
|
||||
</div>
|
||||
<div class="col-sm-12"><img src="{$page->image|resizepage:390:113}" alt="{$page->name}" class="pull-left img-pull-left">{$page->toptext}</div>
|
||||
{else}
|
||||
<div class="col-sm-12">{$page->toptext}</div>
|
||||
{/if} </div>
|
||||
</div>*}
|
||||
<!-- хиты продаж -->
|
||||
{if $related_products}{include file='service_products.tpl'}{/if}
|
||||
<!-- / хиты продаж -->
|
||||
{include file='graphic_block_services.tpl'}
|
||||
<h1>{$page->header}</h1>
|
||||
{$page->toptext}
|
||||
<div class="services row">
|
||||
{foreach $sub_pages as $service}
|
||||
{if !$service->visible}{continue}{/if}
|
||||
<div class="col-sm-6">
|
||||
<div class="service thumbnail w">
|
||||
<div class="row">
|
||||
<div class="col-sm-5 service-image">{if $service->image} <img src="{$service->image|resizepage:242:198}" alt="{$service->name}">{else}<img src="/images/zag2.jpg" alt="">{/if}</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="service-title text-center h4"><a href="{$service->parentUrl}{$service->url}/">{$service->name}</a></div>
|
||||
<div class="service-adt text-center">{$service->introtext}</div>
|
||||
<div class="service-button text-center"><a href="{$service->parentUrl}{$service->url}/" class="btn btn-danger btn-block">Перейти в раздел</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<!-- другие услуги -->
|
||||
{include file='service_other.tpl'}
|
||||
{$page->bottext}
|
||||
<!-- / другие услуги -->
|
||||
{include file='contact_form_and_social.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
{include file='service.tpl'}
|
||||
{/if}
|
||||
{if !$detect->isMobile()}
|
||||
{literal}
|
||||
|
||||
<script>$(function(){ $('#right-cat-btn').show(); })</script>
|
||||
|
||||
{/literal}
|
||||
{/if}
|
||||
29
design/carheart/html/sidebar_catalog.tpl
Normal file
29
design/carheart/html/sidebar_catalog.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
<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}">{$c->name}</a>
|
||||
{if in_array($category->id, $c->children)}
|
||||
{categories_tree_index categories=$c->subcategories level=$level+1}
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $detect->isMobile()}<li><a href="http://atomicgarage.1gb.ru/brands/">Товары по маркам</a></li>{/if}
|
||||
</ul>
|
||||
{/if}
|
||||
{/function}
|
||||
{categories_tree_index categories=$categories}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
5
design/carheart/html/sub_pages.tpl
Normal file
5
design/carheart/html/sub_pages.tpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{foreach $sub_pages as $sub_page}
|
||||
<ul class="subpages">
|
||||
<li class="page"><a href="{$request_uri}{$sub_page->url}/">{$sub_page->name}</a></li>
|
||||
</ul>
|
||||
{/foreach}
|
||||
81
design/carheart/html/user.tpl
Normal file
81
design/carheart/html/user.tpl
Normal file
@@ -0,0 +1,81 @@
|
||||
{* Шаблон страницы зарегистрированного пользователя *}
|
||||
|
||||
{if $smarty.get.page && ($smarty.get.page == 'mailing' || $smarty.get.page == 'mailing_settings')}<h1>ПОДПИСКА</h1>
|
||||
{if $smarty.post.mailing_email && !$error}
|
||||
Вы успешно подписаны на рыссылку новостей.
|
||||
{/if}
|
||||
{if $smarty.get.unsubscribe && !$error}Вы успешно отписаны от рыссылки.{/if}
|
||||
{if $error}<div class="message_error">{if $error == 'email_syntax'}Некорректно введён email.{elseif $error == '00001'}Вы не подписаны на рассылку.{/if}</div>{/if}
|
||||
{else} <h1>{$user->name|escape}</h1> {/if}
|
||||
|
||||
{if $error}
|
||||
<div class="message_error">
|
||||
{if $error == 'empty_name'}Введите имя
|
||||
{elseif $error == 'empty_name2'}Введите фамилию
|
||||
{elseif $error == 'empty_email'}Введите email
|
||||
{elseif $error == 'empty_password'}Введите пароль
|
||||
{elseif $error == 'empty_phone'}Введите Телефон
|
||||
{elseif $error == 'empty_country'}Введите Страну
|
||||
{elseif $error == 'empty_region'}Введите Регион
|
||||
{elseif $error == 'empty_city'}Введите Город
|
||||
{elseif $error == 'empty_indx'}Введите Индекс
|
||||
{elseif $error == 'empty_adress'}Введите Адрес Доставки
|
||||
{elseif $error == 'user_exists'}Пользователь с таким email уже зарегистрирован
|
||||
{else}{$error}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="well">
|
||||
<form class="form form-horizontal" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Имя</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите имя" value="{$user->name}" name="name" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name2" class="col-sm-2 control-label">Фамилия</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите фамилию" value="{$user->name2}" name="name2" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format="email" data-notice="Введите email" value="{$user->email}" name="email" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone" class="col-sm-2 control-label">Телефон</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите телефон" value="{$user->phone}" name="phone" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="country" class="col-sm-2 control-label">Страна</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите страну" value="{$user->country}" name="country" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="region" class="col-sm-2 control-label">Регион</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите регион" value="{$user->region}" name="region" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="city" class="col-sm-2 control-label">Город</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите город" value="{$user->city}" name="city" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="indx" class="col-sm-2 control-label">Индекс</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-notice="Введите индекс" value="{$user->indx}" name="indx" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="adress" class="col-sm-2 control-label">Адрес доставки</label>
|
||||
<div class="col-sm-10"><input class="form-control" data-format=".+" data-notice="Введите адрес" value="{$user->adress}" name="adress" maxlength="255" type="text"/></div>
|
||||
</div>
|
||||
<label for="password" class="col-sm-2 control-label"> <a href='#' onclick="$('#password').show();return false;">Изменить пароль</a></label>
|
||||
<div class="col-sm-4"><input class="form-control" id="password" value="" name="password" type="password" style="display:none;"/></div>
|
||||
<input type="submit" class="btn btn-danger pull-right" value="Сохранить">
|
||||
</form>
|
||||
</div>
|
||||
{if $orders}
|
||||
<h2>Ваши заказы</h2>
|
||||
<ul id="orders_history">
|
||||
{foreach name=orders item=order from=$orders}
|
||||
<li>
|
||||
{$order->date|date} <a href='/order/{$order->url}'>Заказ №{$order->id}</a>
|
||||
{if $order->paid == 1}оплачен,{/if}
|
||||
{if $order->status == 0}ждет обработки{elseif $order->status == 1}в обработке{elseif $order->status == 2}выполнен{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
66
design/carheart/html/vopros.tpl
Normal file
66
design/carheart/html/vopros.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
function show_form()
|
||||
{
|
||||
?>
|
||||
<form action="" method=post>
|
||||
<div align="center">
|
||||
<br />Имя*<br />
|
||||
<input type="text" name="name" size="40">
|
||||
<br />Контактный телефон<br />
|
||||
<input type="text" name="tel" size="40">
|
||||
<br />Контактный email*<br />
|
||||
<input type="text" name="email" size="40">
|
||||
<br />Teма<br />
|
||||
<input type="text" name="title" size="40">
|
||||
<br />Сообщение*<br />
|
||||
<textarea rows="10" name="mess" cols="30"></textarea>
|
||||
<br /><input type="submit" value="Отправить" name="submit">
|
||||
</div>
|
||||
</form>
|
||||
* Помечены поля, которые необходимо заполнить
|
||||
<?
|
||||
}
|
||||
|
||||
function complete_mail() {
|
||||
// $_POST['title'] содержит данные из поля "Тема", trim() - убираем все лишние пробелы и переносы строк, htmlspecialchars() - преобразует специальные символы в HTML сущности, будем считать для того, чтобы простейшие попытки взломать наш сайт обломались, ну и substr($_POST['title'], 0, 1000) - урезаем текст до 1000 символов. Для переменных $_POST['mess'], $_POST['name'], $_POST['tel'], $_POST['email'] все аналогично
|
||||
$_POST['title'] = substr(htmlspecialchars(trim($_POST['title'])), 0, 1000);
|
||||
$_POST['mess'] = substr(htmlspecialchars(trim($_POST['mess'])), 0, 1000000);
|
||||
$_POST['name'] = substr(htmlspecialchars(trim($_POST['name'])), 0, 30);
|
||||
$_POST['tel'] = substr(htmlspecialchars(trim($_POST['tel'])), 0, 30);
|
||||
$_POST['email'] = substr(htmlspecialchars(trim($_POST['email'])), 0, 50);
|
||||
// если не заполнено поле "Имя" - показываем ошибку 0
|
||||
if (empty($_POST['name']))
|
||||
output_err(0);
|
||||
// если неправильно заполнено поле email - показываем ошибку 1
|
||||
if(!preg_match("/[0-9a-z_]+@[0-9a-z_^\.]+\.[a-z]{2,3}/i", $_POST['email']))
|
||||
output_err(1);
|
||||
// если не заполнено поле "Сообщение" - показываем ошибку 2
|
||||
if(empty($_POST['mess']))
|
||||
output_err(2);
|
||||
// создаем наше сообщение
|
||||
$mess = '
|
||||
Имя отправителя:'.$_POST['name'].'
|
||||
Контактный телефон:'.$_POST['tel'].'
|
||||
Контактный email:'.$_POST['email'].'
|
||||
'.$_POST['mess'];
|
||||
// $to - кому отправляем
|
||||
$to = 'dima@oneua.net';
|
||||
// $from - от кого
|
||||
$from='test@tst.ru';
|
||||
mail($to, $_POST['title'], $mess, "From:".$from);
|
||||
echo 'Спасибо! Ваше письмо отправлено.';
|
||||
}
|
||||
|
||||
function output_err($num)
|
||||
{
|
||||
$err[0] = 'ОШИБКА! Не введено имя.';
|
||||
$err[1] = 'ОШИБКА! Неверно введен e-mail.';
|
||||
$err[2] = 'ОШИБКА! Не введено сообщение.';
|
||||
echo '<p>'.$err[$num].'</p>';
|
||||
show_form();
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!empty($_POST['submit'])) complete_mail();
|
||||
else show_form();
|
||||
?>
|
||||
Reference in New Issue
Block a user