add public design files

This commit is contained in:
Alan
2026-02-15 18:29:53 +03:00
parent 446351622f
commit 818397acb7
486 changed files with 43323 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
order deny,allow
deny from all

View File

@@ -0,0 +1,21 @@
{* Список записей блога *}
<!-- Заголовок /-->
<h1>{$page->name}</h1>
{include file='pagination.tpl'}
<!-- Статьи /-->
<ul id="blog">
{foreach $posts as $post}
<li>
<h3><a data-post="{$post->id}" href="blog/{$post->url}">{$post->name|escape}</a></h3>
<p>{$post->date|date}</p>
<p>{$post->annotation}</p>
</li>
{/foreach}
</ul>
<!-- Статьи #End /-->
{include file='pagination.tpl'}

View File

@@ -0,0 +1,237 @@
{* Шаблон корзины *}
{$meta_title = "Корзина" scope=parent}
<h1>
{if $cart->purchases}В корзине {$cart->total_products} {$cart->total_products|plural:'товар':'товаров':'товара'}
{else}Корзина пуста{/if}
</h1>
{if $cart->purchases}
<form method="post" name="cart">
{* Список покупок *}
<table id="purchases">
{foreach from=$cart->purchases item=purchase}
<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}
</td>
{* Цена за единицу *}
<td class="price">
{($purchase->variant->price)|convert} {$currency->sign}
</td>
{* Количество *}
<td class="amount">
<select name="amounts[{$purchase->variant->id}]" 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 class="price">
{($purchase->variant->price*$purchase->amount)|convert}&nbsp;{$currency->sign}
</td>
{* Удалить из корзины *}
<td class="remove">
<a href="cart/remove/{$purchase->variant->id}">
<img src="design/{$settings->theme}/images/delete.png" title="Удалить из корзины" alt="Удалить из корзины">
</a>
</td>
</tr>
{/foreach}
{if $user->discount}
<tr>
<th class="image"></th>
<th class="name">скидка</th>
<th class="price"></th>
<th class="amount"></th>
<th class="price">
{$user->discount}&nbsp;%
</th>
<th class="remove"></th>
</tr>
{/if}
{if $coupon_request}
<tr class="coupon">
<th class="image"></th>
<th class="name" 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 class="price">
{if $cart->coupon_discount>0}
&minus;{$cart->coupon_discount|convert}&nbsp;{$currency->sign}
{/if}
</th>
<th class="remove"></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 class="image"></th>
<th class="name"></th>
<th class="price" colspan="4">
Итого
{$cart->total_price|convert}&nbsp;{$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 > 0}
<!-- Выбор варианта товара -->
<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}
*}
{* Доставка *}
{if $deliveries}
<h2>Выберите способ доставки:</h2>
<ul id="deliveries">
{foreach $deliveries as $delivery}
<li>
<div class="checkbox">
<input type="radio" name="delivery_id" value="{$delivery->id}" {if $delivery_id==$delivery->id}checked{elseif $delivery@first}checked{/if} id="deliveries_{$delivery->id}">
</div>
<h3>
<label for="deliveries_{$delivery->id}">
{$delivery->name}
{if $cart->total_price < $delivery->free_from && $delivery->price>0}
({$delivery->price|convert}&nbsp;{$currency->sign})
{elseif $cart->total_price >= $delivery->free_from}
(бесплатно)
{/if}
</label>
</h3>
<div class="description">
{$delivery->description}
</div>
</li>
{/foreach}
</ul>
{/if}
<h2>Адрес получателя</h2>
<div class="form cart_form">
{if $error}
<div class="message_error">
{if $error == 'empty_name'}Введите имя{/if}
{if $error == 'empty_email'}Введите email{/if}
{if $error == 'captcha'}Капча введена неверно{/if}
</div>
{/if}
<label>Имя, фамилия</label>
<input name="name" type="text" value="{$name|escape}" data-format=".+" data-notice="Введите имя"/>
<label>Email</label>
<input name="email" type="text" value="{$email|escape}" data-format="email" data-notice="Введите email" />
<label>Телефон</label>
<input name="phone" type="text" value="{$phone|escape}" />
<label>Адрес доставки</label>
<input name="address" type="text" value="{$address|escape}"/>
<label>Комментарий к&nbsp;заказу</label>
<textarea name="comment" id="order_comment">{$comment|escape}</textarea>
<div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha'/></div>
<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
<input type="submit" name="checkout" class="button" value="Оформить заказ">
</div>
</form>
{else}
В корзине нет товаров
{/if}

View File

@@ -0,0 +1,9 @@
{* Информера корзины (отдаётся аяксом) *}
{if $cart->total_products>0}
В <a href="./cart/">корзине</a>
{$cart->total_products} {$cart->total_products|plural:'товар':'товаров':'товара'}
на {$cart->total_price|convert} {$currency->sign|escape}
{else}
Корзина пуста
{/if}

View File

@@ -0,0 +1,171 @@
{* Шаблон письма пользователю о заказе *}
{$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}&nbsp;{$currency->sign}
{if $order->paid == 1}оплачен{else}еще не оплачен{/if},
{if $order->status == 0}ждет обработки{elseif $order->status == 1}в обработке{elseif $order->status == 2}выполнен{/if}
</h1>
<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}
</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->address|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}
</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} &times; {$purchase->price|convert:$currency->id}&nbsp;{$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}&nbsp;%
</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;">
&minus;{$order->coupon_discount}&nbsp;{$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}&nbsp;{$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}&nbsp;{$currency->sign}
</td>
</tr>
</table>
<br>
Вы всегда можете проверить состояние заказа по ссылке:<br>
<a href="{$config->root_url}/order/{$order->url}">{$config->root_url}/order/{$order->url}</a>
<br>

View 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>

View File

@@ -0,0 +1,41 @@
{* Страница с формой обратной связи *}
<h1>{$page->name|escape}</h1>
{$page->body}
<h2>Обратная связь</h2>
{if $message_sent}
{$name|escape}, ваше сообщение отправлено.
{else}
<form class="form feedback_form" 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}
<label>Имя</label>
<input data-format=".+" data-notice="Введите имя" value="{$name|escape}" name="name" maxlength="255" type="text"/>
<label>Email</label>
<input data-format="email" data-notice="Введите email" value="{$email|escape}" name="email" maxlength="255" type="text"/>
<label>Сообщение</label>
<textarea data-format=".+" data-notice="Введите сообщение" value="{$message|escape}" name="message">{$message|escape}</textarea>
<input class="button" type="submit" name="feedback" value="Отправить" />
<div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}"/></div>
<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
</form>
{/if}

View File

@@ -0,0 +1,268 @@
<!DOCTYPE html>
{*
Общий вид страницы
Этот шаблон отвечает за общий вид страниц без центрального блока.
*}
<html>
<head>
<base href="{$config->root_url}/"/>
<title>*{$meta_title|escape}</title>
{* Метатеги *}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="{$meta_description|escape}" />
<meta name="keywords" content="{$meta_keywords|escape}" />
<meta name="viewport" content="width=1024"/>
{* Стили *}
<link href="design/{$settings->theme|escape}/css/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="design/{$settings->theme|escape}/images/favicon.ico" rel="icon" type="image/x-icon"/>
<link href="design/{$settings->theme|escape}/images/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
{* JQuery *}
<script src="js/jquery/jquery.js" type="text/javascript"></script>
{* Всплывающие подсказки для администратора *}
{if $smarty.session.admin == 'admin'}
<script src ="js/admintooltip/admintooltip.js" type="text/javascript"></script>
<link href="js/admintooltip/css/admintooltip.css" rel="stylesheet" type="text/css" />
{/if}
{* Увеличитель картинок *}
<script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" href="js/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
{* Ctrl-навигация на соседние товары *}
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
{* Аяксовая корзина *}
<script src="design/{$settings->theme}/js/jquery-ui.min.js"></script>
<script src="design/{$settings->theme}/js/ajax_cart.js"></script>
{* js-проверка форм *}
<script src="/js/baloon/js/baloon.js" type="text/javascript"></script>
<link href="/js/baloon/css/baloon.css" rel="stylesheet" type="text/css" />
{* Автозаполнитель поиска *}
{literal}
<script src="js/autocomplete/jquery.autocomplete-min.js" type="text/javascript"></script>
<style>
.autocomplete-w1 { position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; overflow-x:auto; overflow-y: auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; }
.autocomplete .selected { background:#F0F0F0; }
.autocomplete div { padding:2px 5px; white-space:nowrap; }
.autocomplete strong { font-weight:normal; color:#3399FF; }
</style>
<script>
$(function() {
// Автозаполнитель поиска
$(".input_search").autocomplete({
serviceUrl:'ajax/search_products.php',
minChars:1,
noCache: false,
onSelect:
function(value, data){
$(".input_search").closest('form').submit();
},
fnFormatResult:
function(value, data, currentValue){
var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g');
var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';
return (data.image?"<img align=absmiddle src='"+data.image+"'> ":'') + value.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
}
});
});
</script>
{/literal}
</head>
<body>
<!-- Верхняя строка -->
<div id="top_background">
<div id="top">
<!-- Меню -->
<ul id="menu">
{foreach $pages as $p}
{* Выводим только страницы из первого меню *}
{if $p->menu_id == 1}
<li {if $page && $page->id == $p->id}class="selected"{/if}>
<a data-page="{$p->id}" href="{$p->url}">{$p->name|escape}</a>
</li>
{/if}
{/foreach}
</ul>
<!-- Меню (The End) -->
<!-- Корзина -->
<div id="cart_informer">
{* Обновляемая аяксом корзина должна быть в отдельном файле *}
{include file='cart_informer.tpl'}
</div>
<!-- Корзина (The End)-->
<!-- Вход пользователя -->
<div id="account">
{if $user}
<span id="username">
<a href="user">{$user->name}</a>{if $group->discount>0},
ваша скидка &mdash; {$group->discount}%{/if}
</span>
<a id="logout" href="user/logout">выйти</a>
{else}
<a id="register" href="user/register">Регистрация</a>
<a id="login" href="user/login">Вход</a>
{/if}
</div>
<!-- Вход пользователя (The End)-->
</div>
</div>
<!-- Верхняя строка (The End)-->
<!-- Шапка -->
<div id="header">
<div id="logo">
<a href="/"><img src="design/{$settings->theme|escape}/images/logo.png" title="{$settings->site_name|escape}" alt="{$settings->site_name|escape}"/></a>
</div>
<div id="contact">
(095) <span id="phone">545-54-54</span>
<div id="address">Москва, шоссе Энтузиастов 45/31, офис 453</div>
</div>
</div>
<!-- Шапка (The End)-->
<!-- Вся страница -->
<div id="main">
<!-- Основная часть -->
<div id="content">
{$content}
</div>
<!-- Основная часть (The End) -->
<div id="left">
<!-- Поиск-->
<div id="search">
<form action="products">
<input class="input_search" type="text" name="keyword" value="{$keyword|escape}" placeholder="Поиск товара"/>
<input class="button_search" value="" type="submit" />
</form>
</div>
<!-- Поиск (The End)-->
<!-- Меню каталога -->
<div id="catalog_menu">
{* Рекурсивная функция вывода дерева категорий *}
{function name=categories_tree}
{if $categories}
<ul>
{foreach $categories as $c}
{* Показываем только видимые категории *}
{if $c->visible}
<li>
{if $c->image}<img src="{$config->categories_images_dir}{$c->image}" alt="{$c->name}">{/if}
<a {if $category->id == $c->id}class="selected"{/if} href="catalog/{$c->url}" data-category="{$c->id}">{$c->name}</a>
{categories_tree categories=$c->subcategories}
</li>
{/if}
{/foreach}
</ul>
{/if}
{/function}
{if $category->id == $c->id}
{if in_array($category->id, $c->children)}
{categories_tree categories=$c->subcategories}
{/if}
{/if}
</div>
<!-- Меню каталога (The End)-->
<!-- Все бренды -->
{* Выбираем в переменную $all_brands все бренды *}
{get_brands var=all_brands}
{if $all_brands}
<div id="all_brands">
<h2>Все бренды:</h2>
{foreach $all_brands as $b}
{if $b->image}
<a href="brands/{$b->url}"><img src="{$config->brands_images_dir}{$b->image}" alt="{$b->name|escape}"></a>
{else}
<a href="brands/{$b->url}">{$b->name}</a>
{/if}
{/foreach}
</div>
{/if}
<!-- Все бренды (The End)-->
<!-- Выбор валюты -->
{* Выбор валюты только если их больше одной *}
{if $currencies|count>1}
<div id="currencies">
<h2>Валюта</h2>
<ul>
{foreach from=$currencies item=c}
{if $c->enabled}
<li class="{if $c->id==$currency->id}selected{/if}"><a href='{url currency_id=$c->id}'>{$c->name|escape}</a></li>
{/if}
{/foreach}
</ul>
</div>
{/if}
<!-- Выбор валюты (The End) -->
<!-- Просмотренные товары -->
{get_browsed_products var=browsed_products limit=20}
{if $browsed_products}
<h2>Вы просматривали:</h2>
<ul id="browsed_products">
{foreach $browsed_products as $browsed_product}
<li>
<a href="products/{$browsed_product->url}"><img src="{$browsed_product->image->filename|resize:50:50}" alt="{$browsed_product->name}" title="{$browsed_product->name}"></a>
</li>
{/foreach}
</ul>
{/if}
<!-- Просмотренные товары (The End)-->
<!-- Меню блога -->
{* Выбираем в переменную $last_posts последние записи *}
{get_posts var=last_posts limit=5}
{if $last_posts}
<div id="blog_menu">
<h2>Новые записи в <a href="blog">блоге</a></h2>
{foreach $last_posts as $post}
<ul>
<li data-post="{$post->id}">{$post->date|date} <a href="blog/{$post->url}">{$post->name|escape}</a></li>
</ul>
{/foreach}
</div>
{/if}
<!-- Меню блога (The End) -->
</div>
</div>
<!-- Вся страница (The End)-->
<!-- Футер -->
<div id="footer">
<a href="{$config->root_url}">{$settings->site_name|escape}</a>
</div>
<!-- Футер (The End)-->
</body>
</html>

View File

@@ -0,0 +1,22 @@
{* Страница входа пользователя *}
{$meta_title = "Вход" scope=parent}
<h1>Вход</h1>
{if $error}
<div class="message_error">
{if $error == 'login_incorrect'}Неверный логин или пароль
{elseif $error == 'user_disabled'}Ваш аккаунт еще не активирован.
{else}{$error}{/if}
</div>
{/if}
<form class="form login_form" method="post">
<label>Email</label>
<input type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255" />
<label>Пароль (<a href="user/password_remind">напомнить</a>)</label>
<input type="password" name="password" data-format=".+" data-notice="Введите пароль" value="" />
<input type="submit" class="button" name="login" value="Войти">
</form>

View File

@@ -0,0 +1,184 @@
{* Главная страница магазина *}
{* Для того чтобы обернуть центральный блок в шаблон, отличный от index.tpl *}
{* Укажите нужный шаблон строкой ниже. Это работает и для других модулей *}
{$wrapper = 'index.tpl' scope=parent}
{* Заголовок страницы *}
<h1>{$page->header}</h1>
{* Тело страницы *}
{$page->body}
{* Рекомендуемые товары *}
{get_featured_products var=featured_products}
{if $featured_products}
<!-- Список товаров-->
<h1>Рекомендуемые товары</h1>
<ul class="tiny_products">
{foreach $featured_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 > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="featured_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
</td>
<td>
{if $v->name}<label class="variant_name" for="featured_{$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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</li>
<!-- Товар (The End)-->
{/foreach}
</ul>
{/if}
{* Новинки *}
{get_new_products var=new_products limit=3}
{if $new_products}
<h1>Новинки</h1>
<!-- Список товаров-->
<ul class="tiny_products">
{foreach $new_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 > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="new_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
</td>
<td>
{if $v->name}<label class="variant_name" for="new_{$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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</li>
<!-- Товар (The End)-->
{/foreach}
</ul>
{/if}
{* Акционные товары *}
{get_discounted_products var=discounted_products limit=9}
{if $discounted_products}
<h1>Акционные товары</h1>
<!-- Список товаров-->
<ul class="tiny_products">
{foreach $discounted_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 > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="discounted_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
</td>
<td>
{if $v->name}<label class="variant_name" for="discounted_{$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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</li>
<!-- Товар (The End)-->
{/foreach}
</ul>
{/if}

View File

@@ -0,0 +1,215 @@
{* Страница заказа *}
{$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>
{* Список покупок *}
<table id="purchases">
{foreach $purchases as $purchase}
<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}
</td>
{* Цена за единицу *}
<td class="price">
{($purchase->price)|convert}&nbsp;{$currency->sign}
</td>
{* Количество *}
<td class="amount">
&times; {$purchase->amount}&nbsp;{$settings->units}
</td>
{* Цена *}
<td class="price">
{($purchase->price*$purchase->amount)|convert}&nbsp;{$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}&nbsp;%
</th>
</tr>
{/if}
{* Купон, если есть *}
{if $order->coupon_discount > 0}
<tr>
<th class="image"></th>
<th class="name">купон</th>
<th class="price"></th>
<th class="amount"></th>
<th class="price">
&minus;{$order->coupon_discount|convert}&nbsp;{$currency->sign}
</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}&nbsp;{$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}&nbsp;{$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}&nbsp;{$currency->sign}
</td>
</tr>
{/if}
</table>
{* Детали заказа *}
<h2>Детали заказа</h2>
<table class="order_info">
<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>
{if !$order->paid}
{* Выбор способа оплаты *}
{if $payment_methods && !$payment_method && $order->total_price>0}
<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}&nbsp;{$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>Способ оплаты &mdash; {$payment_method->name}
<form method=post><input type=submit name='reset_payment_method' value='Выбрать другой способ оплаты'></form>
</h2>
<p>
{$payment_method->description}
</p>
<h2>
К оплате {$order->total_price|convert:$payment_method->currency_id}&nbsp;{$all_currencies[$payment_method->currency_id]->sign}
</h2>
{* Форма оплаты, генерируется модулем оплаты *}
{checkout_form order_id=$order->id module=$payment_method->module}
{/if}
{/if}

View File

@@ -0,0 +1,7 @@
{* Шаблон текстовой страницы *}
<!-- Заголовок страницы -->
<h1 data-page="{$page->id}">{$page->header|escape}</h1>
<!-- Тело страницы -->
{$page->body}

View File

@@ -0,0 +1,55 @@
{* Постраничный вывод *}
{if $total_pages_num>1}
{* Скрипт для листания через ctrl → *}
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
<!-- Листалка страниц -->
<div class="pagination">
{* Количество выводимых ссылок на страницы *}
{$visible_pages = 11}
{* По умолчанию начинаем вывод со страницы 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 страницу отображается всегда *}
<a {if $current_page_num==1}class="selected"{/if} href="{url page=null}">1</a>
{* Выводим страницы нашего "окна" *}
{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)}
<a {if $p==$current_page_num}class="selected"{/if} href="{url page=$p}">...</a>
{else}
<a {if $p==$current_page_num}class="selected"{/if} href="{url page=$p}">{$p}</a>
{/if}
{/section}
{* Ссылка на последнююю страницу отображается всегда *}
<a {if $current_page_num==$total_pages_num}class="selected"{/if} href="{url page=$total_pages_num}">{$total_pages_num}</a>
<a href="{url page=all}">все сразу</a>
{if $current_page_num==2}<a class="prev_page_link" href="{url page=null}">←назад</a>{/if}
{if $current_page_num>2}<a class="prev_page_link" href="{url page=$current_page_num-1}">←назад</a>{/if}
{if $current_page_num<$total_pages_num}<a class="next_page_link" href="{url page=$current_page_num+1}">вперед→</a>{/if}
</div>
<!-- Листалка страниц (The End) -->
{/if}

View File

@@ -0,0 +1,22 @@
{* Письмо пользователю для восстановления пароля *}
{if $email_sent}
<h1>Вам отправлено письмо</h1>
<p>На {$email|escape} отправлено письмо для восстановления пароля.</p>
{else}
<h1>Напоминание пароля</h1>
{if $error}
<div class="message_error">
{if $error == 'user_not_found'}Пользователь не найден
{else}{$error}{/if}
</div>
{/if}
<form class="form" method="post">
<label>Введите email, который вы указывали при регистрации</label>
<input type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255"/>
<input type="submit" class="button_submit" value="Вспомнить" />
</form>
{/if}

View File

@@ -0,0 +1,88 @@
{* Страница отдельной записи блога *}
<!-- Заголовок /-->
<h1 data-post="{$post->id}">{$post->name|escape}</h1>
<p>{$post->date|date}</p>
<!-- Тело поста /-->
{$post->text}
<!-- Соседние записи /-->
<div id="back_forward">
{if $prev_post}
←&nbsp;<a class="prev_page_link" href="blog/{$prev_post->url}">{$prev_post->name}</a>
{/if}
{if $next_post}
<a class="next_page_link" href="blog/{$next_post->url}">{$next_post->name}</a>&nbsp;→
{/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" />
<form class="comment_form" method="post" action="">
<h2>Написать комментарий</h2>
{if $error}
<div class="message_error">
{if $error=='captcha'}
Неверно введена капча
{elseif $error=='empty_name'}
Введите имя
{elseif $error=='empty_comment'}
Введите комментарий
{/if}
</div>
{/if}
<textarea class="comment_textarea" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea><br />
<div>
<label for="comment_name">Имя</label>
<input class="input_name" type="text" id="comment_name" name="name" value="{$comment_name|escape}" data-format=".+" data-notice="Введите имя"/><br />
<input class="button" type="submit" name="comment" value="Отправить" />
<label for="comment_captcha">Число</label>
<div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}"/></div>
<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
</div>
</form>
<!--Форма отправления комментария (The End)-->
</div>
<!-- Комментарии (The End) -->

View File

@@ -0,0 +1,228 @@
{* Страница товара *}
<!-- Хлебные крошки /-->
<div id="path">
<a href="./">Главная</a>
{foreach from=$category->path item=cat}
→ <a href="catalog/{$cat->url}">{$cat->name|escape}</a>
{/foreach}
{if $brand}
→ <a href="catalog/{$cat->url}/{$brand->url}">{$brand->name|escape}</a>
{/if}
{$product->name|escape}
</div>
<!-- Хлебные крошки #End /-->
<h1 data-product="{$product->id}">{$product->name|escape}</h1>
<div class="product">
<!-- Большое фото -->
{if $product->image}
<div class="image">
<a href="{$product->image->filename|resize:800:600:w}" class="zoom" data-rel="group"><img src="{$product->image->filename|resize:300:300}" alt="{$product->product->name|escape}" /></a>
</div>
{/if}
<!-- Большое фото (The End)-->
<!-- Описание товара -->
<div class="description">
{$product->body}
{if $product->variants|count > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="product_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $product->variant->id==$v->id}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
</td>
<td>
{if $v->name}<label class="variant_name" for="product_{$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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</div>
<!-- Описание товара (The End)-->
<!-- Дополнительные фото продукта -->
{if $product->images|count>1}
<div class="images">
{* cut удаляет первую фотографию, если нужно начать 2-й - пишем cut:2 и тд *}
{foreach $product->images|cut as $i=>$image}
<a href="{$image->filename|resize:800:600:w}" class="zoom" data-rel="group"><img src="{$image->filename|resize:95:95}" alt="{$product->name|escape}" /></a>
{/foreach}
</div>
{/if}
<!-- Дополнительные фото продукта (The End)-->
<p>&nbsp;</p>
{if $product->features}
<!-- Характеристики товара -->
<h2>Характеристики</h2>
<ul class="features">
{foreach $product->features as $f}
<li>
<label>{$f->name}</label>
<span>{$f->value}</span>
</li>
{/foreach}
</ul>
<!-- Характеристики товара (The End)-->
{/if}
<!-- Соседние товары /-->
<div id="back_forward">
{if $prev_product}
←&nbsp;<a class="prev_page_link" href="products/{$prev_product->url}">{$prev_product->name|escape}</a>
{/if}
{if $next_product}
<a class="next_page_link" href="products/{$next_product->url}">{$next_product->name|escape}</a>&nbsp;→
{/if}
</div>
</div>
<!-- Описание товара (The End)-->
{* Связанные товары *}
{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 > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="related_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {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->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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</li>
<!-- Товар (The End)-->
{/foreach}
</ul>
{/if}
<!-- Комментарии -->
<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}
<!--Форма отправления комментария-->
<form class="comment_form" method="post">
<h2>Написать комментарий</h2>
{if $error}
<div class="message_error">
{if $error=='captcha'}
Неверно введена капча
{elseif $error=='empty_name'}
Введите имя
{elseif $error=='empty_comment'}
Введите комментарий
{/if}
</div>
{/if}
<textarea class="comment_textarea" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea><br />
<div>
<label for="comment_name">Имя</label>
<input class="input_name" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя"/><br />
<input class="button" type="submit" name="comment" value="Отправить" />
<label for="comment_captcha">Число</label>
<div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt='captcha'/></div>
<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
</div>
</form>
<!--Форма отправления комментария (The End)-->
</div>
<!-- Комментарии (The End) -->
{literal}
<script>
$(function() {
// Раскраска строк характеристик
$(".features li:even").addClass('even');
// Зум картинок
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
});
</script>
{/literal}

View File

@@ -0,0 +1,158 @@
{* Список товаров *}
<!-- Хлебные крошки /-->
<div id="path">
<a href="/">Главная</a>
{if $category}
{foreach from=$category->path item=cat}
→ <a href="catalog/{$cat->url}">{$cat->name|escape}</a>
{/foreach}
{if $brand}
→ <a href="catalog/{$cat->url}/{$brand->url}">{$brand->name|escape}</a>
{/if}
{elseif $brand}
→ <a href="brands/{$brand->url}">{$brand->name|escape}</a>
{elseif $keyword}
→ Поиск
{/if}
</div>
<!-- Хлебные крошки #End /-->
{* Заголовок страницы *}
{if $keyword}
<h1>Поиск {$keyword|escape}</h1>
{elseif $page}
<h1>{$page->name|escape}</h1>
{else}
<h1>{$category->name|escape} {$brand->name|escape} {$keyword|escape}</h1>
{/if}
{* Описание страницы (если задана) *}
{$page->body}
{if $current_page_num==1}
{* Описание категории *}
{$category->description}
{/if}
{* Фильтр по брендам *}
{if $category->brands}
<div id="brands">
<a href="catalog/{$category->url}" {if !$brand->id}class="selected"{/if}>Все бренды</a>
{foreach name=brands item=b from=$category->brands}
{if $b->image}
<a data-brand="{$b->id}" href="catalog/{$category->url}/{$b->url}"><img src="{$config->brands_images_dir}{$b->image}" alt="{$b->name|escape}"></a>
{else}
<a data-brand="{$b->id}" href="catalog/{$category->url}/{$b->url}" {if $b->id == $brand->id}class="selected"{/if}>{$b->name|escape}</a>
{/if}
{/foreach}
</div>
{/if}
{* Описание бренда *}
{$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}
{* Сортировка *}
{if $products|count>0}
<div class="sort">
Сортировать по
<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}
{include file='pagination.tpl'}
<!-- Список товаров-->
<ul class="products">
{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) -->
<div class="product_info">
<!-- Название товара -->
<h3 class="{if $product->featured}featured{/if}"><a data-product="{$product->id}" href="products/{$product->url}">{$product->name|escape}</a></h3>
<!-- Название товара (The End) -->
<!-- Описание товара -->
<div class="annotation">{$product->annotation}</div>
<!-- Описание товара (The End) -->
{if $product->variants|count > 0}
<!-- Выбор варианта товара -->
<form class="variants" action="/cart">
<table>
{foreach $product->variants as $v}
<tr class="variant">
<td>
<input id="variants_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
</td>
<td>
{if $v->name}<label class="variant_name" for="variants_{$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>
</tr>
{/foreach}
</table>
<input type="submit" class="button" value="в корзину" data-result-text="добавлено"/>
</form>
<!-- Выбор варианта товара (The End) -->
{else}
Нет в наличии
{/if}
</div>
</li>
<!-- Товар (The End)-->
{/foreach}
</ul>
{include file='pagination.tpl'}
<!-- Список товаров (The End)-->
{else}
Товары не найдены
{/if}
<!--Каталог товаров (The End)-->

View File

@@ -0,0 +1,33 @@
{* Страница регистрации *}
{$meta_title = "Регистрация" scope=parent}
<h1>Регистрация</h1>
{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" method="post">
<label>Имя</label>
<input type="text" name="name" data-format=".+" data-notice="Введите имя" value="{$name|escape}" maxlength="255" />
<label>Email</label>
<input type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255" />
<label>Пароль</label>
<input type="password" name="password" data-format=".+" data-notice="Введите пароль" value="" />
<div class="captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}"/></div>
<input class="input_captcha" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/>
<input type="submit" class="button" name="register" value="Зарегистрироваться">
</form>

View File

@@ -0,0 +1,39 @@
{* Шаблон страницы зарегистрированного пользователя *}
<h1>{$user->name|escape}</h1>
{if $error}
<div class="message_error">
{if $error == 'empty_name'}Введите имя
{elseif $error == 'empty_email'}Введите email
{elseif $error == 'empty_password'}Введите пароль
{elseif $error == 'user_exists'}Пользователь с таким email уже зарегистрирован
{else}{$error}{/if}
</div>
{/if}
<form class="form" method="post">
<label>Имя</label>
<input data-format=".+" data-notice="Введите имя" value="{$name|escape}" name="name" maxlength="255" type="text"/>
<label>Email</label>
<input data-format="email" data-notice="Введите email" value="{$email|escape}" name="email" maxlength="255" type="text"/></td>
<label><a href='#' onclick="$('#password').show();return false;">Изменить пароль</a></label>
<input id="password" value="" name="password" type="password" style="display:none;"/>
<input type="submit" class="button" value="Сохранить">
</form>
{if $orders}
<p></p>
<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}