index.php 17.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
<div id="content" class="clearfix">

<div id="layerslider-container-fw">
    <div id="layerslider" style="width: 100%; min-width: 960px; height: 320px; margin: 0px auto; ">
        <?php foreach($active_sales as $k => $sale): ?>
            <?php if($sale['show_banner'] && !empty($sale['banner'])): ?>
            <div class="ls-layer" style="slidedirection: right; transition2d: 110,111,112,113; ">
                <img src="<?= $this->storage->getPhotoURL($sale['banner'], 'sales/banner', 'original') ?>" class="ls-bg" alt="Slide background">
                <a href = "<?= !empty($sale['link']) ? $sale['link'] : '#' ?>" class="ls-link">
                    <?php if($sale['show_counter']): ?>
                        <div class="ls-clock-wrapper">
                            <p style="margin-top: 10px" class="countdown">
                                <?= $t->_('left_end_time') ?>
                            </p>
                            <div id="<?= $k ?>-clock"></div>
                        </div>
                    <?php endif; ?>
                </a>
            </div>

            <?php endif; ?>
        <?php endforeach; ?>
        <?php foreach($slider as $image):?>

            <div class="ls-layer" style="slidedirection: right; transition2d: 110,111,112,113; ">
                <img src="<?=$this->storage->getBanerUrl($image['image'])?>" class="ls-bg" alt="Slide background">
                <a href = "<?= !empty($image['link']) ? $image['link'] : '#' ?>" class="ls-link"></a>
            </div>

        <?php endforeach ?>

    </div>
</div>

<a name="catalog"></a>

<div id="content_nav" class="clearfix">
    <div class="inner">
        <div class="content_nav_first_floor clearfix">
            <?php

            $data =
                '<div class="content_nav_logo float">'.
                '<a href="'.$this->seoUrl->setUrl($catalog_first['alias']).'" title="'.$catalog_first['title'].'"><img src="/images/types_logo/1.svg" alt="'.$catalog_first['title'].'" width="99" height="99" /></a>'.
                '<a href="'.$this->seoUrl->setUrl($catalog_first['alias']).'" title="'.$catalog_first['title'].'"><h2 class="types_logo_1">'.$t->_("vegetable_seeds").'</h2></a>'.
                '</div>'.
                '<div class="content_nav_items float">';

            foreach( $catalog_first['sub'] as $c )
            {
                $data .= '<a href="'.$this->seoUrl->setUrl($c['alias']).'" title="'.$c['title'].'">'.$c['title'].'</a>';
            }

            $data.= '</div>';

            echo( $data );

            ?>

        </div>
        <div class="content_nav_second_floor clearfix">

            <?php

            $data_catalog = '';

            foreach( $catalog as $k => $c )
            {
                /*
                 * Не выводить оборудование мб изменить потом
                 */
                if(in_array($k, config::get( 'equipment' ))) continue;

                $data_catalog .=
                '<div class="float">'.
                '<div class="content_nav_logo">'.
                '<a href="'.$this->seoUrl->setUrl($c['alias']).'" title="'.$c['title'].'"><img src="/images/types_logo/'.$k.'.svg" alt="'.$c['title'].'" width="99" height="99"></a>'.
                '<a href="'.$this->seoUrl->setUrl($c['alias']).'" title="'.$c['title'].'"><h2 class="types_logo_'.$k.'">'.$c['title'].'</h2></a>'.
                '</div>'.
                '<div class="content_nav_items">';

                if( !empty( $c['sub'] ) )
                {
                    foreach( $c['sub'] as $v )
                    {
                        $data_catalog .= '<a href="'.$this->seoUrl->setUrl($v['alias']).'" title="'.$v['title'].'">'.$v['title'].'</a>';
                    }
                }

                $data_catalog .=
                    '</div>'.
                    '</div>';
            }
            echo( $data_catalog );

            ?>


            <?php
            if($lang_id==1):
                $c['title'] = "Цибулинні";
                $data =
                    '<div class="float">'.
                    '<div class="content_nav_logo">'.
                    '<a href="'.$this->seoUrl->setUrl("nasinnja_kvitiv_1c0--tsibulinni_1c1").'" title="'.$c['title'].'"><img src="/images/types_logo/471.svg" alt="'.$c['title'].'" width="99" height="99"></a>'.
                    '<a href="'.$this->seoUrl->setUrl("nasinnja_kvitiv_1c0--tsibulinni_1c1").'" title="'.$c['title'].'"><h2 class="types_logo_471">'.$c['title'].'</h2></a>'.
                    '</div>'.
                    '<div class="content_nav_items">'.
                    '</div>'.
                    '</div>';
            else:
                $c['title'] = "Луковичные";
                $data =
                    '<div class="float">'.
                    '<div class="content_nav_logo">'.
                    '<a href="'.$this->seoUrl->setUrl("semena_tsvetov_1c_20--lukovichnye_1c_21").'" title="'.$c['title'].'"><img src="/images/types_logo/471.svg" alt="'.$c['title'].'" width="99" height="99"></a>'.
                    '<a href="'.$this->seoUrl->setUrl("semena_tsvetov_1c_20--lukovichnye_1c_21").'" title="'.$c['title'].'"><h2 class="types_logo_471">'.$c['title'].'</h2></a>'.
                    '</div>'.
                    '<div class="content_nav_items">'.
                    '</div>'.
                    '</div>';
            endif;
            echo $data;
            ?>


        </div>

    </div>
    <div class="shadow_to_top"></div>
</div><!-- content_nav -->

<div class="content_items clearfix">
<div class="inner">

<?php if( !empty( $stock_items ) ): ?>
        <div class="stock_items clearfix" data-class="stock_items">
            <div class="title clearfix">
                <div class="float"><span class="items_title"><?= $t->_("akcii") ?></span></div>
                <div class="float">
                    <a class="float content_arrow_left" href="#" title=""></a>
                    <span class="float content_items_page page_number">1</span>
                    <span class="float content_items_page">/</span>
                    <span class="float content_items_page max_page"><?= $pages_stock_items ?></span>
                    <a class="float content_arrow_right" href="#" title=""></a>
                </div>
            </div>
            <div class="items clearfix">
                <?php foreach( $stock_items as $k => $i ): ?>
                    <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 5]) ?>
                <?php endforeach; ?>
            </div>
        </div>
<?php endif; ?>

<?php if( !empty( $prof_stock_items ) ): ?>
        <div class="prof_stock_items clearfix" data-class="prof_stock_items">
            <div class="title clearfix">
                <div class="float"><span class="items_title"><?= $t->_("prof_stock") ?></span></div>
                <div class="float">
                    <a class="float content_arrow_left" href="#" title=""></a>
                    <span class="float content_items_page page_number">1</span>
                    <span class="float content_items_page">/</span>
                    <span class="float content_items_page max_page"><?= $pages_prof_stock_items ?></span>
                    <a class="float content_arrow_right" href="#" title=""></a>
                </div>
            </div>
            <div class="items clearfix">
                <?php foreach( $prof_stock_items as $k => $i ): ?>
                    <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 5]) ?>
                <?php endforeach; ?>
            </div>
        </div>
<?php endif; ?>

<?php if( !empty( $top_items ) ): ?>
        <div class="top_items clearfix" data-class="top_items">
            <div class="title clearfix">
                <div class="float"><span class="items_title"><?= $t->_("top_sales") ?></span></div>
                <div class="float">
                    <a class="float content_arrow_left" href="#" title=""></a>
                    <span class="float content_items_page page_number">1</span>
                    <span class="float content_items_page">/</span>
                    <span class="float content_items_page max_page"><?= $pages_top_items ?></span>
                    <a class="float content_arrow_right" href="#" title=""></a>
                </div>
            </div>
            <div class="items clearfix">

    <?php foreach( $top_items as $k => $i ): ?>
            <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 5]) ?>
    <?php endforeach; ?>
            </div>
        </div>
<?php endif; ?>

<?php if( !empty( $recommended_items ) ): ?>
        <div class="recomended_items clearfix" data-class="recomended_items">
            <div class="title clearfix">
                <div class="float"><span class="items_title"><?= $t->_("recommended") ?></span></div>
                <div class="float">
                    <a class="float content_arrow_left" href="#" title=""></a>
                    <span class="float content_items_page page_number">1</span>
                    <span class="float content_items_page">/</span>
                    <span class="float content_items_page max_page"><?= $pages_recommended_items ?></span>
                    <a class="float content_arrow_right" href="#" title=""></a>
                </div>
            </div>
            <div class="items clearfix">

            <?php foreach( $recommended_items as $k => $i ): ?>
                <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 5]) ?>
            <?php endforeach; ?>
            </div>
        </div>
<?php endif; ?>

<?php if( !empty( $new_items ) ): ?>
        <div class="new_items clearfix" data-class="new_items">
            <div class="title clearfix">
                <div class="float"><span class="items_title"><?= $t->_("new_items") ?></span></div>
                <div class="float">
                    <a class="float content_arrow_left" href="#" title=""></a>
                    <span class="float content_items_page page_number">1</span>
                    <span class="float content_items_page">/</span>
                    <span class="float content_items_page max_page"><?= $pages_new_items ?></span>
                    <a class="float content_arrow_right" href="#" title=""></a>
                </div>
            </div>
            <div class="items clearfix">
            <?php foreach( $new_items as $k => $i ): ?>
                <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 5]) ?>
            <?php endforeach; ?>
            </div>
        </div>
<?php endif; ?>

</div>
</div><!-- content_items -->

<div class="content_blog">
    <div class="inner">
        <div class="posts clearfix" style="margin-bottom:20px;padding-bottom:0px;">
            <?php

            if( !empty( $news ) )
            {
                $data_news =
                    '<div class="text_posts float">
                    <div class="text_posts_title">
                        <a href="'.$this->seoUrl->setUrl($this->url->get([ 'for' => 'prof_tips' ])).'" title="'.$t->_("prof_tips").'">'.$t->_("prof_tips").'</a>
                    </div>';

                foreach( $news as $k => $n )
                {

                    $data_news .=
                        '<div class="one_post'.( $k == 0 ? ' first clearfix' : ( $k == 3 ? ' last float' : ' float' ) ).'">'.
                        '<div class="one_post_image float">'.
                        '<a href="'.$this->seoUrl->setUrl($n['link']).'" title=""><img src="'.( $k == 0 ? $n['image_big'] : $n['image_small'] ).'" alt=""  />'.
                        (!empty( $n['video']) ? '<img class="video_play" src="/images/video_play.png" />' : '').'</a>'.
                        '</div>'.
                        '<div class="one_post_content float">'.
                        '<p class="one_post_title">'.
                        '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="">'.$n['title'].'</a>'.
                        '</p>'.
                        ( $k == 0
                            ?
                            '<p>'.
                            $n['abstract_info'].
                            '</p>'
                            :
                            '').
                        '</div>'.
                        '</div>';
                }

                $data_news .= '</div>';

                echo( $data_news );
            }

            if( !empty( $videos ) )
            {
                $data_video =
                    '<div class="video_posts float last small">'.
                    '<div class="white_list"></div>'.
                    '<a class="open_list_btn">'.$t->_("open_video_list").'</a>'.
                    '<a class="close_list_btn">'.$t->_("close_video_list").'</a>'.
                    '<div class="one_video">
                    <iframe class="video_iframe" width="460" height="300" src="'.$videos['0']['video'].'" frameborder="0" allowfullscreen></iframe>
                </div>';

                foreach( $videos as $k => $v )
                {   if(!empty($v['video'])){
                    $data_video .=
                        '<div class="one_video_title float" data-video_srs="'.$v['video'].'">'.
                        '<a href="'.$this->seoUrl->setUrl($v['link']).'" title="'.$v['title'].'">'.
                        '<img src="/images/play.png" alt="'.$v['title'].'" width="15" height="13" />'.
                        $v['title'].
                        '</a>'.
                        '</div>';
                }

                }

                $data_video .= '</div>';

                echo( $data_video );
            }

            ?>
        </div>
    </div>
</div>
<!--
<div class="inner">
<div class="text_posts_title" style="font-weight:bold;font-size:16px;margin-bottom:20px;">
<?=$t->_("vidguk");?>
</div>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(
js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-comments" data-href="http://semena.in.ua/" data-width="960" data-numposts="5" data-colorscheme="light"></div>
</div>
-->

<div class="content_accost">
    <div class="shadow_to_down"></div>
    <div class="inner">
        <div class="content_accost_title"><h1><?= $t->_("internet_store") ?></h1></div>
        <div class="content_accost_content">
            <?= $t->_("main_page_text_2")?>
        </div>
    </div>
</div><!-- content_accost -->

<?= $this->partial('partial/share'); ?>

<div class="map clearfix">
    <div id="google-map" style="width: 100%; height: 380px;"></div>
</div>

</div>

<!-- popup button -->
<!--<div class="open-delivery-modal hidden_modal">
    <div><img src="/images/popup_full.png" class="popup_full"><img src="/images/popup_open.png" class="popup_mobile"><span class="modal_close"></span></div>
</div>-->
<!-- popup button -->

<!-- popup js -->
<script>
    $(document).ready(function(){
        function getCookie(a) {
            var b = new RegExp(a+'=([^;]){1,}');
            var c = b.exec(document.cookie);
            if(c) c = c[0].split('=');
            else return false;
            return c[1] ? c[1] : false;
        }

        var cookie          = getCookie('popup');
        var $button         = $(".open-delivery-modal");
        var $popup          = $(".delivery-form-par");
        var $popup_inner    = $popup.find(".popup-main-delivery");

        if (cookie !== '1') {
            setTimeout(function(){$button.show();},1000);
        }
        else {
            $button.hide();
        }

        $button.find("div img").click(function(){
            $(this).parent().parent().hide();
            $popup.show();
            $popup.animate({opacity: "1"}, 500, function() {});
            $popup_inner.animate({opacity: "1",top: "15%"}, 300, function() {});
        });
        $popup.find(".close-white").click(function(){
            $popup_inner.animate({opacity: "0",top: "-50%"}, 300, function() {});
            $popup.animate({opacity: "0"}, 500, function() {});
            setTimeout(function(){$popup.hide();}, 600);
        });
        $popup.find(".close-popup").click(function(){
            $popup_inner.animate({opacity: "0",top: "-50%"}, 300, function() {});
            $popup.animate({opacity: "0"}, 500, function() {});
            setTimeout(function(){$popup.hide();}, 600);
        });
        $(".modal_close").click(function(){
            $button.hide();
        });
    });

</script>
<!-- popup button -->

<script>
    $(document).ready(function() {
        <?php foreach($active_sales as $k => $sale): ?>
        <?php if($sale['show_counter']): ?>
        var counter<?= $k ?> = new Counter(<?= $sale['seconds_left'] ?>,'#<?= $k ?>-clock' );
        <?php endif; ?>
        <?php endforeach; ?>
    });
</script>