Commit 48680c56 authored by Яков's avatar Яков
Browse files

first

parents
<?php
if ($childrens && count($childrens) > 0)
{
echo '<div class="childrenList">';
$count = 1;
foreach ($childrens as $children)
{
$active_class = "";
if ($children->getAlias() == $alias)
{
$active_class = 'active';
}
if ($count % 10 == 0)
{
echo '<br />';
}
$count++;
echo '<a class="'. $active_class .'" href="' . url_for('@catalog_show_cat?alias='. $children->getAlias()) . '">'. Page::niceTitleView($children->getTitle()) .'</a>';
}
echo '</div><i class="br20"></i>';
}
\ No newline at end of file
<?php
if ((isset($lists) && count($lists) > 0) || (isset($values) && count($values) > 0)) {
$url = $sf_request->getPathInfo();
?>
<form method="get" action="<?php echo $url;?>" class="catalog_filters custom_slider-ui">
<?php
$lists_count = count($lists);
if ($lists_count > 0) {
foreach ($lists as $list) {
echo '<div class="catalog_filters__list">';
echo '<div class="catalog_filters__h">' . $list['Translation'][$culture]['title'] . '</div>';
foreach ($list['ProductPropList'] as $prop_list) {
echo '<label><input autocomplete="off" onchange="filter.change();" name="filter_list[' . $list['id'] . '][]" value="' . $prop_list['id'] . '" type="checkbox">' . $prop_list['Translation'][$culture]['variant'] . '</label>';
}
echo '</div>';
}
}
$values_count = count($values);
if ($values_count > 0) {
foreach ($values as $key => $value) {
if ($value['min'] != $value['max']) {
echo '<div class="catalog_filters__range">';
echo '<div class="catalog_filters__h">' . $value['ProductProp']['Translation'][$culture]['title'] . '</div>';
echo '<div id="slider_power_' . $key . '" class="slider_prop" data-slider_key="' . $key . '" data-min="' . (int)$value['min'] . '" data-max="' . (int)$value['max'] . '" data-start="[' . (int)$value['min'] . ',' . (int)$value['max'] . ']" data-connect="true"></div>';
echo '<input autocomplete="off" class="slider_power_inp_min slider_power_inp_' . $key . '" type="hidden" name="filter_range[' . $value['prop_id'] . '][min]" value="" />';
echo '<input autocomplete="off" class="slider_power_inp_max slider_power_inp_' . $key . '" type="hidden" name="filter_range[' . $value['prop_id'] . '][max]" value="" />';
echo '</div>';
}
}
}
echo '<i class="br20"></i><a href="' . $url . '?reset" class="catalog_filters__reset bbs_d fs_13 red_link">Сбросить фильтр</a>';
?>
</form>
<script type="text/javascript">
$(document).ready(function(){
$('.slider_prop').each(function (index, element) {
window[element.id] = document.getElementById(element.id);
$(window[element.id]).before('<div class="slider_count"><span></span><span></span></div>');
noUiSlider.create(window[element.id], {
start: $(window[element.id]).data('start'),
connect: $(window[element.id]).data('connect'),
margin: 0,
range: {
'min': $(window[element.id]).data('min'),
'max': $(window[element.id]).data('max')
},
step: 1
});
window[element.id].noUiSlider.on('update', function (values, handle) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
var key = $(this.target).data('slider_key');
values.forEach(function (value, index, array) {
$(_this.target).find('.noUi-origin .noUi-handle[data-handle=' + index + ']').text(parseInt(value));
$('.slider_power_inp_' + key).eq(index).val(parseInt(value));
});
});
window[element.id].noUiSlider.on('end', function(values, handle){
filter.change();
});
});
});
</script>
<?php
}
?>
\ No newline at end of file
<li style="padding: 0px;"><i class="br15"></i></li>
<style>
.close {
display: none; padding-left: 5px;
}
.open {
padding-left:0px;margin:0;margin-top:5px;
}
</style>
<?php
$open = $sf_data->getRaw('open');
$li_class = 'unselected';
if ($path == url_for('@catalog_special?type=sale') && count($open) == 0)
{
$li_class = 'selected';
}
$special_sale_count = Doctrine_Query::create()
->select("COUNT(p.id)")
->from("Product p")
->where("p.sell_out = 1")
->andWhere('p.deleted_at is null')
->fetchArray();
if ($special_sale_count[0]['COUNT'] > 0)
{
?>
<li class="special_sale <?php echo $li_class ?>"><a href="<?php echo url_for('@catalog_special?type=sale') ?>" style="color:#d57575;border-color:rgba(255,131,24,0.3);"><span>% Распродажа</span></a></li>
<?php
}
foreach ($menu as $elem)
{
$li_class = 'unselected';
if (in_array($elem['id'], $open))
{
$li_class = 'selected';
}
echo '<li class="' . $li_class . '">';
echo '<a href="' . url_for('@catalog_show_cat?alias=' . $elem['alias']) . '"><span>' . Page::niceTitleView($elem['title']) .'</span></a>';
// if ($elem['Children'])
// {
//
// $ul_class = 'close';
// if (in_array($elem['id'], $open))
// {
// $ul_class = 'open';
// }
// echo '<ul class="fs_13 ' . $ul_class . '">';
// foreach ($elem['Children'] as $child)
// {
// $li_current_class = 'uncurrent';
// if (in_array($child['id'], $open) && count($child['Children']) == 0)
// {
// $li_current_class = 'current';
// }
// echo '<li class="' . $li_current_class . '">';
// echo '<a href="' . url_for('@catalog_show_cat?alias=' . $child['alias']) . '">' . Page::niceTitleView($child['title']) . '</a>';
// if ($child['Children'])
// {
// // дети детей
// $ul_class = 'close';
// if (in_array($child['id'], $open))
// {
// $ul_class = 'open';
// }
// echo '<ul class="fs_13 ' . $ul_class . '">';
// foreach ($child['Children'] as $grandchildren)
// {
//
// $li_class = 'uncurrent';
// $a_class = 'unselected';
// if (in_array($grandchildren['id'], $open) && count($grandchildren['Children']) == 0)
// {
// $li_class = 'current';
// $a_class = 'selected';
// }
//
// echo '<li class="' . $li_class . '">';
// echo '<a class="' . $a_class . '" href="' . url_for('@catalog_show_cat?alias=' . $grandchildren['alias']) . '">' . Page::niceTitleView($grandchildren['title']) . '</a>';
// ////
// if ($grandchildren['Children'])
// {
// // дети детей, детей
// $ul_class = 'close';
// if (in_array($grandchildren['id'], $open))
// {
// $ul_class = 'open';
// }
// echo '<ul class="fs_13 ' . $ul_class . '">';
// foreach ($grandchildren['Children'] as $grandchildrenChildren)
// {
//
// $li_class = 'uncurrent';
// $a_class = 'unselected';
// if (in_array($grandchildrenChildren['id'], $open) && count($grandchildrenChildren['Children']) == 0)
// {
// $li_class = 'current';
// $a_class = 'selected';
// }
//
// echo '<li class="' . $li_class . '">';
// echo '<a class="' . $a_class . '" href="' . url_for('@catalog_show_cat?alias=' . $grandchildrenChildren['alias']) . '">' . Page::niceTitleView($grandchildrenChildren['title']) . '</a>';
// ////////
//
// if ($grandchildrenChildren['Children'])
// {
// // дети детей, детей детей
// $ul_class = 'close';
// if (in_array($grandchildrenChildren['id'], $open))
// {
// $ul_class = 'open';
// }
// echo '<ul class="fs_13 ' . $ul_class . '">';
// foreach ($grandchildrenChildren['Children'] as $grandchildrenChildrenChildren)
// {
//
// $li_class = 'uncurrent';
// $a_class = 'unselected';
// if (in_array($grandchildrenChildrenChildren['id'], $open))
// {
// $li_class = 'current';
// $a_class = 'selected';
// }
//
// echo '<li class="' . $li_class . '">';
// echo '<a class="' . $a_class . '" href="' . url_for('@catalog_show_cat?alias=' . $grandchildrenChildrenChildren['alias']) . '">' . Page::niceTitleView($grandchildrenChildrenChildren['title']) . '</a>';
// echo '</li>';
// }
// echo '</ul>';
// }
//
// ////////
// echo '</li>';
// }
// echo '</ul>';
// }
// ////
// echo '</li>';
// }
// echo '</ul>';
// }
// echo '</li>';
// }
// echo '</ul>';
// }
echo '</li>';
}
// Оригинал
//<li>
// <a href="/catalog/815/"><span>1 Электротовары</span></a>
// <ul class="fs_13" style="display: none;padding-left:5px;">
// <li>
// <a href="/catalog/816/"><span>Боксы и Щитки.</span></a>
// <ul class="fs_13" style="display: none;padding-left:5px;">
// <li><a href="/catalog/818/"><span>Бокс EL-BI</span></a></li>
// <li><a href="/catalog/819/"><span>Боксы прочие</span></a></li>
// <li><a href="/catalog/820/"><span>Щит металлический</span></a></li>
// <li><a href="/catalog/822/"><span>Щит металлопластик</span></a></li>
// <li><a href="/catalog/823/"><span>Щиток под счетчик</span></a></li>
// </ul>
// </li>
// <li>
// <a href="/catalog/824/"><span>Вилки и колодки</span></a>
// <ul class="fs_13" style="display: none;padding-left:5px;">
// <li><a href="/catalog/825/"><span>Вилка+розетка в наборе</span></a></li>
// <li><a href="/catalog/826/"><span>Вилки и колодки EL-BI</span></a></li>
// </ul>
// </li>
// </ul>
//</li>
?>
<li style="padding: 0px"><i class="br15"></i></li>
\ No newline at end of file
<h3 style="font-size: 25px; color:#4a4a4a; font-family: 'lato'; font-weight: 400; text-align: center">Личный кабинет</h3>
<div class="er_content__side_menu_wrap">
<ul class="er_content__side_menu_lk">
<?php
foreach ($links as $link)
{
$dopClass = false;
if ($link['url'] == $path)
{
$dopClass = 'active';
}
echo '<li class="' . $dopClass . '">';
echo '<a href="' . $link['url'] . '">' . $link['anchor'] . '</a>';
echo '</li>';
}
?>
</ul>
</div>
\ No newline at end of file
<?php
if(isset($count) && $count > 0){
$xmlhttp = $sf_request->isXmlHttpRequest();
$in_page_count = (isset($in_page_count) ? $in_page_count : 12);
$active = $sf_request->getParameter('page', 1);
$count = ceil($count / $in_page_count);
if($count > 1){
echo '<div class="pagination">';
for($i = 1; $i <= $count; $i++){
echo '<a ' . ($xmlhttp && $active != $i ? 'onclick="filter.submit(' . $i . ');return false;"' : '') . ' ' . ($active != $i ? 'href="?page=' . $i . '"' : '') . ' class="pagination__item ' . ($active == $i ? 'pagination__item_active' : '') . '">' . $i . '</a>';
}
echo '</div>';
}
}
?>
<table class="calculator_table custom_slider-ui to_div" cellpadding="0" cellspacing="0">
<tbody valign="top" align="center">
<tr>
<td colspan="5">
<span class="calculator_table__title"><?php echo __('Сколько камней нужно в баню');?></span>
<i class="br10"></i>
</td>
</tr>
<tr>
<td colspan="5">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top" align="center">
<tr>
<td align="left" valign="middle">
<i class="br20"></i>
<i class="br10 mobile_hide"></i>
<span class="calculator_table__item"><?php echo __('Размер бани');?></span>
<i class="br15"></i>
</td>
<td></td>
<td align="right" valign="middle">
<i class="br10 mobile_hide"></i>
<div class="calculator_table__value">
<nobr><span class="calculator_v">7,36</span>&nbsp;<?php echo __('м');?><sup class="fs_18">3</sup></nobr>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="1" align="left">
<span class="calculator_table__opt_title"><?php echo __('Длина') . ' <span class="slider_prop__val"></span> ' . __('м');?></span>
<i class="br10"></i>
<div id="slider_length" class="slider_prop" data-min="2" data-max="10" data-start="2" data-connect="[true,false]" data-step="0.5"></div>
</td>
<td width="40"></td>
<td width="1" align="left">
<span class="calculator_table__opt_title"><?php echo __('Ширина') . ' <span class="slider_prop__val"></span> ' . __('м');?></span>
<i class="br10"></i>
<div id="slider_width" class="slider_prop" data-min="2" data-max="10" data-start="2" data-connect="[true,false]" data-step="0.5"></div>
</td>
<td width="40"></td>
<td width="1" align="left">
<span class="calculator_table__opt_title"><?php echo __('Высота') . ' <span class="slider_prop__val"></span> ' . __('м');?></span>
<i class="br10"></i>
<div id="slider_height" class="slider_prop" data-min="2" data-max="4" data-start="2" data-connect="[true,false]" data-step="0.5"></div>
</td>
<td></td>
</tr>
<tr>
<td colspan="5">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top" align="center">
<tr>
<td align="left" valign="middle">
<i class="br10"></i>
<i class="br50 mobile_hide"></i>
<span class="calculator_table__item"><?php echo __('Понадобится камней');?></span>
</td>
<td></td>
<td align="right" valign="middle">
<i class="br10"></i>
<i class="br50 mobile_hide"></i>
<div class="calculator_table__value">
<nobr><span class="calculator_kg">7,36</span>&nbsp;<?php echo __('кг');?></nobr>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="left">
<i class="br25"></i>
<span class="calculator_table__item"><?php echo __('Сколько стоит');?></span>
</td>
<td></td>
<td colspan="3" align="right">
<i class="br25"></i>
<div class="calculator_table__value calculator_cost"></div>
</td>
</tr>
<tr>
<td colspan="5">
<i class="br40"></i>
<a href="" class="btn green_btn calculator_table__btn">Добавить в корзину</a>
</td>
</tr>
</tbody>
</table>
<?php
$offers_arr = array();
$culture = $sf_user->getCulture();
if(count($offers) > 0){
foreach ($offers as $offer){
if (strlen(stristr($offer['title'], ')')) > 3) {
$title = stristr($offer['title'], ')');
$title = str_replace(',', '' , $title);
$title = str_replace(')', '', $title);
} elseif (strlen(stristr($offer['title'], '(')) > 3) {
$title = stristr($offer['title'], '(');
$title = str_replace('(', ' ', $title);
$title = str_replace(')', '', $title);
} else {
$title = $offer['title'];
}
$offers_arr[] = array('id' => $offer['id'], 'title' => $title, 'price' => $offer['price']);
}
}
$json = json_encode($offers_arr);
?>
<script type="text/javascript">
var calculator = {
v: 1,
kg: 0,
cost: '',
count: 0,
offers: JSON.parse('<?php echo $json;?>'),
updateCost: function() {
var _this = this;
_this.v = 1;
$('.slider_prop').each(function(index, element){
_this.v *= parseFloat(window[element.id+'_value']);
});
if(_this.v == NaN){
return false;
}
_this.v = _this.v.toFixed(1);
_this.kg = Math.ceil(_this.v) * 5;
_this.count = _this.kg /10;
_this.cost = '';
if(_this.offers.length > 1){
_this.offers.forEach(function(entry) {
_this.cost += '<label class="radio calculator_cost__item">' +
'<input type="radio" class="not_custom" name="calculator_item" data-id="'+ entry.id +'">' +
'<span class="radio_span"></span>' +
'<span class="radio_text">' + entry.title + '&nbsp;<span class="calculator_cost__item__price">' + formatNum(_this.count * entry.price) + '&nbsp;<span class="rub">a</span></span></span>' +
'</label>';
});
}else if(_this.offers.length == 1){
_this.cost += '<nobr>' + formatNum(_this.count * _this.offers[0].price) + '&nbsp;<span class="rub">a</span></nobr>';
}
$('.calculator_v').text(_this.v);
$('.calculator_kg').text(_this.kg);
$('.calculator_cost').html(_this.cost);
},
btn: {
disable: function() {
$('.calculator_table__btn').addClass('btn_disabled').attr('disabled','disabled').text('Добавлено');
},
enable: function() {
$('.calculator_table__btn').removeClass('btn_disabled').removeAttr('disabled').text('Добавить в корзину');
}
}
};
$('.slider_prop').each(function(index, element){
window[element.id] = document.getElementById(element.id);
window[element.id+'_value'] = document.getElementById(element.id);
$(window[element.id]).before('<div class="slider_count"><span></span><span></span></div>');
noUiSlider.create(window[element.id], {
start: $(window[element.id]).data('start'),
connect: $(window[element.id]).data('connect'),
margin: 0,
range: {
'min': $(window[element.id]).data('min'),
'max': $(window[element.id]).data('max')
},
step: $(window[element.id]).data('step')
});
window[element.id].noUiSlider.on('update', function( values, handle ) {
var _this = this;
$(_this.target).prev().find('span:first-child').text(this.options.range.min);
$(_this.target).prev().find('span:last-child').text(this.options.range.max);
values.forEach(function(value, index, array){
value = parseFloat(value).toFixed(1);
$(_this.target).closest('td').find('.slider_prop__val').text(value)
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text('');
window[element.id+'_value'] = value;
});
calculator.updateCost();
calculator.btn.enable();
});
});
// Выбор предложения из Калькулятора
$('body').on('change', '.calculator_cost__item > input[type="radio"]', function(e) {
var id = $(this).data('id');
$('.product_offer > input[type="radio"][data-id="'+ id +'"]').prop('checked', true);
calculator.btn.enable();
});
// Выбор предложения из основного блока предложений
$('body').on('change', '.product_offer > input[type="radio"]', function(e) {
var id = $(this).data('id');
$('.calculator_cost__item > input[type="radio"][data-id="'+ id +'"]').prop('checked', true);
});
// Добавление в корзину из Калькулятора
$('.calculator_table__btn').click(function(e) {
var count = calculator.kg/10;
// Если несколько предложений
if($('.calculator_cost__item').length > 0) {
if($('.calculator_cost__item > input[type="radio"]:checked').length > 0) {
var active_calc = $('.calculator_cost__item > input[type="radio"]:checked');
var id = active_calc.data('id');
var offer = $('.product_offer > input[type="radio"][data-id="'+ id +'"]').closest('.product_offer');
var offer_inp = offer.find('.product_counter_val');
//var new_val = parseInt(offer_inp.val()) + parseInt(count);
var new_val = parseInt(count);
offer_inp.val(new_val).trigger('keyup');
calculator.btn.disable();
} else {
$('.calculator_cost').addClass('jump');
setTimeout(function() {
$('.calculator_cost').removeClass('jump');
}, 500);
}
// Если одно предложение
} else {
var offer = $('.product_offer');
var offer_inp = offer.find('.product_counter_val');
var new_val = parseInt(offer_inp.val()) + parseInt(count);
offer_inp.val(new_val).trigger('keyup');
}
return false;
});
</script>
\ No newline at end of file
<?php
if ($parentId == false)
{
$title = $breadcrumbs[0]['title'] . " купить в Уфе, бесплатная доставка по РБ";
$desc = "Купить " . $breadcrumbs[0]['title'] . " в Уфе. Широкий выбор, более " . $productCount . " видов. Бесплатная доставка. Привлекательные цены.";
}
else
{
try
{
$morphy = new phpMorphy(sfConfig::get('sf_data_dir') . '/phpmorphy_vocabulary', 'ru_ru', array('storage' => PHPMORPHY_STORAGE_FILE));
} catch(phpMorphy_Exception $e)
{
die('Error occured while creating phpMorphy instance: ' . $e->getMessage());
}
$rod = $morphy->castFormByGramInfo(mb_strtoupper($breadcrumbs[1]['title']), null, array('МН', 'РД'), true);
$title = $breadcrumbs[0]['title'] . " " . mb_strtolower($breadcrumbs[1]['title']) . " купить в Уфе, бесплатная доставка по РБ";
$desc = "Купить " . $breadcrumbs[0]['title'] . " в Уфе. Широкий выбор " . mb_strtolower($rod[0]) . ". Бесплатная доставка. Привлекательные цены.";
}
slot('default_meta_description', $desc);
slot('title', $title);
?>
<div class="er_rows" style="padding-bottom: 0;">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span><!--
--><span><a href="<?php echo url_for('@catalog') ?>">Каталог</a></span><!--
--><?php
if ($breadcrumbs)
{
$lastBreadcrumbsCounter = 1;
foreach ($breadcrumbs as $crumb)
{
if ($crumb['title'] && $crumb['id'])
{
if ($lastBreadcrumbsCounter == count($breadcrumbs))
{
echo '<span>&nbsp;/&nbsp;' . Page::niceTitleView($crumb['title']) . '</span>';
}
else
{
echo '<span>&nbsp;/&nbsp;<a href="' . url_for('@catalog_show_cat?alias=' . $crumb['alias']) . '">' . Page::niceTitleView($crumb['title']) . '</a></span>';
}
}
$lastBreadcrumbsCounter++;
}
}
?>
<div>
<h1 style="margin-bottom: 10px"><?php echo Page::niceTitleView($breadcrumbs[0]['title']) ?></h1>
</div>
</div>
<?php
if ($parentId)
{
include_component('catalog', 'catChildren', array('parentId' => $parentId));
}
else
{
include_component('catalog', 'catChildren', array('parentId' => $cat_id));
}
?>
<style type="text/css">
.er_content__main__search{display: block;}
.js_cat_view__ct__tr td {
height: 99px !important;
}
</style>
</div>
</div>
<div class="pl_20">
<div class="catalog-item-sorting__new">
<a href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?sort=title&order=<?php echo $order == 'asc' ? 'desc' : 'asc' ?>&inPage=<?php echo $inPage ?>" class="<?php echo $sort == 'title' ? 'sort_selected sort_' . $order : ''; ?>" rel="nofollow">по алфавиту</a>
<a href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?sort=price&order=<?php echo $order == 'asc' ? 'desc' : 'asc' ?>&inPage=<?php echo $inPage ?>" class="<?php echo $sort == 'price' ? 'sort_selected sort_' . $order : ''; ?>" rel="nofollow">цене</a>
<a href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?sort=product_code&order=<?php echo $order == 'asc' ? 'desc' : 'asc' ?>&inPage=<?php echo $inPage ?>" class="<?php echo $sort == 'product_code' ? 'sort_selected sort_' . $order : ''; ?>" rel="nofollow">артикулу</a>
</div>
</div>
<div style="position:absolute;right:20px;margin-top:-17px;">
<?php
$div_active = "";
$td_active = "";
if ($view_type == "table")
{
$td_active = "viewtype_td_active";
}
if ($view_type == "block")
{
$div_active = "viewtype_div_active";
}
?>
<div class="viewtype viewtype_div <?php echo $div_active ?>">
<a href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?view=block"></a>
</div>
<div class="viewtype viewtype_td <?php echo $td_active ?>">
<a href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?view=table"></a>
</div>
</div>
\ No newline at end of file
<script>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
$groupProductsIdsInBasket = array();
foreach ($productsIdsInBasket as $id => $count)
{
$groupProductsIdsInBasket[] = array(
'id' => $id,
'count' => $count
);
}
?>
</script>
<style>
.list_page__cont__inner{
/*position: fixed;*/
display: block;
position: relative;
background-color: #fff;
padding: 0 20px 0 20px;
}
.list__inner_fixed{
position: fixed;
z-index: 10;
}
.er_footer{
visibility: hidden;
}
.list__search{
display: block;
}
</style>
<div class="er_content__main__search list__search" style="padding:20px;">
<form action="<?php echo url_for('@catalog_good_list'); ?>" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="pr_20" style="clear:both;">
<input id="title-search-input" type="text" name="query" value="<?php echo $query ?>" autocomplete="off" placeholder="Поиск по каталогу" style="z-index:102;position:relative;width:100%;border-radius:2px 0 0 2px;">
</td>
<td width="1">
<button id="search-submit-button" type="submit" class="green_button er_content__main__search__btn">Найти</button>
</td>
</tr>
</tbody></table>
</form>
<div class="folder_cat">Каталог</div>
<div class="folder_cat_drop">
<div class="folder_cat_drop__close" title="Закрыть категории" onclick="$('.folder_cat').find('span')[0].click();"></div>
<div class="folder_cat_drop_overflow">
<div class="folder_cat_drop__inner"></div>
</div>
</div>
</div>
<div class="er_rows">
<b class="fs_24">Каталог списком</b>
</div>
<div class="er_rows" style="padding: 0;">
<div class="list_page__cont" onclick="event.stopPropagation();">
<div class="list_page__cont__inner"></div>
</div>
</div>
<script type="text/javascript">
js_cat.preloader($('body'), 'Подождите, пожалуйста...');
var curDomain = '<?php echo url_for('@homepage');?>';
</script>
<script type="text/javascript" src="/js/goods_list.js"></script>
<?php
$getPart = '';
if ($query)
{
$getPart = '?q='.$query;
}
?>
<script type="text/javascript" src="/db2.js.php<?php echo $getPart ?>"></script>
<script type="text/javascript">
var basketMemory = {
productsIdsInBasket: <?php echo json_encode($groupProductsIdsInBasket) ?>,
getCount: function (id) {
for(var i = 0;i < this.productsIdsInBasket.length;i++) {
if (this.productsIdsInBasket[i].id == id) {
return this.productsIdsInBasket[i].count;
}
}
return 0;
},
add: function (id, count) {
var found = false;
for(var i = 0;i < this.productsIdsInBasket.length;i++) {
if (this.productsIdsInBasket[i].id == id) {
this.productsIdsInBasket[i].count = parseInt(this.productsIdsInBasket[i].count) + parseInt(count);
found = true;
break;
}
}
if (!found) {
this.productsIdsInBasket[this.productsIdsInBasket.length] = {"id":id,"count": parseInt(count)};
}
console.log(this.productsIdsInBasket);
},
remove: function (id, count) {
for(var i = 0;i < this.productsIdsInBasket.length;i++) {
if (this.productsIdsInBasket[i].id == id) {
if (this.productsIdsInBasket[i].count > 0)
{
this.productsIdsInBasket[i].count = parseInt(this.productsIdsInBasket[i].count) - parseInt(count);
}
break;
}
}
console.log(this.productsIdsInBasket);
}
}
var listCat = {
catArr: [],
countH: 63,
productsIdsInBasket: <?php echo json_encode($groupProductsIdsInBasket) ?>,
catActivity: function(scrollPos){
var _this = this;
var tempAll = '<table cellpadding="10" cellspacing="0" width="100%" class="std_table js_cat_view" style="margin-top: 20px;"><thead><tr>' +
'<th data-field="name" width="100%" colspan="2" align="left"><span class="sortable__txt">Название</span></th>' +
'<th style="width: 80px;">Код</th>' +
'<th class="sortable" data-field="price" style="width: 90px;" align="right"><span class="sortable__txt">Цена</span></th>' +
'<th style="width: 70px;">Мин.&nbsp;п.</th>' +
'<th class="sortable" data-field="number_product" style="width: 100px;"><span class="sortable__txt">В&nbsp;наличии</span></th>' +
'<th style="width: 135px;"></th>'+
'</tr></thead><tbody class="js_cat_view__ct">';
var countFolder = true;
var htmlFolder = '';
_this.listWrap.outerHeight(_this.countH * _this.catArr.length );
_this.listInnerH = _this.listInner.outerHeight();
_this.countView = parseInt(_this.listInnerH / _this.countH);
var cl_was = false;
$.each(_this.catArr.slice(parseInt(scrollPos / _this.countH) , parseInt(scrollPos / _this.countH) + _this.countView), function(i, obj){
var elem;
if(typeof obj.title == 'undefined'){
elem = db.cat[obj.id];
if(!cl_was){
cl(elem);
cl_was = true;
}
if(countFolder){
countFolder = false;
$.each(db.catFolder[obj.cat_id].parents, function(i, elFolder){
var _elFolder = db.catFolder[elFolder];
if(typeof _elFolder != 'undefined'){
htmlFolder += '<span data-fid="' + _elFolder.id + '">' +
(_elFolder.title == 'Каталог' ? 'Все категории' : _elFolder.title) +
'</span>' + (db.catFolder[obj.cat_id].parents.length - 1 == i ? '' : '&nbsp;/&nbsp;');
}
});
_this.folderCat.html(htmlFolder);
}
if(typeof user_profile != 'undefined'){
var price = elem.price;
var _price = 0;
_price = (elem.price - ((elem.price / 100) * user_profile.sum_discount)).toFixed(2);
}else{
_price = (parseFloat(elem.price)).toFixed(2);
}
var value = basketMemory.getCount(elem.id);
tempAll += list.product.add(elem.id, elem.code, elem.article, elem.name, _price, elem.min_purchase, elem.number_product, i, elem.img, 1, elem.number_product_in_way, value);
}else{
tempAll += '<tr class="js_cat_view__ct__tr_folder"><td colspan="8" class="folder_title">' + obj.title + '</td></tr>';
}
});
_this.listInner.html(tempAll);
if(scrollLastFunc != null){
scrollLastFunc();
scrollLastFunc = null;
}
},
init: function(){
var _this = this;
var _idFolder = 0;
var iCounter = 0;
var tempAll = '';
_this.mainComtent = $('.er_content__main');
_this.listInner = $('.list_page__cont__inner');
_this.listWrap = $('.list_page__cont');
_this.listInnerTop = null;
_this.header = $('#head_wrapper');
_this.searchBar = $('.list__search');
_this.searchBarTop = _this.searchBar.offset().top;
_this.folderCat = $('.folder_cat');
_this.folderCatDrop = $('.folder_cat_drop');
_this.folderCatPosArr = {};
_this.events();
_this.listInnerTop = _this.listInner.offset();
$.each(db.cat_idx.title, function(idFolder, ids){
idFolder = idFolder.replace('ob_', '');
var titleFolder = '';
var htmlFolder = '';
var folder = {title:''};
$.each(db.catFolder[idFolder].parents, function(i, elFolder){
var _elFolder = db.catFolder[elFolder];
if(typeof _elFolder != 'undefined' && i != 0){
titleFolder += _elFolder.title + (db.catFolder[idFolder].parents.length - 1 == i ? '' : '&nbsp;/&nbsp;');
}
});
folder.title = titleFolder;
folder.id = idFolder;
iCounter = _this.catArr.push(folder);
_this.folderCatPosArr[idFolder] = iCounter - 1;
$.each(ids, function(j, el){
var o = {
id: el,
cat_id: idFolder
};
_this.catArr.push(o);
});
});
_this.catActivity(0);
$.each(db.catFolder[0].children, function(i, elem){
var _elem = db.catFolder[elem];
if(typeof _elem != 'undefined'){
tempAll += '<div style="margin-bottom: 20px;color: #3C7AC0;"><div class="click_folder" data-fid="' + _elem.id + '"><span>' + _elem.title + '</span></div>';
if(_elem.children.length > 0){
tempAll += _this.folderCatBuild(_elem.children, 1);
}
tempAll += '</div>';
}
});
_this.folderCatDrop.find('.folder_cat_drop__inner').html(tempAll);
js_cat.preloader($('body'));
},
folderCatBuild: function(children, level){
var tempAll = '';
var _this = this;
$.each(children, function(i, elem){
var _elem = db.catFolder[elem];
if(typeof _elem != 'undefined'){
tempAll += '<div class="click_folder" data-fid="' + _elem.id + '" style="padding-left:' + (level * 20) + 'px"><span>' + _elem.title + '</span></div>';
if(_elem.children.length > 0){
tempAll += _this.folderCatBuild(_elem.children, level + 1);
}
}
});
return tempAll;
},
onRes: function(){
var _this = this;
var hMainContent = 0;
_this.listInner.hide();
_this.folderCatDrop.hide();
hMainContent = _this.mainComtent.outerWidth();
_this.searchBar.outerWidth(hMainContent);
_this.listInner.outerWidth(hMainContent);
_this.folderCatDrop.outerWidth(hMainContent);
_this.listInner.show();
_this.folderCatDrop.show();
_this.listInner.outerHeight($(window).outerHeight() - _this.header.outerHeight() - _this.folderCat.outerHeight() - _this.searchBar.outerHeight());
_this.listInner.parent().outerHeight(_this.listInner.outerWidth());
_this.catActivity(0);
},
onScroll: function(scrollTop){
var _this = this;
if(scrollTop + _this.header.outerHeight() + _this.searchBar.outerHeight() >= _this.listInnerTop.top){
_this.searchBar.addClass('er_content__main__search_fixed');
_this.searchBar.css({
'width': _this.mainComtent.outerWidth(),
'top': _this.header.outerHeight()
});
_this.listInner.addClass('list__inner_fixed');
_this.listInner.css('top', _this.header.outerHeight() + _this.searchBar.outerHeight() + _this.folderCat.outerHeight());
_this.catActivity(scrollTop);
}else{
_this.listInner.removeClass('list__inner_fixed');
_this.listInner.css('top', 'auto');
_this.searchBar.css('top', '0');
_this.searchBar.removeClass('er_content__main__search_fixed');
_this.catActivity(0);
}
},
events: function(){
var _this = this;
$(window).resize(function(){
_this.onRes();
}).resize();
$(document).scroll(function(){
_this.onScroll($(document).scrollTop());
});
_this.folderCat.on('click', 'span', function(){
var id = $(this).data('fid');
if(id == 0){
if(_this.folderCatDrop.hasClass('folder_cat_drop_active')){
_this.folderCatDrop.removeClass('folder_cat_drop_active');
_this.folderCatDrop.css('height', 0);
}else{
_this.folderCatDrop.addClass('folder_cat_drop_active');
_this.folderCatDrop.css('height', _this.listInner.outerHeight());
}
_this.overlayHideShow();
}else{
$(document).scrollTop(_this.folderCatPosArr[id] * _this.countH);
}
console.log('ss');
});
_this.folderCatDrop.on('click', '.click_folder', function(){
var id = $(this).data('fid');
$(document).scrollTop(_this.folderCatPosArr[id] * _this.countH);
_this.folderCatDrop.removeClass('folder_cat_drop_active');
_this.folderCatDrop.css('height', 0);
_this.overlayHideShow();
});
_this.folderCatDrop.on('scroll', function(){
});
},
overlayHideShow: function(){
var mw = window.innerWidth - document.body.clientWidth;
var body = $('body');
var html = $('html');
mw = $('.max_width').eq(0).outerWidth() >= $(window).width() ? 0 : mw;
console.log($('.max_width').eq(0).outerWidth(), $(window).width());
//if(body.hasClass('scrollbarHidden')){
// body.css('width', 'auto');
// body.css('overflow-y', 'scroll');
// body.css('margin-left', '0');
// body.removeClass('scrollbarHidden');
//}else{
// if(mw == 0){
// body.outerWidth(body.outerWidth());
// }
// body.css('overflow', 'hidden');
// body.css('margin-left', -mw);
// body.addClass('scrollbarHidden');
//}
}
};
$(window).load(function(){
listCat.init();
});
</script>
\ No newline at end of file
<?php
slot('title', __('Каталог'));
include_partial('main/breadcrumbs');
echo '<h1 class="content_title">' . __('Каталог') . '</h1>';
?>
<div class="catalog_wrap">
<?php
if (count($catalogs) > 0) {
foreach ($catalogs as $cat) {
?><div class="catalog_category_item">
<table class="to_div" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tbody align="left" valign="top">
<tr>
<td width="1" class="mobile_hide">
<?php
if (strlen($cat['photo']) > 3) {
echo '<a href="' . url_for('@catalog_show?alias=' . $cat['alias']) . '" style="border-bottom:none;"><img src="/i/n.gif" style="background-image: url(/u/i/' . Page::replaceImageSize($cat['photo'], 'S') . ');" /></a>';
} else {
echo '<a href="' . url_for('@catalog_show?alias=' . $cat['alias']) . '" style="border-bottom:none;"><img src="/i/n.gif" style="background-image: url(/i/no_photo.png);" /></a>';
}
?>
</td>
<td width="24"></td>
<td class="align_center">
<?php echo '<a href="' . url_for('@catalog_show?alias=' . $cat['alias']) . '" class="catalog_category_item__title black_link">' . $cat['Translation'][$culture]['title'] . '</a>'; ?>
<div class="mobile">
<i class="br20"></i>
<?php if (strlen($cat['photo']) > 3) {
echo '<a href="' . url_for('@catalog_show?alias=' . $cat['alias']) . '" style="border-bottom:none;"><img src="/i/n.gif" style="background-image: url(/u/i/' . Page::replaceImageSize($cat['photo'], 'S') . ');" /></a>';
} else {
echo '<a href="' . url_for('@catalog_show?alias=' . $cat['alias']) . '" style="border-bottom:none;"><img src="/i/n.gif" style="background-image: url(/i/no_photo.png);" /></a>';
} ?>
</div>
<?php $products_html = '';
if (strpos($cat['alias'], 'kamen') !== false && count($cat['Products']) > 0) {
$counter = 0;
foreach ($cat['Products'] as $product){
if($product['offer_count'] == 0 || !$product['is_detail']){
continue;
}
$products_html .= '<td><a href="' . url_for('@product_show?alias=' . $product['alias']) . '" class="black_link">' . $product['Translation'][$culture]['title'] . '</a></td>';
if ($counter > 0) {
$products_html .= '</tr><tr>';
$counter = 0;
} else {
$products_html .= '<td width="24"></td>';
$counter++;
}
}
if($products_html != ''){
echo '<table cellspacing="0" cellpadding="0" class="catalog_category_item__childs align_left">';
echo '<tbody valign="top" align="left">';
echo '<tr>' . $products_html . '</tr>';
echo '</tbody>';
echo '</table>';
}
}
if(count($cat['Children']) > 0) {
$counter = 0;
foreach ($cat['Children'] as $child){
$products_html .= '<td><a href="' . url_for('@catalog_show?alias=' . $child['alias']) . '" class="black_link">' . $child['Translation'][$culture]['title'] . '</a></td>';
if ($counter > 0) {
$products_html .= '</tr><tr>';
$counter = 0;
} else {
$products_html .= '<td width="24"></td>';
$counter++;
}
}
if($products_html != ''){
echo '<table cellspacing="0" cellpadding="0" class="catalog_category_item__childs">';
echo '<tbody valign="top" align="left">';
echo '<tr>' . $products_html . '</tr>';
echo '</tbody>';
echo '</table>';
}
}
?>
</td>
</tr>
</tbody>
</table>
</div><?php
}
}
?>
</div>
\ No newline at end of file
<div class="er_rows" style="padding-bottom: 0;">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span><!--
--><span><a href="<?php echo url_for('@catalog') ?>">Каталог</a></span><!--
--><span>&nbsp;/&nbsp;Новые поступления</span>
</div>
<h1>Новые поступления</h1>
<style type="text/css">
.er_content__main__search{display: block;}
.js_cat_view__ct__tr td {
height: 63px;
}
</style>
</div>
</div>
<div style="position:absolute;right:20px;margin-top:-30px;">
Отображать
<select onchange="$.cookie('js_cat_view', $(this).val());js_cat.init();" style="display:inline-block;width:100px;" class="small_select">
<option value="div">блоками</option>
<option value="tr" selected="selected">списком</option>
</select>
</div>
<i class="br20"></i>
<table class="std_table js_cat_view" cellspacing="0" cellpadding="0">
<thead>
<tr valign="bottom" align="left">
<th colspan="2" width="100%">Название</th>
<th>Код</th>
<th>Цена</th>
<th>Мин.&nbsp;п</th>
<th>В&nbsp;наличии</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($products as $product)
{
echo "<tr class='js_cat_view__ct__tr'>";
echo "<td style='position: relative'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
echo "</td>";
echo "<td>";
echo "<a href='" . url_for('@catalog_show_prod?prod_id=' . $product['id']) . "'>" . $product['title'] . "</a>";
echo "</td>";
echo "<td>";
echo $product['product_code'];
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo $product['price'] . '<span class="rub_b" style="position:relative;top:0px;">a</span>';
}
echo "</b></td>";
echo "<td>";
echo $product['min_order'];
echo "</td>";
echo "<td>";
echo round($product['stockCount']);
echo "</td>";
?>
<td>
<ul class="counter" data-product-id="<?php echo $product['id'] ?>">
<li onclick="basket.remove($(this))" class="btn_all counter__button counter_button_minus red_button2"></li>
<li class="counter__num">
<?php
$value = 0;
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
}
?>
<input data-min-p="<?php echo $product['min_order'] ?>" data-stock="<?php echo round($product['stockCount']); ?>" onchange="basket.handWrite($(this));basket.check($(this))" name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basket.add($(this))" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<td></td>
<?php
echo "</tr>";
}
?>
</tbody>
</table>
<i class="br20"></i>
<div id="search_div" class="title-search-result sq_ct" style="display: block;">
<?php
if (count($searchResult) > 0)
{
?>
<table class="std_table js_cat_view qs_table" width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr valign="bottom" align="left">
<th colspan="2"
data-sort="title" style="text-align: left">Название
</th>
<th data-sort="article" style="text-align: left">Артикул</th>
<th data-sort="min">Мин.&nbsp;партия</th>
<th data-sort="quantity">В&nbsp;наличии</th>
<th data-sort="price" style="text-align: right">Цена</th>
<th>
<div class="er_content__main__search__clear" onclick="search.quickSearch('');$('#title-search-input').val('')"></div>
</th>
</tr>
</thead>
<tbody>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($searchResult as $product)
{
echo "<tr class='js_cat_view__ct__tr'>";
echo "<td style='position: relative; text-align: center'>";
if ($product['sell_out'])
{
echo '<div class="sale_out">Распродажа</div>';
}
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "' style='border-bottom:none;'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
echo "</a>";
echo "</td>";
echo "<td class='js_cat_view_product_name__td'>";
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>" . $product['title'] . "</a>";
echo "</td>";
echo "<td>";
echo $product['product_code'];
echo "</td>";
echo "<td>";
echo $product['min_order'];
echo "</td>";
$stockCount = round($product['stockCount']);
if($stockCount == 0)
{
echo "<td colspan='2' align='center'>";
echo "Нет в наличии";
echo "</td><td></td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub">a</span>';
}
echo "</b></td>";
}
else
{
echo "<td>";
echo round($product['stockCount']);
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub">a</span>';
}
echo "</b></td>";
$value = 0;
$dopBtnClass = '';
$canAction = 'false';
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
$dopBtnClass = 'disabledBtn';
$canAction = 'true';
}
?>
<td>
<ul class="counter"
data-product-count="<?php echo $stockCount ?>"
data-product-min="<?php echo $product['min_order'] ?>"
data-product-id="<?php echo $product['id'] ?>"
data-product-price="<?php echo $product['price'] ?>" style="height: 36px; padding-top: 2px; border: 1px solid #d8d8d8;">
<li onclick="basketSender.singleDownCount($(this))" action="true" class="btn_all counter__button counter_button_minus red_button2" ></li>
<li class="counter__num">
<input onfocus="basketSender.onfocusCheck($(this))"
onkeyup="basketSender.keyUpCheck($(this))"
onchange="basketSender.singleByInput($(this))"
name=""
value="<?php echo $value ?>"
autocomplete="off"
type="text"
style="font-size: 15px"
>
</li>
<li onclick="basketSender.singleUpCount($(this))" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<td></td>
<?php
}
echo "</tr>";
}
?>
</tbody>
</table>
<a href="<?php echo url_for('@search') . "?query=" . $searchString ?>" class="qs_all_link">Показать все <?php echo $searchCount ?></a>
<?php
}
else
{
?>
<div style="padding:6px 20px;color:#969696;">Ничего не найдено</div>
<?php
}
?>
</div>
\ No newline at end of file
<?php
if (count($searchResult) > 0)
{
?>
<span style="padding-left:20px;" id="search_div_qs_count">Найдено: <?php echo $searchCount ?></span>
<i class="br20"></i>
<table class="std_table js_cat_view" width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr valign="bottom" align="left">
<th colspan="2"
data-sort="title" style="text-align: left">Название
</th>
<th data-sort="article" style="text-align: left">Артикул</th>
<th data-sort="min">Мин.&nbsp;партия</th>
<th data-sort="quantity">В&nbsp;наличии</th>
<th data-sort="price" style="text-align: right">Цена</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($searchResult as $product)
{
echo "<tr class='js_cat_view__ct__tr'>";
echo "<td style='position: relative; text-align: center'>";
if ($product['sell_out'])
{
echo '<div class="sale_out">Распродажа</div>';
}
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "' style='border-bottom:none;'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
echo "</a>";
echo "</td>";
echo "<td class='js_cat_view_product_name__td'>";
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>" . $product['title'] . "</a>";
echo "</td>";
echo "<td>";
echo $product['product_code'];
echo "</td>";
echo "<td>";
echo $product['min_order'];
echo "</td>";
$stockCount = round($product['stockCount']);
if($stockCount == 0)
{
echo "<td align='center'>";
echo "Нет в наличии";
echo "</td><td></td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub">a</span>';
}
echo "</b></td>";
}
else
{
echo "<td>";
echo round($product['stockCount']);
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub">a</span>';
}
echo "</b></td>";
$value = 0;
$dopBtnClass = '';
$canAction = 'false';
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
$dopBtnClass = 'disabledBtn';
$canAction = 'true';
}
?>
<td>
<ul class="counter"
data-product-count="<?php echo $stockCount ?>"
data-product-min="<?php echo $product['min_order'] ?>"
data-product-id="<?php echo $product['id'] ?>"
data-product-price="<?php echo $product['price'] ?>" style="height: 36px; padding-top: 2px; border: 1px solid #d8d8d8;">
<li onclick="basketSender.singleDownCount($(this))" action="true" class="btn_all counter__button counter_button_minus red_button2" ></li>
<li class="counter__num">
<input onfocus="basketSender.onfocusCheck($(this))"
onkeyup="basketSender.keyUpCheck($(this))"
onchange="basketSender.singleByInput($(this))"
name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basketSender.singleUpCount($(this))" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<?php
}
echo "</tr>";
}
?>
</tbody>
</table>
<i class="br20"></i>
<div class="postNavigation">
<?php
$href_previous = 'href="' . url_for('@search') . "?query=" . $searchString . '&page=' . ($page - 1) . '"';
$href_first = 'href="' . url_for('@search') . "?query=" . $searchString . '&page=1"';
if ($page != 1)
{
if ($page == $countPage)
{
?>
<a class="page_link page_button" style="width: auto; padding: 4px;" <?php echo $href_first ?>>В начало</a>
<?php
}
?>
<a class="page_link page_button" <?php echo $href_previous ?>></a>
<?php
}
?>
<?php
if ($page - 2 >= 0)
{
for ($i = $page - 2; $i < $page; $i++)
{
if ($i == 0)
{
continue;
}
?>
<a class="page_link" href="<?php echo url_for('@search') . "?query=" . $searchString ?>&page=<?php echo $i ?>"><?php echo $i ?></a>
<?php
}
}
?>
<b class="page_active"><?php echo $page ?></b>
<?php
if ($page + 2 <= $countPage)
{
$maxPage = $page + 2;
}
else
{
$maxPage = $countPage;
}
for ($i = $page + 1; $i <= $maxPage; $i++)
{
?>
<a class="page_link" href="<?php echo url_for('@search') . "?query=" . $searchString ?>&page=<?php echo $i ?>"><?php echo $i ?></a>
<?php
}
?>
<?php
$href_next = 'href="' . url_for('@search') . "?query=" . $searchString . '&page=' . ($page + 1) . '"';
if ($page != $countPage)
{
?>
<a class="page_link page_button" <?php echo $href_next ?>></a>
<?php
}
?>
</div>
<?php
}
else
{
?>
<div style="padding:6px 20px;color:#969696;">Ничего не найдено</div>
<?php
}
?>
\ No newline at end of file
<?php
slot('title', 'Каталог - ' . __(sfConfig::get('app_www_title')));
?>
<div class="breadcrumbs">
<a href="/" title="Главная">Главная</a>
<i class="arrow"></i>
<a href="<?php echo url_for("@catalog"); ?>" title="Каталог">Каталог</a>
<i class="arrow"></i>
<a href="<?php echo url_for("@catalog_category?alias=" . $category->getParent()->getAlias()) ?>" title="Название категории">
<?php echo $category->getParent()->getTitle() ?>
</a>
</div>
<h1 class="content_title"><?php echo $category->getTitle() ?></h1>
<div class="catalog_wrap with_filters">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top" align="left">
<tr>
<td width="100%">
<?php
$products = $category->getCatProducts();
if(count($products > 0))
{
foreach($products as $product)
{
include_partial("catalog/product", array("product" => $product));
}
}
?>
</td>
<td width="1">
<div class="catalog_filters custom_slider-ui">
<span class="green_link">Тип печи</span>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Дровяные печи</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Электрические печи</span>
</label>
<i class="br20"></i>
<span class="green_link">Мощность, кВт</span>
<i class="br10"></i>
<div id="slider_power" class="slider_prop" data-min="2" data-max="40" data-start="[2,40]" data-connect="true"></div>
<i class="br50"></i>
<span class="green_link">Прогреваемый объем, м³</span>
<i class="br10"></i>
<div id="slider_amount" class="slider_prop" data-min="2" data-max="40" data-start="[2,40]" data-connect="true"></div>
<i class="br50"></i>
<span class="green_link">Вес, кг</span>
<i class="br10"></i>
<div id="slider_weight" class="slider_prop" data-min="45" data-max="90" data-start="45" data-connect="[true,false]"></div>
<i class="br50"></i>
<span class="green_link">Корпус</span>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Нержавеющая сталь</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Окрашенная сталь</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Рещетчатая</span>
</label>
<i class="br20"></i>
<a href="" class="bbs_d fs_13 red_link">Сбросить фильтр</a>
</div>
<script type="text/javascript">
$('.slider_prop').each(function(index, element){
window[element.id] = document.getElementById(element.id);
$(window[element.id]).before('<div class="slider_count"><span></span><span></span></div>');
noUiSlider.create(window[element.id], {
start: $(window[element.id]).data('start'),
connect: $(window[element.id]).data('connect'),
margin: 0,
range: {
'min': $(window[element.id]).data('min'),
'max': $(window[element.id]).data('max')
},
step: 1
});
window[element.id].noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
});
/*var sliderPower = document.getElementById('slider_power');
noUiSlider.create(sliderPower, {
start: [ 2, 40 ],
connect: true,
margin: 0,
range: {
'min': $(sliderPower).data('min'),
'max': $(sliderPower).data('max')
},
step: 1
});
sliderPower.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
var sliderAmount = document.getElementById('slider_amount');
noUiSlider.create(sliderAmount, {
start: [ 2, 40 ],
connect: true,
margin: 0,
range: {
'min': $(sliderAmount).data('min'),
'max': $(sliderAmount).data('max')
},
step: 1
});
sliderAmount.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
var sliderWeight = document.getElementById('slider_weight');
noUiSlider.create(sliderWeight, {
start: 45,
connect: [true, false],
margin: 0,
range: {
'min': $(sliderWeight).data('min'),
'max': $(sliderWeight).data('max')
},
step: 1
});
sliderWeight.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});*/
</script>
</td>
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
<?php
slot('title', 'Каталог - ' . __(sfConfig::get('app_www_title')));
?>
<div class="breadcrumbs">
<a href="/" title="Главная">Главная</a>
<i class="arrow"></i>
<a href="<?php echo url_for("@catalog"); ?>" title="Каталог">Каталог</a>
<?php
$breadcrumbs = $category->getBreadcrumbs();
if($breadcrumbs)
{
foreach($breadcrumbs as $crumb)
{
$url = url_for('@catalog_category?alias=' . $crumb['alias']);
echo '<i class="arrow"></i>';
echo '<a href="' . $url . '" title="' . $crumb['title'] . '">' . $crumb['title'] . '</a>';
}
}
?>
</div>
<h1 class="content_title"><?php echo $category->getTitle(); ?></h1>
<div class="catalog_wrap <?php if($viewType == 'onlyProducts' & $viewFilter) echo 'with_filters' ?>">
<?php
if($viewType == 'onlyProducts')
{
$products = $category->getCatProducts();
if(count($products > 0))
{
?>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top" align="left">
<tr>
<td width="100%">
<?php
foreach($products as $product)
{
include_partial("catalog/product", array("product" => $product));
}
?>
</td>
<?php
if($viewFilter)
{
?>
<td width="1">
<div class="catalog_filters custom_slider-ui">
<span class="green_link">Тип печи</span>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Дровяные печи</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Электрические печи</span>
</label>
<i class="br20"></i>
<span class="green_link">Мощность, кВт</span>
<i class="br10"></i>
<div id="slider_power" class="slider_prop" data-min="2" data-max="40" data-start="[2,40]" data-connect="true"></div>
<i class="br50"></i>
<span class="green_link">Прогреваемый объем, м³</span>
<i class="br10"></i>
<div id="slider_amount" class="slider_prop" data-min="2" data-max="40" data-start="[2,40]" data-connect="true"></div>
<i class="br50"></i>
<span class="green_link">Вес, кг</span>
<i class="br10"></i>
<div id="slider_weight" class="slider_prop" data-min="45" data-max="90" data-start="45" data-connect="[true,false]"></div>
<i class="br50"></i>
<span class="green_link">Корпус</span>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Нержавеющая сталь</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Окрашенная сталь</span>
</label>
<i class="br10"></i>
<label class="custom_checkbox">
<input type="checkbox"><span class="after_checkbox"></span>
<span>Рещетчатая</span>
</label>
<i class="br20"></i>
<a href="" class="bbs_d fs_13 red_link">Сбросить фильтр</a>
</div>
<script type="text/javascript">
$('.slider_prop').each(function(index, element){
window[element.id] = document.getElementById(element.id);
$(window[element.id]).before('<div class="slider_count"><span></span><span></span></div>');
noUiSlider.create(window[element.id], {
start: $(window[element.id]).data('start'),
connect: $(window[element.id]).data('connect'),
margin: 0,
range: {
'min': $(window[element.id]).data('min'),
'max': $(window[element.id]).data('max')
},
step: 1
});
window[element.id].noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
});
/*var sliderPower = document.getElementById('slider_power');
noUiSlider.create(sliderPower, {
start: [ 2, 40 ],
connect: true,
margin: 0,
range: {
'min': $(sliderPower).data('min'),
'max': $(sliderPower).data('max')
},
step: 1
});
sliderPower.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
var sliderAmount = document.getElementById('slider_amount');
noUiSlider.create(sliderAmount, {
start: [ 2, 40 ],
connect: true,
margin: 0,
range: {
'min': $(sliderAmount).data('min'),
'max': $(sliderAmount).data('max')
},
step: 1
});
sliderAmount.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});
var sliderWeight = document.getElementById('slider_weight');
noUiSlider.create(sliderWeight, {
start: 45,
connect: [true, false],
margin: 0,
range: {
'min': $(sliderWeight).data('min'),
'max': $(sliderWeight).data('max')
},
step: 1
});
sliderWeight.noUiSlider.on('update', function( values, handle ) {
$(this.target).prev().find('span:first-child').text(this.options.range.min);
$(this.target).prev().find('span:last-child').text(this.options.range.max);
var _this = this;
values.forEach(function(value, index, array){
$(_this.target).find('.noUi-origin .noUi-handle[data-handle='+index+']').text(parseInt(value))
});
});*/
</script>
</td>
<?php
}
?>
</tr>
</tbody>
</table>
<?php
}
}
elseif($viewType == 'onlyCats')
{
foreach($category->getCleanChildren() as $child)
{
?>
<div class="catalog_category_child_item">
<a href="<?php echo url_for("@catalog_category?alias=" . $child->getAlias()); ?>" class="anb">
<img src="/i/n.gif" style="background-image: url(/u/i/<?php echo str_replace('.', '-XS.', $child->getPhoto()); ?>);" alt="">
<span class="black_link"><?php echo $child->getTitle(); ?></span>
</a>
</div>
<?php
}
}
?>
</div>
\ No newline at end of file
<?php
slot('title', 'Каталог - ' . __(sfConfig::get('app_www_title')));
use_javascript('fotorama.js');
use_stylesheet('fotorama.css');
/** @var Product $product */
$directPrice = $product->getDirectPrice();
$priceM2 = 0;
$priceList = 0;
/*
if(!$directPrice)
{
if($product->getM2Price())
{
$priceM2 = $product->getM2Price();
}
if($product->getListPrice())
{
$priceList = $product->getListPrice();
}
}*/
if($priceM2 == 0 && $priceList == 0)
{
$offers = array();
foreach($product->getOffer() as $offer)
{
$offers[] = array(
'title' => $offer->getTranslation()->$culture->title,
'price' => $offer->getPrice(),
'img' => $offer->getImg()
);
}
}
$view = false;
if($priceM2 != 0 && $priceList != 0)
{
$view = 'default_offer';
}
elseif($directPrice)
{
$view = 'simple';
}
else
{
$view = 'custom_offer';
}
?>
<style>
.content__main {padding-bottom: 40px;}
</style>
<div class="content__main">
<div class="max_width">
<div class="breadcrumbs">
<a href="/" title="Главная">Главная</a>
<i class="arrow"></i>
<a href="<?php echo url_for("@catalog"); ?>" title="Каталог">Каталог</a>
<?php
$cat = $product->getCatProducts()->getFirst();
$breadcrumbs = $cat->getBreadcrumbs();
if($breadcrumbs)
{
foreach($breadcrumbs as $crumb)
{
$url = url_for('@catalog_category?alias=' . $crumb['alias']);
echo '<i class="arrow"></i>';
echo '<a href="' . $url . '" title="' . $crumb['title'] . '">' . $crumb['title'] . '</a>';
}
}
$url = url_for('@catalog_category?alias=' . $cat['alias']);
echo '<i class="arrow"></i>';
echo '<a href="' . $url . '" title="' . $cat['title'] . '">' . $cat['title'] . '</a>';
?>
</div>
<h1 class="content_title"><?php echo $product->getTitle() ?></h1>
<div class="catalog_product_wrap">
<form action="<?php echo url_for('@basket_append') ?>" method="post">
<?php if($product->getOffer()->count() > 0) {?>
<input type="hidden" name="instance" value="offer">
<div class="form_table">
<?php foreach ($product->getOffer() as $productOffer) {?>
<label class="form_table_row">
<div class="form_table_cell">
<input type="radio" name="id" value="<?php echo $productOffer->getIncremented()?>">
<?php echo $productOffer->getTitle();?>
</div>
<div class="form_table_cell">
<input type="text" name="count_<?php echo $productOffer->getIncremented();?>" value="1">
</div>
<div class="form_table_cell">
<?php echo $productOffer->getPrice();?>
</div>
</label>
<?php }?>
</div>
<?} else {?>
<input type="hidden" name="id" value="<?php echo $product->getIncremented()?>">
<input type="hidden" name="instance" value="product">
<input type="text" name="count_<?php echo $product->getIncremented()?>" value="1">
<?php }?>
<input type="submit" class="btn green_b_btn product_btn" value="В корзину">
</form>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top">
<tr class="product_main">
<td width="48%">
<div class="fotorama"
width="100%"
height="400px"
data-nav="thumbs"
style="display: inline-block;">
<?php
$productImgs = explode(';', $product->getProductImg());
foreach($productImgs as $img)
{
echo '<img src="/u/i/' . str_replace('.', '-XXL.', $img) . '">';
}
?>
</div>
</td>
<td width="50"></td>
<td>
<?php
if($view == 'default_offer')
{
?>
<span class="product_title"><?php echo $product->getTitle() ?></span>
<i class="br25"></i>
<table cellpadding="0" cellspacing="0" width="200">
<tbody valign="top">
<tr>
<td align="left"><b>Цена за м²:</b><i class="br10"></td>
<td align="right"><?php echo $priceM2 ?> <span class="rub fs_11em">i</span><i class="br10"></td>
</tr>
<tr>
<td align="left"><b>Цена за лист:</b></td>
<td align="right"><?php echo $priceList ?> <span class="rub fs_11em">i</span></td>
</tr>
</tbody>
</table>
<i class="br30"></i>
<?php
}
?>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody valign="middle" align="left">
<tr>
<?php
if($view == 'simple') { ?>
<td width="1" style="white-space: nowrap; padding-left: 20px;">
<div class="product_counter">
<input type="button" class="product_counter_minus" data-symbol="-" onclick="counterLite.update($(this))">
<input type="text" class="product_counter_val" value="1" data-symbol="false" onkeyup="counterLite.update($(this))">
<input type="button" class="product_counter_plus" data-symbol="+" onclick="counterLite.update($(this))">
</div>
</td>
<td align="center">
<span class="product_price">
<span class="product_price_value" data-price="<?php echo $directPrice; ?>"><?php echo $directPrice ?></span>
<span class="rub fs_10em">i</span>
</span>
</td>
<td width="1">
<button class="btn green_b_btn product_btn">В корзину</button>
</td>
<?php
} elseif($view == 'default_offer') { ?>
<td width="1" style="white-space: nowrap;">
<div class="product_counter" data-id="<?php echo $product->getId(); ?>">
<input type="button" class="product_counter_minus" data-symbol="-" onclick="counterLite.update($(this))">
<input type="text" class="product_counter_val" value="1" data-symbol="false" onkeyup="counterLite.update($(this))">
<input type="button" class="product_counter_plus" data-symbol="+" onclick="counterLite.update($(this))">
</div>
<ul class="product_price_trigger">
<?php
$defaultShowPrice = 0;
if($priceM2 != 0) {
echo '<li>';
echo '<label>
<input class="selectPriceOffer" type="radio" name="price" data-price="' . $priceM2 . '" onchange="counterLite.change($(this))" checked>
<span></span> м²
</label>';
echo '</li>';
$defaultShowPrice = $priceM2;
} if($priceList != 0) {
echo '<li>';
echo '<label>
<input class="selectPriceOffer" type="radio" name="price" data-price="' . $priceList . '" onchange="counterLite.change($(this))">
<span></span> лист
</label>';
echo '</li>';
$defaultShowPrice = $defaultShowPrice == 0 ? $priceList : $defaultShowPrice;
}
?>
</ul>
</td>
<td align="center">
<span class="product_price">
<span class="product_price_value"><?php echo $defaultShowPrice ?></span>
<span class="rub fs_10em">i</span>
</span>
</td>
<td width="1">
<button class="btn green_b_btn product_btn">В корзину</button>
</td>
<?php
} elseif($view == 'custom_offer') { ?>
<td>
<?php
$first_cost = 0;
if(count($offers) > 0) {
$i = 1;
foreach($offers as $offer)
{
if($i == 1) {
$first_cost = $offer['price'];
}
?>
<label class="product_offer">
<input type="radio" name="offer" onchange="counterLite.change($(this))" <?php echo $i==1 ? 'checked' : '';?>>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><?php echo $offer['title']; ?></td>
<td align="right">
<div class="product_counter min" data-id="<?php echo $product->getId(); ?>" data-price="<?php echo $offer['price']; ?>">
<input type="button" class="product_counter_minus" data-symbol="-" onclick="counterLite.update($(this))">
<input type="text" class="product_counter_val" value="1" data-symbol="false" onkeyup="counterLite.update($(this))">
<input type="button" class="product_counter_plus" data-symbol="+" onclick="counterLite.update($(this))">
</div>
</td>
<td width="1" align="right">
<?php echo $offer['price']; ?>
<span class="rub">i</span>
</td>
</tr>
</table>
</label>
<?php
$i++;
}
}
?>
<i class="br5"></i>
<hr class="product_hr">
<i class="br20"></i>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody align="right">
<tr>
<td style="padding-right: 25px;">
<span class="product_price">
<span class="product_price_value" data-price="<?php echo $first_cost; ?>"><?php echo $first_cost; ?></span>
<span class="rub fs_10em">i</span></span>
</td>
<td width="1" style="padding-right: 20px;"><button href="" class="btn green_b_btn product_btn">В корзину</button></td>
</tr>
</tbody>
</table>
</td>
<?php
}
?>
</tr>
<tr>
<td class="product__advantages__info" colspan="3">
<?php
$productDescription = $product->getDescription();
$productPropValue = $product->getPropertyArray();
?>
<i class="br40"></i>
<?php
if($productDescription)
{
echo '<a href="" class="fs_18 bbs_d green_link" data-tab="description">Описание</a>';
}
if(count($productPropValue) > 0)
{
echo '<a href="" class="fs_18 bbs_d green_link active" data-tab="features">Характеристики</a>';
}
?>
<i class="br20"></i>
<div class="product__advantages__info__tab" data-tab="description"><?php echo $productDescription ?></div>
<div class="product__advantages__info__tab active" data-tab="features">
<table cellspacing="0" cellpadding="0" width="100%" style="max-width: 450px;">
<tbody valign="top" align="left">
<?php
foreach($productPropValue as $prop)
{
echo '<tr>';
echo '<td>' . $prop['prop'] . '</td>';
echo '<td></td>';
echo '<td>' . $prop['value'] . '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
<script type="text/javascript">
$('.product__advantages__info a').click(function(e){
$('.product__advantages__info a, .product__advantages__info__tab').removeClass('active');
$(this).addClass('active');
$('.product__advantages__info__tab[data-tab='+$(this).data('tab')+']').addClass('active');
$('.product__advantages__info__tab[data-tab='+$(this).data('tab')+']').addClass('active');
return false;
})
</script>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="product_section product__calculator">
<div class="max_width">
<?php include_partial("catalog/product_calculator"); ?>
</div>
</div>
<?php include_partial("pages/landingArea2", array("class" => "product_section background_grey")); ?>
<div class="product_section product__advantages">
<div class="caption">С этим товаром покупают</div>
<div class="max_width">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody valign="top" align="left">
<tr>
<td>
<?php include_partial("catalog/product", array("count" => 4)); ?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="product_section product__video">
<div class="caption">Видео</div>
<div class="max_width">
<div class="video_item">
<iframe src="https://www.youtube.com/embed/JMkHr68zO6Q?ecver=2" width="640" height="360" frameborder="0" allowfullscreen></iframe>
</div>
<div class="video_item">
<iframe src="https://www.youtube.com/embed/JMkHr68zO6Q?ecver=2" width="640" height="360" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="product_section product__articles">
<div class="caption">Статьи</div>
<div class="max_width">
<?php include_partial("article/article", array("count" => 4)); ?>
</div>
</div>
<div class="product_section product__reviews background_lightgrey">
<div class="caption">Отзывы клиентов</div>
<div class="max_width">
<?php include_partial("review/review"); ?>
</div>
</div>
\ No newline at end of file
<?php
$translation = $cat->getTranslation();
slot('title', $translation[$culture]['title']);
include_component('main','breadcrumbs', array('cat' => $cat));
echo '<h1 class="content_title">' . $translation[$culture]['title'] . '</h1>';
?>
<div class="catalog_wrap with_filters">
<?php
if (isset($products)) {
?>
<table class="to_div" cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top" align="left">
<tr>
<td width="100%" class="catalog_refresh">
<div class="catalog_category_childs_wrap">
<?php if (count($products) > 0) {
foreach ($products as $product) {
include_partial("product/product", array("product" => $product));
}
} ?>
</div>
<?php include_partial('catalog/pagination', array('count' => count($products_all), 'in_page_count' => $in_page_count)); ?>
</td>
<td width="1">
<?php
include_component('catalog', 'filter', array('cat' => $cat, 'product_ids' => $product_ids));
?>
</td>
</tr>
</tbody>
</table>
<?php
} elseif (isset($cats)) {
if (count($cats) > 0) {
echo '<div class="catalog_category_childs_wrap">';
foreach ($cats as $cat) {
?>
<div class="catalog_category_child_item">
<a href="<?php echo url_for("@catalog_show?alias=" . $cat['alias']); ?>" class="anb">
<img src="/i/n.gif"
style="background-image: url(/u/i/<?php echo Page::replaceImageSize($cat['photo'], 'S'); ?>);"
alt="">
<span class="black_link"><?php echo $cat['Translation'][$culture]['title']; ?></span>
</a>
</div>
<?php
}
echo '</div>';
}
}
?>
</div>
<script>
$('.discount_available').on('click', function (e) {
if ($(window).width() < 650) {
$(this).toggleClass('show');
}
})
</script>
<?php
include_partial('show_cat_header',
array(
'alias' => $alias,
'breadcrumbs' => $breadcrumbs,
'parentId' => $parentId,
'cat_id' => $cat_id,
'order' => $order,
'inPage' => $inPage,
'sort' => $sort,
'view_type' => $view_type,
'productCount' => $productCount
)
);
?>
<i class="br20"></i>
<div class="product_card_wrap">
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($products as $product)
{
echo '<div class="product_card">';
if ($product['sell_out'])
{
echo '<div class="sale_out" style="margin-left: -21px;">Распродажа</div>';
}
echo '<div class="product_card_img">';
echo "<a style='border-bottom:none;' href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '">';
echo "</a>";
echo '</div>';
echo '<i class="br10"></i>';
echo '<div class="product_card_title">';
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>" . $product['title'] . "</a>";
echo '</div>';
?>
<i class="br15"></i>
<table class="product_card_table_dopInfo" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
Артикул: <?php echo $product['product_code']; ?>
</td>
</tr>
<tr>
<td colspan="2"><i class="br10"></i></td>
</tr>
<tr>
<td>
Мин. партия: <?php echo $product['min_order']; ?>
</td>
<td class="product_card_table_dopInfo_priceTd">
<?php
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub" style="position:relative;top:0px;">a</span>';
}
?>
</td>
</tr>
</table>
<i class="br10"></i>
<?php
$stockCount = round($product['stockCount']);
if($stockCount == 0)
{
echo "<div class='notStockCount'>Нет в наличии</div>";
}
else
{
$value = 0;
$dopBtnClass = '';
$canAction = 'false';
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
$dopBtnClass = 'disabledBtn';
$canAction = 'true';
}
?>
<table class="product_card_table_buy" cellspacing="0" cellpadding="0">
<tr>
<td style="text-align: left">
<ul class="counter"
data-product-count="<?php echo $stockCount ?>"
data-product-min="<?php echo $product['min_order'] ?>"
data-product-id="<?php echo $product['id'] ?>"
data-product-price="<?php echo $product['price'] ?>" style="height: 36px; padding-top: 2px; border: 1px solid #d8d8d8;">
<li onclick="basketSender.downCount($(this))" action="<?php echo $canAction ?>" class="btn_all counter__button counter_button_minus red_button2" ></li>
<li class="counter__num">
<input onfocus="basketSender.onfocusCheck($(this))"
onkeyup="basketSender.keyUpCheck($(this))"
onchange="basketSender.byInput($(this))"
name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basketSender.upCount($(this))" action="<?php echo $canAction ?>" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<td style="text-align: right">
<button
style="display: inline-block; width: 110px; height: 35px"
onclick="basketSender.sendByButton($(this));yaCounter42144289.reachGoal('CART');"
class="green_button er_goods_item_bleat__add_cart <?php echo $dopBtnClass ?>"
>
<?php
if ($value == 0)
{
echo 'В корзину';
}
else
{
echo 'В корзине';
}
?>
</button>
</td>
</tr>
</table>
<?php
}
echo '</div>';
}
?>
</div>
<i class="br20"></i>
<div class="borderForPostNavigation" style="margin: 0px 20px">
<div class="postNavigation">
<?php
$in = ($page * $inPage) - $inPage + 1;
$to = $inPage + $in - 1 > $productCount ? $productCount : $inPage + $in - 1;
if ($productCount == 0)
{
$in = 0;
}
echo $in . " — " . $to . " из " . $productCount;
?>
<div class="postInPage">
<b>Показать:</b>
<?php
$countInPage = array(30, 50, 100, 250);
?>
<?php
// echo '<a href="javascript:void(0);" class="slct">' . $inPage . '</a>';
// echo '<ul class="drop">';
//
// foreach ($countInPage as $count)
// {
// if ($count != $inPage)
// {
// $url = url_for('@catalog_show_cat?alias=' . $alias) . '?inPage=' . $count . '&sort=' . $sort . '&order=' . $order ;
// echo '<li><a href="' . $url . '">' . $count . '</a></li>';
// }
// }
//
// echo '</ul>';
echo "<select class='changeCountInPage' autocomplete='off'>";
foreach ($countInPage as $count)
{
if ($count == $inPage)
{
echo "<option value='noAction' selected='selected'>" . $count . "</option>";
}
else
{
$url = url_for('@catalog_show_cat?alias=' . $alias) . '?inPage=' . $count . '&sort=' . $sort . '&order=' . $order ;
?>
<option value="<?php echo $url ?>"><?php echo $count ?></option>
<?php
}
}
echo "</select>";
?>
</div>
<script>
$('.changeCountInPage').change(function () {
var url = $(this).val();
if (url != 'noAction')
{
window.location.href = url;
}
});
// Select
$('.slct').click(function(){
/* Заносим выпадающий список в переменную */
var dropBlock = $(this).parent().find('.drop');
/* Делаем проверку: Если выпадающий блок скрыт то делаем его видимым*/
if( dropBlock.is(':hidden') ) {
dropBlock.css('display', 'inline-block');
/* Выделяем ссылку открывающую select */
$(this).addClass('active');
/* Работаем с событием клика по элементам выпадающего списка */
$('.drop').find('li').click(function(){
dropBlock.css('display', 'none');
});
/* Продолжаем проверку: Если выпадающий блок не скрыт то скрываем его */
} else {
$(this).removeClass('active');
dropBlock.css('display', 'none');
}
/* Предотвращаем обычное поведение ссылки при клике */
return false;
});
</script>
<div class="postNavigation_changePage">
<?php
$class = "";
$tag = "a";
$href_previous = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . ($page - 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_first = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=1&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == 1)
{
$class = "un_active";
$tag = "b";
$href_previous = "";
$href_first = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_prev page_button <?php echo $class ?>" <?php echo $href_first ?>></<?php echo $tag ?>>
<?php
}
?>
<?php
if ($page - 2 >= 0)
{
for ($i = $page - 2; $i < $page; $i++)
{
if ($i == 0)
{
continue;
}
?>
<a class="page_link" href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
}
?>
<b class="page_active"><?php echo $page ?></b>
<?php
if ($page + 2 <= $countPage)
{
$maxPage = $page + 2;
}
else
{
$maxPage = $countPage;
}
for ($i = $page + 1; $i <= $maxPage; $i++)
{
?>
<a class="page_link" href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
?>
<?php
$class = "";
$tag = "a";
$href_next = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . ($page + 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_last = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . $countPage . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == $countPage)
{
$class = "un_active";
$tag = "b";
$href_next = "";
$href_last = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_next page_button <?php echo $class ?>" <?php echo $href_last ?>></<?php echo $tag ?>>
<?php
}
?>
</div>
</div>
</div>
<i class="br20"></i>
<div class="bottomText">
<?php
include_component('seo', 'seoBottom');
?>
</div>
\ No newline at end of file
<?php
include_partial('show_cat_header',
array(
'alias' => $alias,
'breadcrumbs' => $breadcrumbs,
'parentId' => $parentId,
'cat_id' => $cat_id,
'order' => $order,
'inPage' => $inPage,
'sort' => $sort,
'view_type' => $view_type,
'productCount' => $productCount
)
);
?>
<i class="br20"></i>
<table style="padding: 20px" class="std_table js_cat_view" width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr valign="bottom" align="left">
<th colspan="2" style="text-align: left !important;">Название</th>
<th style="text-align: left !important;">Артикул</th>
<th>Мин.&nbsp;партия</th>
<th>В&nbsp;наличии</th>
<th style="text-align: right !important;">Цена</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($products as $product)
{
echo "<tr class='js_cat_view__ct__tr'>";
echo "<td align='center' class='first_td'>";
if ($product['sell_out'])
{
echo '<div class="sale_out">Распродажа</div>';
}
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "' style='border-bottom:none;'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
echo "</a>";
echo "</td>";
echo "<td class='js_cat_view_product_name__td'>";
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>" . $product['title'] . "</a>";
echo "</td>";
echo "<td>";
echo $product['product_code'];
echo "</td>";
echo "<td>";
echo $product['min_order'];
echo "</td>";
$stockCount = round($product['stockCount']);
if($stockCount == 0)
{
echo "<td align='center'>";
echo "Нет в наличии";
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub" style="position:relative;top:0px;">a</span>';
}
echo "</b></td>";
echo "<td colspan='2'></td>";
}
else
{
echo "<td>";
echo $stockCount;
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub" style="position:relative;top:0px;">a</span>';
}
echo "</b></td>";
$value = 0;
$dopBtnClass = '';
$canAction = 'false';
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
$dopBtnClass = 'disabledBtn';
$canAction = 'true';
}
?>
<td colspan="2" class="last_td">
<ul class="counter"
data-product-count="<?php echo $stockCount ?>"
data-product-min="<?php echo $product['min_order'] ?>"
data-product-id="<?php echo $product['id'] ?>"
data-product-price="<?php echo $product['price'] ?>" style="height: 36px; padding-top: 2px; border: 1px solid #d8d8d8;">
<li onclick="basketSender.singleDownCount($(this))" action="true" class="btn_all counter__button counter_button_minus red_button2" ></li>
<li class="counter__num">
<input onfocus="basketSender.onfocusCheck($(this))"
onkeyup="basketSender.keyUpCheck($(this))"
onchange="basketSender.singleByInput($(this))"
name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basketSender.singleUpCount($(this));yaCounter42144289.reachGoal('CART');" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<?php
}
echo "</tr>";
}
?>
</tbody>
</table>
<i class="br20"></i>
<div class="borderForPostNavigation" style="margin: 0px 20px">
<div class="postNavigation">
<?php
$in = ($page * $inPage) - $inPage + 1;
$to = $inPage + $in - 1 > $productCount ? $productCount : $inPage + $in - 1;
if ($productCount == 0) {
$in = 0;
}
echo $in . " — " . $to . " из " . $productCount;
?>
<div class="postInPage">
<b>Показать:</b>
<?php
$countInPage = array(30, 50, 100, 250);
?>
<?php
// echo '<a href="javascript:void(0);" class="slct">' . $inPage . '</a>';
// echo '<ul class="drop">';
//
// foreach ($countInPage as $count)
// {
// if ($count != $inPage)
// {
// $url = url_for('@catalog_show_cat?alias=' . $alias) . '?inPage=' . $count . '&sort=' . $sort . '&order=' . $order ;
// echo '<li><a href="' . $url . '">' . $count . '</a></li>';
// }
// }
//
// echo '</ul>';
echo "<select class='changeCountInPage' autocomplete='off'>";
foreach ($countInPage as $count)
{
if ($count == $inPage)
{
echo "<option value='noAction' selected='selected'>" . $count . "</option>";
}
else
{
$url = url_for('@catalog_show_cat?alias=' . $alias) . '?inPage=' . $count . '&sort=' . $sort . '&order=' . $order ;
?>
<option value="<?php echo $url ?>"><?php echo $count ?></option>
<?php
}
}
echo "</select>";
?>
</div>
<script>
$('.changeCountInPage').change(function () {
var url = $(this).val();
if (url != 'noAction')
{
window.location.href = url;
}
});
// Select
$('.slct').click(function(){
/* Заносим выпадающий список в переменную */
var dropBlock = $(this).parent().find('.drop');
/* Делаем проверку: Если выпадающий блок скрыт то делаем его видимым*/
if( dropBlock.is(':hidden') ) {
dropBlock.css('display', 'inline-block');
/* Выделяем ссылку открывающую select */
$(this).addClass('active');
/* Работаем с событием клика по элементам выпадающего списка */
$('.drop').find('li').click(function(){
dropBlock.css('display', 'none');
});
/* Продолжаем проверку: Если выпадающий блок не скрыт то скрываем его */
} else {
$(this).removeClass('active');
dropBlock.css('display', 'none');
}
/* Предотвращаем обычное поведение ссылки при клике */
return false;
});
</script>
<div class="postNavigation_changePage">
<?php
$class = "";
$tag = "a";
$href_previous = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . ($page - 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_first = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=1&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == 1)
{
$class = "un_active";
$tag = "b";
$href_previous = "";
$href_first = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_prev page_button <?php echo $class ?>" <?php echo $href_first ?>></<?php echo $tag ?>>
<?php
}
?>
<?php
if ($page - 2 >= 0)
{
for ($i = $page - 2; $i < $page; $i++)
{
if ($i == 0)
{
continue;
}
?>
<a class="page_link" href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
}
?>
<b class="page_active"><?php echo $page ?></b>
<?php
if ($page + 2 <= $countPage)
{
$maxPage = $page + 2;
}
else
{
$maxPage = $countPage;
}
for ($i = $page + 1; $i <= $maxPage; $i++)
{
?>
<a class="page_link" href="<?php echo url_for('@catalog_show_cat?alias=' . $alias) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
?>
<?php
$class = "";
$tag = "a";
$href_next = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . ($page + 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_last = 'href="' . url_for('@catalog_show_cat?alias=' . $alias) . '?page=' . $countPage . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == $countPage)
{
$class = "un_active";
$tag = "b";
$href_next = "";
$href_last = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_next page_button <?php echo $class ?>" <?php echo $href_last ?>></<?php echo $tag ?>>
<?php
}
?>
</div>
</div>
</div>
<i class="br20"></i>
<div class="bottomText">
<?php
include_component('seo', 'seoBottom');
?>
</div>
\ No newline at end of file
<?php
$price = "";
if (count($product->getProductPrice()) > 0)
{
$price = $product->getProductPrice()->getFirst()->getValue() . 'р';
}
$title = $breadcrumbs[count($breadcrumbs) - 1]['title'] . " купить в Уфе " . $price . ", бесплатная доставка по РБ";
$desc = "Купить " . $breadcrumbs[count($breadcrumbs) - 1]['title'] . " в Уфе. Широкий выбор. Бесплатная доставка. Привлекательные цены.";
slot('default_meta_description', $desc);
slot('title', $title);
?>
<div class="er_rows" style="padding-bottom: 0;">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span><!--
--><span><a href="<?php echo url_for('@catalog') ?>">Каталог</a></span><!--
--><?php
if ($breadcrumbs)
{
$lastBreadcrumbsCounter = 1;
foreach ($breadcrumbs as $crumb)
{
if ($crumb['title'])
{
if ($lastBreadcrumbsCounter == count($breadcrumbs))
{
echo '<span>&nbsp;/&nbsp;' . Page::niceTitleView($crumb['title']) . '</span>';
}
else
{
echo '<span>&nbsp;/&nbsp;<a href="' . url_for('@catalog_show_cat?alias=' . $crumb['alias']) . '">' . Page::niceTitleView($crumb['title']) . '</a></span>';
}
}
$lastBreadcrumbsCounter++;
}
}
?>
</div>
<style type="text/css">
.er_content__main__search{display: block;}
.js_cat_view__ct__tr td {
height: 63px;
}
</style>
</div>
</div>
<div class="er_rows" style="padding-left: 0;">
<i class="br20"></i>
<table class="er_rows_card_item" width="100%" cellspacing="0" cellpadding="0">
<tr>
<?php
if ($product->getProductImage())
{
?>
<td width="420px">
<style>
.photo_corusel_active_photo_block {
height: 290px;
margin-bottom: 20px;
display: table-cell;
vertical-align: middle;
text-align: center;
width: 425px;
}
.photo_corusel_active {
display: block;
margin: 0 auto;
}
.photo_corusel_unactive {
width: 95px;
height: 70px;
margin-right: 15px;
cursor: pointer;
background-size: cover !important;
display: inline-block;
background-position: 50% 50% !important;
}
.photo_corusel_unactive:nth-child(6) {
margin-right: 0px;
}
</style>
<div class="er_gallery">
<?php
if ($product->getProductImage()) {
$imgs = explode(';', $product->getProductImage());
echo '<div class="photo_corusel_active_photo_block ">';
echo '<div class="zoom" style="cursor: default">';
echo '<img class="photo_corusel photo_corusel_active " src="/u/i/' . str_replace('.', '-XL.', $imgs[0]) . '">';
echo '</div>';
echo '</div><i class="br20"></i>';
if (count($imgs) > 1) {
foreach ($imgs as $img) {
echo '<div class="photo_corusel photo_corusel_unactive" data-img="' . str_replace('.', '-XL.', $img) . '" style=" background: url(/u/i/' . str_replace('.', '-XL.', $img) . ')"></div>';
}
}
} else {
echo '<div class="photo_corusel_active_photo_block ">';
echo '<img class="photo_corusel photo_corusel_active " src="' . url_for('@get_image?id=' . $product->getId()) . '" >';
echo '</div><i class="br20"></i>';
}
?>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('.photo_corusel_unactive').click(function () {
var active = $('.photo_corusel_active');
active.attr('src', '/u/i/' + $(this).data('img'));
//$('.zoom').trigger('zoom.destroy');
//$('.zoom').zoom({url: active.attr('src').replace('-XL.', '.')});
});
//$('.zoom').zoom({url: $('.photo_corusel_active').attr('src').replace('-XL.', '.')});
//$('.er_gallery').each(function(k, tab){
// var itemLink = $(tab).find('.er_gallery__prev__item'),
// rSliderMain = $(tab).find('.er_gallery__main_img'),
// itemImg = $('.er_gallery__prev__item__img');
// $(itemLink).click(function(){
// $(rSliderMain).stop();
// $(itemImg).removeClass('er_gallery_active');
// $(this).find('img').addClass('er_gallery_active');
// hrefLink = $(this).attr('href');
// $(rSliderMain).css({
// 'display' : 'none',
// 'background-image' : 'url('+ hrefLink +')',
// }).fadeIn(400);
// return false;
// });
//});
});
</script>
</td>
<td width="40px">
</td>
<?php
}
?>
<td>
<div style="display:block;padding:0;position:relative;" class="inner_view">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr valign="top">
<td height="1">
<div style="display:inline-block;padding:0 0px 10px 0;">
<i class="br1"></i>
<h1 class="lato_bold_text" style="font-size: 25px">
<?php
echo $breadcrumbs[count($breadcrumbs) - 1]['title'];
if ($product->getSellOut())
{
echo '<div class="sale_out" style="display: inline-block;position: relative;left: 10px;bottom: 4px;">Распродажа</div>';
}
?>
</h1>
<i class="br50"></i>
</div>
</td>
</tr>
<tr valign="top">
<td colspan="2" style="">
<div style="font-size: 30px; color: #4f4f4f;">
<b class="product_price">
<?php
if (count($product->getProductPrice()) > 0)
{
$default_price_type = Doctrine::getTable('PriceType')->findOneByIsDefault(1);
$default_price = 0;
foreach ($product->getProductPrice() as $price)
{
if ($price->getPriceTypeId() == $default_price_type->getId())
{
$default_price = $price->getValue();
}
}
echo number_format($default_price,2,',',' ');
}
?>
</b>
<span class="rub">a</span>
</div>
<?php
$stockCount = round($product->getProductStockCount()->getFirst()->getValue());
if ($stockCount != 0)
{
$value = 0;
$dopBtnClass = '';
$canAction = 'false';
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
$dopBtnClass = 'disabledBtn';
$canAction = 'true';
}
?>
<i class="br20"></i>
<div class="inner_view__control" style="visibility: visible;">
<table cellspacing="0" cellpadding="0" style="display: inline-block; margin-right: 15px">
<tbody>
<tr>
<td>
<ul class="counter"
data-product-count="<?php echo $stockCount ?>"
data-product-min="<?php echo $product['min_order'] ?>"
data-product-id="<?php echo $product['id'] ?>"
data-product-price="<?php echo $default_price ?>" style="height: 36px; padding-top: 2px; border: 1px solid #d8d8d8;">
<li onclick="basketSender.pageDownCount($(this))" action="<?php echo $canAction ?>" class="btn_all counter__button counter_button_minus red_button2" ></li>
<li class="counter__num">
<input onfocus="basketSender.onfocusCheck($(this))"
onkeyup="basketSender.keyUpCheck($(this))"
onchange="basketSender.pageByInput($(this))"
name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basketSender.pageUpCount($(this))" action="<?php echo $canAction ?>" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
</tr>
</tbody>
</table>
<button
style="display: inline-block; width: 110px; height: 35px"
onclick="basketSender.pageSendButton($(this));yaCounter42144289.reachGoal('CART');"
class="green_button er_goods_item_bleat__add_cart <?php echo $dopBtnClass ?>"
><?php echo $value == 0 ? 'В корзинуqs' : 'В корзинe';?>
</button>
</div>
<?php
}
?>
<i class="br15"></i>
<span>Артикул: <?php echo $product->getProduct_code(); ?></span>
<i class="br10"></i>
<span class="er_goods_item_bleat__info__min">Минимальная партия: <?php echo $product->getMinOrder() ?></span>
<i class="br10"></i>
<?php
if ($stockCount == 0)
{
echo '<span class="er_goods_item_bleat__info__max">Нет в наличии</span>';
}
else
{
echo '<span class="er_goods_item_bleat__info__max">В наличии: ' . $stockCount . '</span>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<?php
if(count($product->getProductPropValue()) > 0)
{
?>
<td width="420px">
<?php
$validProps = array();
$counter = 0;
$props = $product->getProductPropValue();
foreach ($props as $prop)
{
if ($prop->getValue() !== "0" && $prop->getValue() != "")
{
if ($prop->getProductProp()->getIsList())
{
foreach ($prop->getProductProp()->getProductPropList() as $list_elem)
{
if ($list_elem->getId() == $prop->getValue())
{
$validProps[$counter]['title'] = $prop->getProductProp();
$validProps[$counter]['value'] = $list_elem->getVariant();
}
}
}
else
{
$validProps[$counter]['title'] = $prop->getProductProp();
$validProps[$counter]['value'] = $prop->getValue();
}
$counter++;
}
}
if(count($validProps) > 0)
{
echo '<i class="br30"></i><div class="lato_bold_text">Характеристика</div><i class="br15"></i>';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
foreach ($validProps as $prop)
{
echo '<tr>';
echo '<td style="border-bottom: 1px dashed; font-size: 15px">';
echo '<span style="top: 1px;position: relative;background: #fff;">' . $prop['title'] . ':</span>';
echo '<span style="float: right;top: 1px;position: relative;background: #fff;">' . $prop['value'] . '</span>';
echo '</td>';
echo '</tr>';
echo '<tr><td><i class="br5"></i></td></tr>';
}
echo '</table>';
}
?>
</td>
<td width="40px">
</td>
<?php
}
?>
<td>
<?php
if ($product->getDescription())
{
echo '<i class="br30"></i><div class="lato_bold_text">Описание</div><i class="br15"></i>';
echo '<div style="font-size: 15px">' . $product->getDescription() . '</div>';
}
?>
</td>
</tr>
</table>
<i class="br20"></i>
<div class="bottomText">
<?php
include_component('seo', 'seoBottom');
?>
</div>
</div>
\ No newline at end of file
<div class="er_rows" style="padding-bottom: 0;">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span><!--
--><span><?php echo $breadcrumbs ?></span><!--
-->
<h1 style="margin-bottom: 10px"><?php echo $breadcrumbs ?></h1>
</div>
</div>
</div>
<table style="padding: 20px" class="std_table js_cat_view" width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr valign="bottom" align="left">
<th colspan="2" style="text-align: left !important;">Название</th>
<th style="text-align: left !important;">Артикул</th>
<th>Мин.&nbsp;партия</th>
<th>В&nbsp;наличии</th>
<th style="text-align: right !important;">Цена</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
$productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();
foreach ($products as $product)
{
echo "<tr class='js_cat_view__ct__tr'>";
echo "<td align='center' class='first_td'>";
if ($product['sell_out'])
{
echo '<div class="sale_out">Распродажа</div>';
}
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "' style='border-bottom:none;'>";
echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
echo "</a>";
echo "</td>";
echo "<td class='js_cat_view_product_name__td'>";
echo "<a href='" . url_for('@catalog_show_prod?alias=' . $product['alias']) . "'>" . $product['title'] . "</a>";
echo "</td>";
echo "<td>";
echo $product['product_code'];
echo "</td>";
echo "<td>";
echo $product['min_order'];
echo "</td>";
$stockCount = round($product['stockCount']);
if($stockCount == 0)
{
echo "<td align='center'>";
echo "Нет в наличии";
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub" style="position:relative;top:0px;">a</span>';
}
echo "</b></td>";
echo "<td colspan='2'></td>";
}
else
{
echo "<td>";
echo $stockCount;
echo "</td>";
echo "<td><b>";
if ($product['price'])
{
echo number_format($product['price'],2,',',' ') . '<span class="rub" style="position:relative;top:0px;">a</span>';
}
echo "</b></td>";
?>
<td colspan="2" class="last_td">
<ul class="counter" data-product-id="<?php echo $product['id'] ?>">
<li onclick="basket.remove($(this))" class="btn_all counter__button counter_button_minus red_button2"></li>
<li class="counter__num">
<?php
$value = 0;
if (key_exists($product['id'], $productsIdsInBasket))
{
$value = $productsIdsInBasket[$product['id']];
}
?>
<input data-price="<?php echo $product['price']; ?>" data-min-p="<?php echo $product['min_order'] ?>" data-stock="<?php echo round($product['stockCount']); ?>" onchange="basket.handWrite($(this));basket.check($(this))" name="" value="<?php echo $value ?>" autocomplete="off" type="text">
</li>
<li onclick="basket.add($(this))" class="btn_all counter__button counter_button_plus green_button2"></li>
</ul>
</td>
<?php
}
echo "</tr>";
}
?>
</tbody>
</table>
<i class="br20"></i>
<div class="borderForPostNavigation" style="margin: 0px 20px">
<div class="postNavigation">
<?php
$in = ($page * $inPage) - $inPage + 1;
$to = $inPage + $in - 1 > $productCount ? $productCount : $inPage + $in - 1;
if ($productCount == 0) {
$in = 0;
}
echo $in . " — " . $to . " из " . $productCount;
?>
<div class="postInPage">
<b>Показать:</b>
<?php
$countInPage = array(30, 50, 100, 250);
?>
<?php
// echo '<a href="javascript:void(0);" class="slct">' . $inPage . '</a>';
// echo '<ul class="drop">';
//
// foreach ($countInPage as $count)
// {
// if ($count != $inPage)
// {
// $url = url_for('@catalog_show_cat?alias=' . $alias) . '?inPage=' . $count . '&sort=' . $sort . '&order=' . $order ;
// echo '<li><a href="' . $url . '">' . $count . '</a></li>';
// }
// }
//
// echo '</ul>';
echo "<select autocomplete='off'>";
foreach ($countInPage as $count)
{
if ($count == $inPage)
{
echo "<option selected='selected'>" . $count . "</option>";
}
else
{
$url = url_for('@catalog_special?type=' . $type) . '?inPage=' . $count . '&sort=' . $sort; // . '&order=' . $order ;
?>
<option onclick='window.location.href = "<?php echo $url ?>";'><?php echo $count ?></option>
<?php
}
}
echo "</select>";
?>
</div>
<script>
// Select
$('.slct').click(function(){
/* Заносим выпадающий список в переменную */
var dropBlock = $(this).parent().find('.drop');
/* Делаем проверку: Если выпадающий блок скрыт то делаем его видимым*/
if( dropBlock.is(':hidden') ) {
dropBlock.css('display', 'inline-block');
/* Выделяем ссылку открывающую select */
$(this).addClass('active');
/* Работаем с событием клика по элементам выпадающего списка */
$('.drop').find('li').click(function(){
dropBlock.css('display', 'none');
});
/* Продолжаем проверку: Если выпадающий блок не скрыт то скрываем его */
} else {
$(this).removeClass('active');
dropBlock.css('display', 'none');
}
/* Предотвращаем обычное поведение ссылки при клике */
return false;
});
</script>
<div class="postNavigation_changePage">
<?php
$class = "";
$tag = "a";
$href_previous = 'href="' . url_for('@catalog_special?type=' . $type) . '?page=' . ($page - 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_first = 'href="' . url_for('@catalog_special?type=' . $type) . '?page=1&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == 1)
{
$class = "un_active";
$tag = "b";
$href_previous = "";
$href_first = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_prev page_button <?php echo $class ?>" <?php echo $href_first ?>></<?php echo $tag ?>>
<?php
}
?>
<?php
if ($page - 2 >= 0)
{
for ($i = $page - 2; $i < $page; $i++)
{
if ($i == 0)
{
continue;
}
?>
<a class="page_link" href="<?php echo url_for('@catalog_special?type=' . $type) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
}
?>
<b class="page_active"><?php echo $page ?></b>
<?php
if ($page + 2 <= $countPage)
{
$maxPage = $page + 2;
}
else
{
$maxPage = $countPage;
}
for ($i = $page + 1; $i <= $maxPage; $i++)
{
?>
<a class="page_link" href="<?php echo url_for('@catalog_special?type=' . $type) ?>?page=<?php echo $i ?>&inPage=<?php echo $inPage ?>&sort=<?php echo $sort ?>&order=<?php echo $order ?>"><?php echo $i ?></a>
<?php
}
?>
<?php
$class = "";
$tag = "a";
$href_next = 'href="' . url_for('@catalog_special?type=' . $type) . '?page=' . ($page + 1) . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
$href_last = 'href="' . url_for('@catalog_special?type=' . $type) . '?page=' . $countPage . '&inPage=' . $inPage . '&sort=' . $sort . '&order=' . $order .'"';
if ($page == $countPage)
{
$class = "un_active";
$tag = "b";
$href_next = "";
$href_last = "";
}
?>
<?php
if ($class != "un_active")
{
?>
<<?php echo $tag ?> class="page_link page_next page_button <?php echo $class ?>" <?php echo $href_last ?>></<?php echo $tag ?>>
<?php
}
?>
</div>
</div>
</div>
<i class="br20"></i>
<div class="bottomText">
<?php
include_component('seo', 'seoBottom');
?>
</div>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment