indexSuccess.php 9.52 KB
Newer Older
Яков's avatar
first  
Яков committed
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
<table class="lending" style="width: 100%" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div class="fly_stones">
                <span class="fly_stones__text">
                    <?php
                    echo ($sf_user->getCulture() == 'ru' ? 'Банный камень<i class="br5"></i>и товары для бани' : 'Bath stone<i class="br5"></i>and products for bath');
                    ?>
                </span>
            </div>
            <div class="stone_layout"></div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="lending_area_1 background_grey">
                <?php
                if (csSettings::get('main_description_' . $sf_user->getCulture()) != '') {
                    echo '<div class="max_width">';
                    echo '<div class="main_description">' . nl2br(csSettings::get('main_description_' . $sf_user->getCulture())) . '</div>';
                    echo '</div>';
                }
                ?>
            </div>
        </td>
    </tr>
     <tr>
        <td>
            <div class="lending_area_3">
                <i class="br20"></i>
                <div style="text-align: center" class="caption">
                    <a href="<?php echo url_for('@catalog') ?>" class="green_link">
                    Наши товары
                    </a>
                </div>
                <i class="br20"></i>
                <div class="lending_product_area product_card_wrap max_width">
                    <div class="catalog_category_childs_wrap">
                    <?php
                    if(isset($products) && count($products) > 0){
                        foreach ($products as $product){
                            include_partial('product/product', array('product' => $product));
                        }
                    }
                    ?>
                    </div>
                </div>
                <i class="br20"></i>
                <?php
                if(isset($group_offers) && count($group_offers) == 2 && $group_cat){
                    $culture = $sf_user->getCulture();
                    ?>
                    <div class="max_width" style="margin: 0 auto">
                        <table class="group_product" width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="group_product_left">
                                    <?php
                                    $image1 = $group_offers[0]['product_img'];
                                    if($image1) {
                                        $exp = explode(';', $image1);
                                        $image1 = $exp[0];
                                    }
                                    ?>
                                    <div class="big_product_card">
                                        <a href="<?php echo url_for('@product_show?alias=' . $group_offers[0]['alias']);?>">
                                            <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><?php echo $group_offers[0]['Offer'][0]['Translation'][$culture]['title'];?></span>
                                                                        <i class="br10"></i>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="offer">
                                                                        <span>(<?php echo $group_offers[0]['Offer'][0]['Translation'][$culture]['quantity_type'];?>)</span>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td class="big_product_card_info__right" valign="top"><nobr><?php echo number_format($group_offers[0]['Offer'][0]['price'], 0, ',', ' ');?></nobr><span class="rub">i</span></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="big_product_card__image" <?php echo ($image1 ? 'style="background-image:url(/u/i/' . Page::replaceImageSize($image1, 'L2') . ');"' : '');?>></div>
                                        </a>
                                    </div>
                                </td>
                                <td class="group_product_right">
                                    <table width="100%" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td>
                                                <?php
                                                $image2 = $group_offers[1]['product_img'];
                                                if($image2) {
                                                    $exp = explode(';', $image2);
                                                    $image2 = $exp[0];
                                                }
                                                ?>
                                                <a href="<?php echo url_for('@product_show?alias=' . $group_offers[1]['alias']);?>" style="display: block;">
                                                    <div class="rect_product_card rect_product_card__first" <?php echo ($image1 ? 'style="background-image:url(/u/i/' . Page::replaceImageSize($image2, 'L') . ');"' : '');?>>
                                                        <div class="rect_product_card_info">
                                                            <span><?php echo $group_offers[1]['Offer'][0]['Translation'][$culture]['title'];?></span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="<?php echo url_for('@catalog_show?alias=' . $group_cat->getAlias());?>" style="display: block;">
                                                    <div class="rect_product_card" <?php echo ($group_cat->getPhoto() ? 'style="background-image:url(/u/i/' . Page::replaceImageSize($group_cat->getPhoto(), 'L') . ');"' : '');?>>
                                                        <div class="rect_product_card_info special_text">
                                                            <span><?php echo $group_cat['Translation'][$culture]['title'];?></span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <?php
                }
                ?>
            </div>
        </td>
    </tr>
    <?php
    include_component("review", "review"); ?>

    <tr>
        <td>
            <?php include_partial("pages/landingArea2"); ?>
        </td>
    </tr>
    
    <?php 
    if ($video) {

        $culture = $sf_user->getCulture();
        ?>
        <tr>
            <td>
                <div class="lending_area_video_and_article max_width">
                    <table class="to_div" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <?php
                            echo '<td width="50%" valign="top">';
                            echo '<div class="caption"><a class="green_link" href="/' . $culture . '/video/">' . __('Видео') . '</a></div>';
                            include_partial('video/video', array('videos' => array($video)));
                            echo '</td>';
                            echo '<td width="50%" valign="top">';
                            echo '<div class="caption"><a class="green_link" href="/' . $culture . '/article/">' . __('Статьи') . '</a></div>';
                            include_component('article', 'article', array('limit' => 3));
                            echo '</td>';
                            echo '<td>';
                            echo '<i class="br30"></i>';
                            echo '</td>';
                            ?>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <?php
    }
    include_component("partner", "partner");
    ?>
</table>