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

first

parents
<div style="width: 100%; height: 100px; background-color: #9ac962">
<a href="http://<?php echo $host?>"><img src="<?php echo 'http://' . $host . '/i/logotype.png' ?>" style="height: 82px;margin-left: 19px;margin-top: 10px;"></a>
</div>
\ No newline at end of file
<?php
$features = array(
array(
'icon' => 'stone',
'title_ru' => 'Камни отбираются и<br>проверяются вручную',
'title_en' => 'The stones are selected<br>and checked manually'
),
array(
'icon' => 'ribbon',
'title_ru' => 'Все товары высшего<br>качества',
'title_en' => 'All products are<br>of the highest quality'
),
array(
'icon' => 'box',
'title_ru' => 'Бесплатная доставка<br>камня',
'title_en' => 'Free shipping'
),
);
?>
<div class="lending_area_2 <?php echo isset($class) ? $class : ''; ?>">
<i class="br40"></i>
<div style="margin: 0 auto" class="max_width">
<table class="to_div" style="width: 100%;max-width: 1100px;" cellpadding="0" cellspacing="0">
<tbody align="center">
<tr>
<div class="caption" style="text-align: center;"><?php echo __('Преимущества')?></div>
<i class="br40"></i>
</tr>
<tr>
<?php
foreach ($features as $feature) {
echo '<td style="vertical-align: middle"><div class="lending_area_2__icon lending_area_2__icon_' . $feature['icon'] . '"></div><br>'. $feature['title_'. $sf_user->getCulture()] .'<i class="br40 mobile"></i></td>';
}
?>
</tr>
</tbody>
</table>
</div>
<i class="br50 mobile_hide"></i>
<i class="br20"></i>
<?php if (!isset($closeDiv) || (isset($closeDiv) && $closeDiv === true)): ?>
</div>
<?php endif; ?>
\ No newline at end of file
<?php
if ($marking == 'top')
{
?>
<table class="table_menu_top" cellspacing="0" cellpadding="0" width="100%">
<tr>
<?php
foreach ($menu as $title => $route)
{
$link = url_for($route);
if ($route != '@homepage')
{
$class = "";
if (strpos($path, '/product/') !== false)
{
$path = '/catalog/';
}
if (strpos($path, $link) !== false)
{
$class = "menu_top_link__active";
}
}
else
{
$class = "";
if ($path == '/')
{
$class = "menu_top_link__active";
}
}
?>
<td align="center">
<nobr>
<a href="<?php echo $link ?>" class="menu_top_link <?php echo $class ?>"><?php echo $title ?></a>
</nobr>
</td>
<?php
}
foreach ($pagesFromDb as $page)
{
$link = url_for('@show_page?alias=' . $page->getFolder());
$title = $page->getTitle();
$class = "";
if ($path == $link)
{
$class = "menu_top_link__active";
}
?>
<td align="center">
<nobr>
<a href="<?php echo $link ?>" class="menu_top_link <?php echo $class ?>"><?php echo $title ?></a>
</nobr>
</td>
<?php
}
?>
<td align="center">
<nobr>
<a href="tel:83472296013" class="menu_top_link">8 (347) 229-60-13</a>
</nobr>
</td>
</tr>
</table>
<?php
}
elseif ($marking == 'bottom')
{
?>
<ul class="er_footer_menu">
<?php
foreach ($menu as $title => $route)
{
$link = url_for($route);
echo '<li><a href="' . $link . '">' . $title . '</a></li>';
}
foreach ($pagesFromDb as $page)
{
$link = url_for('@show_page?alias=' . $page->getFolder());
$title = $page->getTitle();
echo '<li><a href="' . $link . '">' . $title . '</a></li>';
}
?>
</ul>
<?php
}
elseif ($marking == 'page404')
{
?>
<ul class="page404_nav">
<li><a href="/">Главная</a></li>
<?php
foreach ($pagesFromDb as $page)
{
$link = url_for('@show_page?alias=' . $page->getFolder());
$title = $page->getTitle();
echo '<li><a href="' . $link . '">' . $title . '</a></li>';
}
?>
</ul>
<?php
}
?>
<?php
include_partial('pages/headerLetter', array('host' => $host));
?>
<br />
Для востановления пароля перейдите по ссылке, <a href="<?php echo 'http://' . $host . url_for('@personal_password_recovery?secretString=' . $secretString) ?>" style="color: #618D2A; border-bottom: 1px dashed; text-decoration: none">Востановить пароль</a>
<?php
include_partial('pages/headerLetter', array('host' => $host));
?>
<br />
Вы успешно прошли регистрацию на сайте компании ТриАр.<br /><br />
Для входа в систему используйте учетные данные:<br />
Логин: <?php echo $username ?><br />
Пароль: <?php echo $password ?>
\ No newline at end of file
<div class="er_rows">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span>
<div>
<h1>О компании</h1>
</div>
</div>
</div>
<div class="ftext pages">
<p>
Чтобы стать постоянным оптовым клиентом и получить доступ к сервисам,<br>
предлагается пройти процедуру регистрации.
</p>
<i class="br50"></i>
<table cellspacing="0" cellpadding="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<div class="howToBuy_infograf howToBuy_infograf_reg"></div>
</td>
<td style="padding-left: 15px; padding-right: 15px; text-align: center">
<div class="howToBuy_infograf_arrow_line"></div>
<div class="howToBuy_infograf_arrow_trigon"></div>
</td>
<td>
<div class="howToBuy_infograf howToBuy_infograf_basket"></div>
</td>
<td style="padding-left: 15px; padding-right: 15px; text-align: center">
<div class="howToBuy_infograf_arrow_line"></div>
<div class="howToBuy_infograf_arrow_trigon"></div>
</td>
<td>
<div class="howToBuy_infograf howToBuy_infograf_phone"></div>
</td>
</tr>
<tr>
<td class="howToBuy_infograf_description">
<i class="br5"></i>
1. Зарегистрироваться на сайте
</td>
<td class="howToBuy_infograf_description">
</td>
<td class="howToBuy_infograf_description">
<i class="br5"></i>
2. Заказать товар
</td>
<td class="howToBuy_infograf_description">
</td>
<td class="howToBuy_infograf_description">
<i class="br5"></i>
3. Связаться с нами по телефону
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<i class="br50"></i>
</td>
</tr>
<tr>
<td>
<table style="margin-left: 69px;" cellpadding="0" cellspacing="0">
<tr>
<td>
<div class="howToBuy_infograf howToBuy_infograf_folder"></div>
</td>
<td align="center">
<div class="howToBuy_infograf_arrow_line"></div>
<div class="howToBuy_infograf_arrow_trigon"></div>
</td>
<td>
<div class="howToBuy_infograf howToBuy_infograf_paper"></div>
</td>
<tr>
<td style="width: 200px !important;" class="howToBuy_infograf_description">
<i class="br5"></i>
4. Предоставить данные о регистрации юр.лица или ИП
</td>
<td style="width: 200px !important;" class="howToBuy_infograf_description">
</td>
<td style="width: 200px !important;" class="howToBuy_infograf_description">
<i class="br5"></i>
5. Заключить договор
</td>
</tr>
</table>
</td>
</tr>
</table>
<i class="br50"></i>
<p>
Доставка по Уфе и по Республике Башкортостан — бесплатно!<br>
Условия доставки согласовываются при оформлении заказа.
</p>
</div>
</div>
\ No newline at end of file
<div class="er_rows">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span>
<div>
<h1>Контакты</h1>
</div>
</div>
</div>
<div class="er_rows">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span>
<div>
<h1>Доставка</h1>
</div>
</div>
</div>
<div class="ftext">
<p>
Почвенная влага отталкивает санитарный и ветеринарный контроль. Ил, если принять во внимание воздействие фактора времени, вызывает музей под открытым небом. Водохранилище, несмотря на внешние воздействия, отражает глубокий закрытый аквапарк. Как мы уже знаем, функция влагопроводности вертикально дегустирует подпахотный лессиваж.
</p>
<p>
Органическое вещество, если принять во внимание воздействие фактора времени, кумулятивно. Прикатывание пространственно входит смешанный профиль. Рельеф представляет собой гидроузел. Основная магистраль проходит с севера на юг от Шкодера через Дуррес до Влёры, после поворота широколиственный лес начинает полидисперсный провоз кошек и собак. Кристаллическая решетка минералов декларирует горизонт, при этом имейте в виду, что чаевые следует оговаривать заранее, так как в разных заведениях они могут сильно различаться. Суглинок, на первый взгляд, иллюстрирует уличный уровень грунтовых вод.
</p>
<p>
Кит декларирует глей. Бурное развитие внутреннего туризма привело Томаса Кука к необходимости организовать поездки за границу, при этом озеро Ньяса существенно вызывает культурный бугор пучения. Поэтому совсем не случайно то, что профиль точно приводит к появлению прибор Качинского. Рекомендуется совершить прогулку на лодке по каналам города и Озеру Любви, однако не надо забывать, что Динарское нагорье оформляет капилляр. Принимая во внимание искусственность границ элементарной почвы и произвольность ее положения в пространстве почвенного покрова, рыболовство мгновенно. Бассейн нижнего Инда традиционен.
</p>
</div>
</div>
<script type="text/javascript">
_resizeAll.deliveryResize = function () {
console.log('resize');
}
</script>
\ No newline at end of file
<?php include(sfConfig::get('sf_app_template_dir') . '/header.php'); ?>
<?php include(sfConfig::get('sf_app_template_dir') . '/top.php'); ?>
<div class="page404">
<div class="page404_text">Запрашиваемая страница не существует</div>
<div class="page404_big404">404</div>
<?php
?>
<i class="br50"></i>
</div>
<?php include(sfConfig::get('sf_app_template_dir') . '/bottom.php'); ?>
<?php include(sfConfig::get('sf_app_template_dir') . '/footer.php'); ?>
<div class="er_rows">
<div class="breadcrumbs">
<div class="breadcrumbs">
<span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span>
<div>
<h1>Как купить</h1>
</div>
<div class="ftext pages" style="font-size: 18px !important;">
</div>
</div>
\ No newline at end of file
<table class="lending" style="width: 100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="fly_stones">
Банный камень<i class="br5"></i>
и товары для бани
</div>
<div class="stone_layout"></div>
</td>
</tr>
<tr>
<td>
<div class="lending_area_1 background_grey">
<i class="br50"></i>
<i class="br20"></i>
<table cellpadding="0" cellspacing="0" class="max_width">
<tr>
<td>Гравитирующая сфера, вследствие квантового характера явления, оправдывает первоначальный степенной ряд. Азид ртути, как бы это ни казалось парадоксальным, растягивает циркулирующий поток, а время ожидания ответа составило бы 80 миллиардов лет. Кислота продольно продуцирует жидкий пигмент. Сумма ряда, после осторожного анализа, выталкивает экваториальный лакколит. Экситон асферично сжимает космический аллювий.</td>
<td style="width: 30px !important;"></td>
<td>В пределах аккумулятивных равнин генезис традиционно вызывает ультрафиолетовый эвапорит. Катализатор, как можно показать с помощью не совсем тривиальных вычислений, притягивает белый пушистый осадок. Суспензия, так же, как и в других регионах, концентрирует окисленный объект.</td>
</tr>
</table>
<i class="br10"></i>
<i class="br50"></i>
</div>
</td>
</tr>
<tr>
<td>
<?php include_partial("pages/landingArea2"); ?>
<i class="br50"></i>
</td>
</tr>
<tr>
<td>
<div class="lending_area_3">
<i class="br20"></i>
<div style="text-align: center" class="caption">
Наши товары
</div>
<i class="br20"></i>
<div class="lending_product_area product_card_wrap max_width" style="margin: 0 auto">
<div class="catalog_category_childs_wrap">
<?php include_partial("catalog/product", array("count" => 8)); ?>
</div>
</div>
<i class="br20"></i>
<div class="max_width" style="margin: 0 auto">
<table class="group_product" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="group_product_left">
<div class="big_product_card" style="background: url(/i/example2.png)">
<a href="/">
<div class="big_product_card_info">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="big_product_card_info__left">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="title">
<span>Жадеит шлифованный</span>
<i class="br10"></i>
</td>
</tr>
<tr>
<td class="offer">
<span>(Ведро 10 кг)</span>
</td>
</tr>
</table>
</td>
<td class="big_product_card_info__right">1000 <span class="rub">i</span></td>
</tr>
</table>
</div>
</a>
</div>
</td>
<td class="group_product_right">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="/" style="display: block;">
<div class="rect_product_card" style="background: url(/i/example3.png)">
<div class="rect_product_card_info">
<span>Жадеит колотый</span>
</div>
</div>
</a>
</td>
</tr>
<tr>
<td>
<a href="/" style="display: block;">
<div class="rect_product_card" style="background: url(/i/example4.png)">
<div class="rect_product_card_info special_text">
<span>Аксессуары для бани</span>
</div>
</div>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<i class="br50"></i>
</div>
</td>
</tr>
<tr>
<td>
<div class="lending_area_4">
<i class="br20"></i>
<div style="text-align: center" class="caption">Отзывы</div>
<i class="br25"></i>
<?php include_partial("review/review"); ?>
<i class="br50"></i>
</div>
</td>
</tr>
</table>
\ No newline at end of file
User-agent: *
Disallow: /arm/*
Disallow: /personal/*
Host: <?php echo $host ?>
Sitemap: <?php echo $host . url_for('@sitemap') ?>
<?php
$translation = $page->getTranslation();
slot('title', $translation[$sf_user->getCulture()]['title']);
?>
<div class="er_rows">
<?php
include_partial('main/breadcrumbs');
echo '<h1 class="content_title">' . $page->getTitle() . '</h1>';
?>
<div class="max_width_small">
<div class="ftext pages">
<?php echo $page->getBody(ESC_RAW) ?>
</div>
</div>
</div>
\ No newline at end of file
<?php
/**
* Partner actions.
*
* @package sf
* @subpackage Partner
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class PartnerActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
$this->forward('default', 'module');
}
}
<?php
class partnerComponents extends sfComponents
{
public function executePartner(sfWebRequest $request)
{
$this->partners = Doctrine_Query::create()
->select("title, cover, link, order_id")
->from("Partners")
->orderBy("order_id ASC")
->fetchArray();
}
}
\ No newline at end of file
<?php
if(count($partners) > 0){
?>
<tr>
<td>
<div class="lending_area_4 lending_area_partner">
<div class="max_width">
<div class="partner">
<div class="caption"><?php echo __('Наши партнёры'); ?></div>
<div class="partner_slideshow slideshow_wrap mobile_hide">
<div class="slideshow"
data-cycle-fx="carousel"
data-cycle-slides="> .partner_slideshow__item"
data-cycle-timeout="3000"
data-cycle-prev=".for_partners.slideshow_arrow.left"
data-cycle-next=".for_partners.slideshow_arrow.right"
data-cycle-carousel-visible="4"
data-cycle-easing="linear"
data-cycle-pause-on-hover="true">
<?php foreach ($partners as $partner) { ?>
<div class="partner_slideshow__item slideshow__item">
<div class="partner_slideshow__item__image" style="background-image: url(/u/i/<?php echo Page::replaceImageSize($partner['cover'], 'S'); ?>)"></div>
<div class="partner_slideshow__item__title"><?php echo $partner['title']; ?></div>
</div>
<?php } ?>
</div>
<div class="for_partners slideshow_arrow left"></div>
<div class="for_partners slideshow_arrow right"></div>
</div>
<div class="partner_slideshow slideshow_wrap mobile">
<div class="slideshow"
data-cycle-fx="scrollHorz"
data-cycle-slides="> .partner_slideshow__item"
data-cycle-timeout="3000"
data-cycle-prev=".for_partners.slideshow_arrow.left"
data-cycle-next=".for_partners.slideshow_arrow.right"
data-cycle-swipe="true"
data-cycle-swipe-fx="scrollHorz"
data-cycle-pause-on-hover="true">
<?php foreach ($partners as $partner) { ?>
<div class="partner_slideshow__item slideshow__item">
<div class="partner_slideshow__item__image" style="background-image: url(/u/i/<?php echo Page::replaceImageSize($partner['cover'], 'S'); ?>)"></div>
<div class="partner_slideshow__item__title"><?php echo $partner['title']; ?></div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
if(!$('.mobile').is(":visible")) {
$('.partner_slideshow.mobile_hide .slideshow').cycle();
} else {
$('.partner_slideshow.mobile .slideshow').cycle();
}
</script>
</td>
</tr>
<?php
}
?>
\ No newline at end of file
<?php
/**
* product actions.
*
* @package sf
* @subpackage product
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class productActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
}
public function executeShow(sfWebRequest $request)
{
$product = $this->getRoute()->getObject();
$this->forward404Unless(!$product->getIsDelete() && $product->getOfferCount() > 0);
if(!$product->getIsDetail()){
$cats = $product->getCats();
if(count($cats) > 0){
$this->redirect('@catalog_show?alias=' . $cats[0]['alias'] . '&sf_culture=' . $this->getUser()->getCulture());
}
}
$this->forward404Unless($product->getIsDetail());
$this->culture = $this->getUser()->getCulture();
$this->basket_id = $this->getUser()->getAttribute('basket_id');
$this->product = Doctrine_Query::create()
->select("p.*, c.*, ct.*, o.*, ppv.*, pp.*, ppl.*, t.*, to.*, tpp.*, bo.*")
->from('Product p')
->leftJoin('p.Cats c')
->leftJoin("c.Translation ct")
->leftJoin('p.Offer o WITH o.is_delete = 0')
->leftJoin('o.BasketOffer bo WITH bo.basket_id = ?', $this->basket_id)
// ->leftJoin('(SELECT * FROM Product cp LEFT JOIN Offer co ON co.id = cp.product_id WHERE co.is_delete = 0 ORDER BY co.sort ASC ) o ON o.id = p.product_id')
->leftJoin('p.ProductPropValue ppv')
->leftJoin('ppv.ProductProp pp')
->leftJoin('pp.ProductPropList ppl')
->innerJoin('p.Translation t WITH t.lang = \'' . $this->culture . '\'')
->leftJoin('o.Translation to WITH to.lang = \'' . $this->culture . '\'')
->leftJoin('pp.Translation tpp WITH tpp.lang = \'' . $this->culture . '\'')
->leftJoin('ppl.Translation tppl WITH tppl.lang = \'' . $this->culture . '\'')
->andWhere('p.id = ?', $product->getId())
->andWhere("p.is_delete = 0")
->orderBy('o.sort asc')
->fetchOne();
$this->setLayout('layoutPage');
if ($this->getUser()->hasAttribute('number_of_views') && $this->getUser()->getAttribute('number_of_views') != false) {
$number_of_view = $this->getUser()->getAttribute('number_of_views');
if ($this->getUser()->getAttribute('number_of_views') < 10) {
if (!$this->getUser()->hasAttribute('ids_view_product') || $this->getUser()->getAttribute('ids_view_product') == false) {
$this->getUser()->setAttribute('ids_view_product', $this->product['id'] . ';');
} else {
$str_ids = $this->getUser()->getAttribute('ids_view_product');
$ids = explode(';', $str_ids);
if (!in_array($this->product['id'], $ids)) {
$number_of_view++;
$this->getUser()->setAttribute('number_of_views', $number_of_view);
$this->getUser()->setAttribute('ids_view_product', $str_ids . $this->product['id'] . ';');
}
}
}
if ($number_of_view == 5 || $number_of_view == 7 || $number_of_view == 10) {
if ($this->getUser()->hasAttribute('phone_number') && $this->getUser()->getAttribute('phone_number') != false) {
$date_now = new DateTime('now');
$date_limit = new DateTime('now');
$date_limit->modify('-30 day');
$phone_discount = Doctrine_Query::create()
->select()
->from('DiscountPhone dp')
->where('dp.phone = ?', $this->getUser()->getAttribute('phone_number'))
->andWhere('dp.order_id is null')
->andWhere('dp.created_at BETWEEN STR_TO_DATE(\'' . $date_limit->format('Y-m-d H:i:s') . '\', \'%Y-%m-%d %H:%i:%s\') AND STR_TO_DATE(\'' . $date_now->format('Y-m-d H:i:s') . '\', \'%Y-%m-%d %H:%i:%s\')')
->execute();
if (count($phone_discount) > 0) {
$phone_discount = $phone_discount->getFirst();
$phone_discount->setActiveDiscount($number_of_view);
$phone_discount->save();
$this->getUser()->setAttribute('active_discount', $number_of_view);
}
}
}
}
}
}
<?php
if (isset($product)) {
$translation = $product['Translation'];
$productImg = explode(';', $product['product_img']);
$productImg = (count($productImg) > 0 ? $productImg[0] : false);
$q = Doctrine::getTable('Product')->findOneById($product['id'])->getOffer();
$discount_available = false;
foreach ($q as $offer) {
if ($offer->getDiscountAvailable() == 1) {
$discount_available = true;
break;
}
}
echo '<div class="catalog_category_child_item ' . ($discount_available ? 'discount' : '') . '">';
if ($discount_available) {
echo '<div class="discount_available"><div class="discount_available_desc">Ищите наши QR-коды в видео и соц. сетях и забирайте скидку</div><div class="discount_available_title">Доступен со скидкой</div></div>';
}
echo '<' . ($product['is_detail'] ? 'a' : 'span') . ' href="' . url_for("@product_show?alias=" . $product['alias']) . '" class="anb">';
if($productImg){
echo '<img src="/i/n.gif" style="background-image: url(/u/i/' . Page::replaceImageSize($productImg, 'S') . ');" />';
}else
{
$offerImg = '';
foreach ($q as $offer) {
if (strlen($offer->getImg()) > 3)
$offerImg = $offer->getImg();
break;
}
if (strlen($offerImg) > 3 )
{
echo '<img src="/i/n.gif" style="background-image: url(/u/i/' . $offerImg . '); background-size: cover" />';
}else
{
echo '<img src="/i/n.gif" style="background-image: url(/i/no_photo.png);" />';
}
}
echo '<span class="green_link">' . $translation[$sf_user->getCulture()]['title'] . '</span>';
echo '</' . ($product['is_detail'] ? 'a' : 'span') . '>';
echo '<i class="br20"></i>';
echo '</div>';
}
?>
\ No newline at end of file
<?php
$translation = $product['Translation'][$culture];
slot('title', $translation['title']);
use_javascript('fotorama.js');
use_stylesheet('fotorama.css');
$offers = $product['Offer'];
$images = array();
$images = explode(';', $product['product_img']);
$offers_images = array();
foreach ($offers as $offer) {
if($offer['img']){
echo '<!--';
print_r($offer['img']);
echo '-->';
$images[] = $offer['img'];
if(!isset($offers_images[$offer['id']])){
$offers_images[$offer['id']] = count($images) - 1;
}
}
}
if(count($offers_images) > 0){
?>
<script type="text/javascript">
counterLite.offerImages = JSON.parse('<?php echo json_encode($offers_images);?>');
</script>
<?php
}
$view = 'much';
?>
<style type="text/css">
.content__main {
padding-bottom: 40px;
}
</style>
<div class="content__main">
<div class="max_width">
<?php
include_component('main', 'breadcrumbs', array('product_id' => $product['id']));
echo '<h1 class="content_title">' . $translation['title'] . '</h1>';
?>
<div class="catalog_product_wrap">
<table class="to_div" cellspacing="0" cellpadding="0" width="100%">
<tbody valign="top">
<tr class="product_main product_main_<?php echo $view;?>">
<td width="48%">
<div id="fotorama" class="fotorama" data-width="100%" data-ratio="3/2" width="100%" max-height="400px" data-nav="thumbs" data-auto="false">
<?php
if (count($images) == 1 && strlen($images[0]) < 3) {
echo '<img src="/i/no_photo.png">';
}else {
foreach ($images as $image) {
echo '<img src="/u/i/' . Page::replaceImageSize($image, 'M') . '">';
}
}
?>
</div>
</td>
<td width="50"></td>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody valign="middle" align="left">
<tr>
<?php
if ($view == 'much') { ?>
<td>
<?php
$first_cost = 0;
if (count($offers) > 0) {
$sum = 0;
foreach ($offers as $offer) {
if ($i == 1) {
$first_cost = $offer['price'];
}
$quantity_type = $offer->getQuantityTypeValue($culture);
$quantity_type = ($quantity_type != '' ? ', ' . $quantity_type : '');
$infoAmount = false;
if (trim($quantity_type) == ', ведро')
{
if ($product->getTheWeight()) {
$quantity_type .= ', ' . $product->getTheWeight() . 'кг';
}else {
$quantity_type .= ', 10кг';
}
}
if (isset($offer['BasketOffer'][0]) && $offer['BasketOffer'][0]['amount'] > 0)
{
$infoAmount = $offer['BasketOffer'][0]['amount'];
}
$sum += intval($infoAmount)*$offer['price'];
$array_price = array_map('intval', str_split($offer['price']));
if (strlen($offer['price']) > 3)
{
$offer_str = '';
$length_str_price = 0;
if (count($array_price) > 6)
{
$offer_str .= implode('', array_slice($array_price, 0, count($array_price)-6)) . ' ';
$length_str_price = strlen($offer_str)-1;
}
$offer_str .= implode('', array_slice($array_price, $length_str_price, count($array_price)-$length_str_price-3)) . ' ' . implode('', array_slice($array_price, count($array_price)-3));
}else
{
$offer_str = '' . $offer['price'];
}
?>
<label class="product_offer">
<input data-initialized="1" data-id="<?php echo $offer['id']; ?>" type="radio" name="offer" onchange="counterLite.change($(this))">
<?php if ($offer['price'] > 1) { ?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr <?php echo ($offer['discount_available'] == 1 ? 'class="discount' : '') ?>">
<td><?php echo $offer['title'] . $quantity_type; ?></td>
<td style="white-space: nowrap;" align="right">
<?php echo $offer_str; ?>
<span class="rub">i</span>
</td>
<td width="1" align="right">
<div class="product_counter min" data-id="<?php echo $offer['id']; ?>" data-price="<?php echo $offer['price'];?>">
<input type="button" class="product_counter_minus" data-symbol="-" onclick="counterLite.update($(this))">
<input autocomplete="off" type="text" class="product_counter_val" value="<?php echo ( $infoAmount ? $infoAmount : 0 ) ?>" data-symbol="-+" onkeyup="counterLite.update($(this))">
<input type="button" class="product_counter_plus" data-symbol="+" onclick="counterLite.update($(this))">
</div>
</td>
</tr>
</table>
<?php }else
{ ?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><?php echo $offer['title'] . $quantity_type; ?></td>
<td colspan="2" width="1" align="right">
<div class="find_price" onclick="callback.open($(this));return false;" data-offer-id="<?php echo $offer['id']; ?>" >
<span>Узнать цену</span>
</div>
</td>
</tr>
</table>
<?php } ?>
</label>
<?php
$i++;
}
}
$array_sum = array_map('intval', str_split($sum));
if (count($array_sum) > 3)
{
$sum_str = '';
$length_str = 0;
if (count($array_sum) > 6)
{
$sum_str .= implode('', array_slice($array_sum, 0, count($array_sum)-6)) . ' ';
$length_str = strlen($sum_str)-1;
}
$sum_str .= implode('', array_slice($array_sum, $length_str, count($array_sum)-$length_str-3)) . ' ' . implode('', array_slice($array_sum, count($array_sum)-3));
}else
{
$sum_str = '' . $sum;
}
?>
<i class="br10"></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="0"><?php echo ($sum > 0 ? $sum_str : '') ?></span>
<span class="rub fs_10em" <?php echo ($sum > 0 ? ' style="visibility: visible;"' : '')?>>i</span></span>
</td>
</tr>
</tbody>
</table>
</td>
<?php
}
?>
</tr>
<tr>
<td class="product__advantages__info" colspan="3">
<?php
$productDescription = $product->getDescription(ESC_RAW);
$productPropValue = $product->getPropertyArray();
echo '<i class="br10"></i>';
if ($productDescription) {
echo '<a href="" class="product__advantages__info__link fs_18 bbs_d green_link active" data-tab="description">' . __('Описание') . '</a>';
}
if (count($productPropValue) > 0) {?>
<a href="" class="product__advantages__info__link fs_18 bbs_d green_link <?php echo (!$productDescription) ? 'active' : '' ?>" data-tab="features"><?php echo __('Характеристики'); ?></a>
<?php
}
if ($product->getCertificate()) {?>
<a href="" class="product__advantages__info__link fs_18 bbs_d green_link <?php echo (!$productDescription && count($productPropValue) <= 0) ? 'active' : '' ?>" data-tab="certificate"><?php echo __('Сертификат'); ?></a>
<?php
}
?>
<i class="br20"></i>
<div class="product__advantages__info__tab active" data-tab="description">
<div class="product__advantages__info__tab__description">
<div><?php echo $productDescription ?></div>
</div>
<a href="" class="product__advantages__info__tab__description_btn" onclick="$('.product__advantages__info__tab__description').toggleClass('show');return false;"></a>
</div>
<div class="product__advantages__info__tab <?php echo (!$productDescription) ? '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) {
if($prop['value'] != ''){
echo '<tr>';
echo '<td style="font-family: \'robotoregular\';">' . $prop['prop'] . '</td>';
echo '<td></td>';
echo '<td>' . $prop['value'] . '</td>';
echo '</tr>';
}
}
?>
</tbody>
</table>
</div>
<div class="product__advantages__info__tab <?php echo (!$productDescription && count($productPropValue) <= 0) ? 'active' : '' ?>" data-tab="certificate">
<?php
if($product->getCertificate()){
echo '<a download="" href="/u/i/' . $product->getCertificate() . '" class="document_file_icon" data-val="' . $product->getCertificate() . '"></a>';
}
?>
</div>
<script type="text/javascript">
$('.product__advantages__info__link').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');
return false;
})
</script>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?php
foreach ($product->getCats() as $cat){
if($cat['Translation'][$sf_user->getCulture()]['title'] == 'Камень для бани'){
echo '<div class="product_section product__calculator">';
echo '<div class="max_width">';
include_partial("catalog/product_calculator", array('offers' => $product['Offer']));
echo '</div>';
echo '</div>';
break;
}
}
?>
<div style="border-top: 1px solid #ececec; width: 100%; height: 1px"></div>
<?php include_partial("pages/landingArea2"); ?>
<?php
/*
<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("product/product", array("count" => 4)); ?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
*/
?>
<?php
//print_r($product->getId());
include_component('video', 'video', array('limit' => 2, 'tag_id' => $product->getId()));
include_component('article', 'article', array('limit' => 4, 'tag_id' => $product->getId()));
include_component('review', 'review', array('limit' => 5, 'tag_id' => $product->getId()));
?>
<script type="text/javascript">
var $fotoramaDiv = $('#fotorama').fotorama();
var fotorama = $fotoramaDiv.data('fotorama');
$(document).ready(function(){
var diff = parseInt($('.product__advantages__info__tab__description > div').height()) - parseInt($('.product__advantages__info__tab__description').height());
if(diff > 10 && diff < 85) {
$('.product__advantages__info__tab__description').css('max-height','225px')
} else if(diff > 10) {
$('.product__advantages__info__tab__description_btn').addClass('show')
}
});
</script>
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