Commit 2f257af3262ebf1fd4a34fdd3ecfe324e4cad6c1

Authored by Alex Savenko
2 parents 67739d7c 9c155103

Merge branch 'discount' of gitlab.artweb.com.ua:Alex/semena

Showing 1 changed file with 352 additions and 350 deletions   Show diff stats
src/app/frontend/views/page/item.php
1 1 <div id="content" class="clearfix">
2   -<div class="item">
3   -<div class="breadcrumbs">
4   - <div class="inner">
5   - <div class="item_menu_shadow"></div>
6   - <?= $breadcrumbs ?>
7   - </div>
8   -</div>
9   - <?php $url = $this->router->getRewriteUri(); ?>
  2 + <div class="item">
  3 + <div class="breadcrumbs">
  4 + <div class="inner">
  5 + <div class="item_menu_shadow"></div>
  6 + <?= $breadcrumbs ?>
  7 + </div>
  8 + </div>
  9 + <?php $url = $this->router->getRewriteUri(); ?>
10 10  
11   - <div class="<?= strstr($url, '/dobriva_ta_zasobi_zakhistu_1c0/zasobi_zakhistu_1c1') || strstr($url, '/udobrenija_i_sredstva_zashchity_1c_20/sredstva_zashchity_1c_21') ? 'zasobi_zakhistu_logo' : null ?> item_wrapper" itemscope itemtype="http://schema.org/Product">
12   - <div class="inner clearfix">
13   - <div class="float item_images">
14   - <ul class="thumbnails">
15   - <?php
  11 + <div class="<?= strstr($url, '/dobriva_ta_zasobi_zakhistu_1c0/zasobi_zakhistu_1c1') || strstr($url, '/udobrenija_i_sredstva_zashchity_1c_20/sredstva_zashchity_1c_21') ? 'zasobi_zakhistu_logo' : null ?> item_wrapper" itemscope itemtype="http://schema.org/Product">
  12 + <div class="inner clearfix">
  13 + <div class="float item_images">
  14 + <ul class="thumbnails">
  15 + <?php
16 16  
17   - $data_images = '';
  17 + $data_images = '';
18 18  
19   - if( !empty( $item['images'] ) )
20   - {
21   - $data_images .=
22   - '<li class="float width_400 '.(count($item['images'])%3==0 ? 'last' : '').'">'.
23   - '<a href="'.$this->storage->getPhotoUrl( $item['images'][0], 'group', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '128x' ).'\'" class="thumbnail">'.
24   - '<img src="'.$this->storage->getPhotoUrl( $item['images'][0], 'group', '400x400' ).'" alt="'.$item['title'].'" class="image_400">'.
25   - '</a>'.
26   - '</li>';
27   -
28   - foreach( $item['images'] as $k => $i )
  19 + if( !empty( $item['images'] ) )
29 20 {
30 21 $data_images .=
31   - '<li class="float width_128 '.(($k+1)%3==0 ? 'last' : '').'">'.
32   - '<a href="'.$this->storage->getPhotoUrl( $i, 'group', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'\'" class="thumbnail">'.
33   - '<img itemprop="image" title="'.$item['title'].'" src="'.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'" alt="Купити '.$item['title'].' в Києві та Львові" class="image_128">'.
  22 + '<li class="float width_400 '.(count($item['images'])%3==0 ? 'last' : '').'">'.
  23 + '<a href="'.$this->storage->getPhotoUrl( $item['images'][0], 'group', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '128x' ).'\'" class="thumbnail">'.
  24 + '<img src="'.$this->storage->getPhotoUrl( $item['images'][0], 'group', '400x400' ).'" alt="'.$item['title'].'" class="image_400">'.
34 25 '</a>'.
35 26 '</li>';
36   - }
37 27  
  28 + foreach( $item['images'] as $k => $i )
  29 + {
  30 + $data_images .=
  31 + '<li class="float width_128 '.(($k+1)%3==0 ? 'last' : '').'">'.
  32 + '<a href="'.$this->storage->getPhotoUrl( $i, 'group', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'\'" class="thumbnail">'.
  33 + '<img itemprop="image" title="'.$item['title'].'" src="'.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'" alt="Купити '.$item['title'].' в Києві та Львові" class="image_128">'.
  34 + '</a>'.
  35 + '</li>';
  36 + }
38 37  
39   - }
40   - elseif( !empty( $item['cover'] ) && empty( $item['images'] ) )
41   - {
42   - $data_images .=
43   - '<li class="float width_400">'.
44   - '<a href="'.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '128x' ).'\'" class="thumbnail">'.
45   - '<img src="'.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '400x' ).'" alt="'.$item['title'].'" class="image_400">'.
46   - '</a>'.
47   - '</li>';
48   - }
49   - else
50   - {
51   - $data_images .=
52   - '<li class="float width_400">
53   - <img src="/images/item_main_photo.jpg" alt="" width="400" height="400">
54   - </li>
55   -
56   - <li class="float width_128"><img src="/images/item_photo.jpg" alt="" width="128" height="128"></li>
57   - <li class="float width_128 last"><img src="/images/item_photo.jpg" alt="" width="128" height="128"></li>';
58   - }
59   - echo( $data_images );
60 38  
61   - ?>
  39 + }
  40 + elseif( !empty( $item['cover'] ) && empty( $item['images'] ) )
  41 + {
  42 + $data_images .=
  43 + '<li class="float width_400">'.
  44 + '<a href="'.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '800x' ).'" title="'.$item['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '128x' ).'\'" class="thumbnail">'.
  45 + '<img src="'.$this->storage->getPhotoUrl( $item['cover'], 'avatar', '400x' ).'" alt="'.$item['title'].'" class="image_400">'.
  46 + '</a>'.
  47 + '</li>';
  48 + }
  49 + else
  50 + {
  51 + $data_images .=
  52 + '<li class="float width_400">
  53 + <img src="/images/item_main_photo.jpg" alt="" width="400" height="400">
  54 + </li>
  55 +
  56 + <li class="float width_128"><img src="/images/item_photo.jpg" alt="" width="128" height="128"></li>
  57 + <li class="float width_128 last"><img src="/images/item_photo.jpg" alt="" width="128" height="128"></li>';
  58 + }
  59 + echo( $data_images );
62 60  
63   - </ul>
64   - <?php if(!empty($item['front_video'])):?>
65   - <br>
66   - <div class="front_video_block">
67   - <?php if(!empty($item['front_video'])){
68   - $video = explode(',',$item['front_video']);
69   - foreach($video as $v): ?>
70   - <iframe class="video_iframe" width="400" height="220" src="<?= $v ?>" frameborder="0" allowfullscreen></iframe>
71   - <?php endforeach;
72   - }?>
73   - </div>
74   - <?php endif;?>
75   - </div>
  61 + ?>
76 62  
77   - <div class="float item_content">
78   - <div class="item_title"><h1 class="item_name_h1" itemprop="name"><?= $item['title'] ?></h1></div>
79   - <div class="item_decription"><?= $item['description'] ?></div>
80   - <div style="float:right;width:270px;font-weight:bold;line-height:20px;">
81   - <img src="/images/truck.jpg" width="64" height="64" border="0" align="left" style="margin-right:10px;" />
82   - <?= $t->_("truck")?>
83   - </div>
84   - <div style="float:left">
85   - <div class="clearfix">
86   - <div class="float properties">Код:</div>
87   - <div class="float properties properties_article"><?= $item['product_id'] ?></div>
88   - </div>
89   - <div class="clearfix">
90   - <div class="float properties"><?= $t->_("availability")?>:</div>
91   - <div class="float presence_status">
92   - <?= $item['status'] == 1 ? '<div data-stock="1" id="stock" class="properties properties_presence ">'.$t->_("in_stock").'</div>' : ($item['status'] == 2 ? '<div data-stock="0" id="stock" class="properties properties_absent">'.$t->_("znyt").'</div>' : '<div data-stock="0" id="stock" class="properties properties_absent">'.$t->_("missing").'</div>'); ?>
93   - </div>
  63 + </ul>
  64 + <?php if(!empty($item['front_video'])):?>
  65 + <br>
  66 + <div class="front_video_block">
  67 + <?php if(!empty($item['front_video'])){
  68 + $video = explode(',',$item['front_video']);
  69 + foreach($video as $v): ?>
  70 + <iframe class="video_iframe" width="400" height="220" src="<?= $v ?>" frameborder="0" allowfullscreen></iframe>
  71 + <?php endforeach;
  72 + }?>
  73 + </div>
  74 + <?php endif;?>
94 75 </div>
95 76  
96   - <div class="clearfix">
97   - <div class="float properties"><?= $t->_("number_of") ?>:</div>
98   - <div class="float count minus">
  77 + <div class="float item_content">
  78 + <div class="item_title">123<h1 class="item_name_h1" itemprop="name"><?= $item['title'] ?></h1></div>
  79 + <div class="item_decription"><?= $item['description'] ?></div>
  80 + <div style="float:right;width:270px;font-weight:bold;line-height:20px;">
  81 + <img src="/images/truck.jpg" width="64" height="64" border="0" align="left" style="margin-right:10px;" />
  82 + <?= $t->_("truck")?>
99 83 </div>
100   - <div class="float count count_input">
101   - <input name="count_items" class="count_items" type="text" value="1" />
  84 + <div style="float:left">
  85 + <div class="clearfix">
  86 + <div class="float properties">Код:</div>
  87 + <div class="float properties properties_article"><?= $item['product_id'] ?></div>
102 88 </div>
103   - <div class="float count plus">
  89 + <div class="clearfix">
  90 + <div class="float properties"><?= $t->_("availability")?>:</div>
  91 + <div class="float presence_status">
  92 + <?= $item['status'] == 1 ? '<div data-stock="1" id="stock" class="properties properties_presence ">'.$t->_("in_stock").'</div>' : ($item['status'] == 2 ? '<div data-stock="0" id="stock" class="properties properties_absent">'.$t->_("znyt").'</div>' : '<div data-stock="0" id="stock" class="properties properties_absent">'.$t->_("missing").'</div>'); ?>
  93 + </div>
104 94 </div>
105   - </div>
106   - </div><div style="clear:both;"></div>
107   - <div class="clearfix packing">
108   - <div class="float properties"><?= $t->_("packing")?>:</div>
109   - <div class="float packing_images clearfix">
110   - <?php
111 95  
112   - $data_sizes = '';
  96 + <div class="clearfix">
  97 + <div class="float properties"><?= $t->_("number_of") ?>:</div>
  98 + <div class="float count minus">
  99 + </div>
  100 + <div class="float count count_input">
  101 + <input name="count_items" class="count_items" type="text" value="1" />
  102 + </div>
  103 + <div class="float count plus">
  104 + </div>
  105 + </div>
  106 + </div><div style="clear:both;"></div>
  107 + <div class="clearfix packing">
  108 + <div class="float properties"><?= $t->_("packing")?>:</div>
  109 + <div class="float packing_images clearfix">
  110 + <?php
  111 +
  112 + $data_sizes = '';
113 113  
114   - if( !empty( $sizes_colors__ ) )
115   - {
116   - $i = 0;
117   - foreach( $sizes_colors['sizes'] as $k => $s )
  114 + if( !empty( $sizes_colors__ ) )
118 115 {
119   - if( isset( $sizes_colors__[$item['color_id']][$s] ) )
  116 + $i = 0;
  117 + foreach( $sizes_colors['sizes'] as $k => $s )
120 118 {
121   - $data_sizes .=
122   - '<a href="'.$sizes_colors__[$item['color_id']][$s]['link'].'" class="group_sizes'.($s == $item['size'] ? ' active' : '').' exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="'.$sizes_colors__[$item['color_id']][$s]['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
123   - '<span class="group_sizes_header"></span>'.
124   - '<span class="group_sizes_content">'.$s.'</span>'.
125   - '</a>';
  119 + if( isset( $sizes_colors__[$item['color_id']][$s] ) )
  120 + {
  121 + $data_sizes .=
  122 + '<a href="'.$sizes_colors__[$item['color_id']][$s]['link'].'" class="group_sizes'.($s == $item['size'] ? ' active' : '').' exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="'.$sizes_colors__[$item['color_id']][$s]['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
  123 + '<span class="group_sizes_header"></span>'.
  124 + '<span class="group_sizes_content">'.$s.'</span>'.
  125 + '</a>';
  126 + }
  127 + else
  128 + {
  129 + $data_sizes .=
  130 + '<a href="#" onClick="return false;" class="group_sizes'.($s == $item['size'] ? ' active' : '').' not_exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
  131 + '<span class="group_sizes_header"></span>'.
  132 + '<span class="group_sizes_content">'.$s.'</span>'.
  133 + '</a>';
  134 + }
  135 +
  136 + $i++;
126 137 }
127   - else
  138 + }
  139 + else
  140 + {
  141 + foreach( $sizes as $k => $s )
128 142 {
129 143 $data_sizes .=
130   - '<a href="#" onClick="return false;" class="group_sizes'.($s == $item['size'] ? ' active' : '').' not_exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
  144 + '<a href="'.$this->seoUrl->setUrl($s['link']).'" class="group_sizes'.($k == $active_size ? ' active' : '').'" style="padding-top:'.($k*3).'px; width:'.(31+($k*3)).'px" data-item_id="'.$s['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
131 145 '<span class="group_sizes_header"></span>'.
132   - '<span class="group_sizes_content">'.$s.'</span>'.
  146 + '<span class="group_sizes_content">'.$s['size'].'</span>'.
133 147 '</a>';
134 148 }
135   -
136   - $i++;
137 149 }
138   - }
139   - else
140   - {
141   - foreach( $sizes as $k => $s )
142   - {
143   - $data_sizes .=
144   - '<a href="'.$this->seoUrl->setUrl($s['link']).'" class="group_sizes'.($k == $active_size ? ' active' : '').'" style="padding-top:'.($k*3).'px; width:'.(31+($k*3)).'px" data-item_id="'.$s['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'.
145   - '<span class="group_sizes_header"></span>'.
146   - '<span class="group_sizes_content">'.$s['size'].'</span>'.
147   - '</a>';
148   - }
149   - }
150 150  
151   - echo( $data_sizes );
  151 + echo( $data_sizes );
152 152  
153   - ?>
  153 + ?>
154 154  
  155 + </div>
155 156 </div>
156   - </div>
157 157  
158   - <?php
  158 + <?php
159 159  
160   - if( !empty( $sizes_colors__ ) )
161   - {
162   - $data_colors =
163   - '<div class="clearfix colors">'.
164   - '<div class="float properties">'.$t->_("choose_color").': </div>'.
165   - '<div class="float properties" style="color:'.$item['absolute_color'].'">'.$item['color_title'].'</div>'.
166   - '</div>'.
  160 + if( !empty( $sizes_colors__ ) )
  161 + {
  162 + $data_colors =
  163 + '<div class="clearfix colors">'.
  164 + '<div class="float properties">'.$t->_("choose_color").': </div>'.
  165 + '<div class="float properties" style="color:'.$item['absolute_color'].'">'.$item['color_title'].'</div>'.
  166 + '</div>'.
167 167  
168   - '<div class="sliderkit carousel-demo1 colors_images clearfix">'.
169   - '<div class="sliderkit-nav">';
  168 + '<div class="sliderkit carousel-demo1 colors_images clearfix">'.
  169 + '<div class="sliderkit-nav">';
170 170  
171   - $data_colors .= '<div class="sliderkit-nav-clip" '.( count( $sizes_colors__ ) > 6 ? 'style="margin: 0 30px"' : '' ).'><ul>';
  171 + $data_colors .= '<div class="sliderkit-nav-clip" '.( count( $sizes_colors__ ) > 6 ? 'style="margin: 0 30px"' : '' ).'><ul>';
172 172  
173   - foreach( $sizes_colors__ as $k => $s )
174   - {
175   - sort($s);
176   - $data_colors .=
177   - '<li class="change_with_color" data-item_id="'.$s['0']['id'].'" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'" data-group_alias="'.$group_alias.'" data-color_id="'.$s['0']['color_id'].'">'.
178   - '<a href="'.$this->seoUrl->setUrl($s['0']['link']).'" title="'.$s['0']['color_title'].'" '.( $s['0']['color_id'] == $item['color_id'] ? 'class="active" style="border-color:'.$item['absolute_color'].'"' : '' ).' ><img src="'.$s['0']['image'].'" alt="'.$s['0']['color_title'].'" width="60" height="60" /></a>'.
179   - '</li>';
180   - }
  173 + foreach( $sizes_colors__ as $k => $s )
  174 + {
  175 + sort($s);
  176 + $data_colors .=
  177 + '<li class="change_with_color" data-item_id="'.$s['0']['id'].'" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'" data-group_alias="'.$group_alias.'" data-color_id="'.$s['0']['color_id'].'">'.
  178 + '<a href="'.$this->seoUrl->setUrl($s['0']['link']).'" title="'.$s['0']['color_title'].'" '.( $s['0']['color_id'] == $item['color_id'] ? 'class="active" style="border-color:'.$item['absolute_color'].'"' : '' ).' ><img src="'.$s['0']['image'].'" alt="'.$s['0']['color_title'].'" width="60" height="60" /></a>'.
  179 + '</li>';
  180 + }
181 181  
182   - $data_colors .= '</ul></div>';
  182 + $data_colors .= '</ul></div>';
183 183  
184   - if( count( $sizes_colors__ ) > 6 )
185   - {
186   - $data_colors .=
187   - '<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-prev"><a href="#" title="Previous line"><span>Previous</span></a></div>'.
188   - '<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-next"><a href="#" title="Next line"><span>Next</span></a></div>';
189   - }
  184 + if( count( $sizes_colors__ ) > 6 )
  185 + {
  186 + $data_colors .=
  187 + '<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-prev"><a href="#" title="Previous line"><span>Previous</span></a></div>'.
  188 + '<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-next"><a href="#" title="Next line"><span>Next</span></a></div>';
  189 + }
190 190  
191   - $data_colors .=
192   - '</div>'.
193   - '</div>';
  191 + $data_colors .=
  192 + '</div>'.
  193 + '</div>';
194 194  
195   - echo $data_colors;
196   - }
  195 + echo $data_colors;
  196 + }
197 197  
198   - ?>
  198 + ?>
199 199  
200   - <div class="change_with_size">
201   - <div class="clearfix buy_compare">
202   - <div class="one_item_price float" itemprop="offers" itemscope itemtype="http://schema.org/Offer" ><?= $t->_("price")?>
203   - <ul>
204   - <li>
205   - <span itemprop="price"><?= number_format($item['price2'], 2, '.', ' '); ?></span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>
206   - <div style="display: none" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
207   - <span itemprop="ratingValue">5</span>
208   - <span itemprop="reviewCount">31</span>
209   - </div>
210   - </li>
211   - </ul>
212   - </div>
213   - <div class="one_item_buttons float">
214   - <a href="<?= $this->seoUrl->setUrl($this->url->get([ 'for' => 'item', 'type' => $type_alias, 'subtype' => $subtype_alias, 'group_alias' => $group_alias, 'item_id' => $item_id ])); ?>" title="Додати <?= $item['title'] ?> у корзину" class="<?= $item['status'] == 1 ? 'btn green buy' : 'not_available grey'?>"><?= $t->_("buy")?></a>
215   - </div>
216   - <div class="one_item_compare float">
217   - <?= '<input type="checkbox" id="compare_item_'.$item['id'].'" class="compare_item" value="'.$item['type'].'-'.$catalog_id.'-'.$item['id'].'" '.(!empty($item['checked']) ? 'checked="checked"' : '').' />' ?>
218   - <label for="compare_item_<?= $item['id'] ?>"><span></span><?= $t->_("compared_to")?></label>
219   - <input type="hidden" class="item_id_for_basket" value="<?= $item['id'] ?>">
220   - <input type="hidden" class="current_item_size" value="<?= $item['size'] ?>">
  200 + <div class="change_with_size">
  201 + <div class="clearfix buy_compare">
  202 + <div class="one_item_price float" itemprop="offers" itemscope itemtype="http://schema.org/Offer" ><?= $t->_("price")?>
  203 + <ul>
  204 + <li>
  205 + <span itemprop="price"><?= number_format($item['price2'], 2, '.', ' '); ?></span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>
  206 + <div style="display: none" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
  207 + <span itemprop="ratingValue">5</span>
  208 + <span itemprop="reviewCount">31</span>
  209 + </div>
  210 + </li>
  211 + </ul>
  212 + </div>
  213 + <div class="one_item_buttons float">
  214 + <a href="<?= $this->seoUrl->setUrl($this->url->get([ 'for' => 'item', 'type' => $type_alias, 'subtype' => $subtype_alias, 'group_alias' => $group_alias, 'item_id' => $item_id ])); ?>" title="Додати <?= $item['title'] ?> у корзину" class="<?= $item['status'] == 1 ? 'btn green buy' : 'not_available grey'?>"><?= $t->_("buy")?></a>
  215 + </div>
  216 + <div class="one_item_compare float">
  217 + <?= '<input type="checkbox" id="compare_item_'.$item['id'].'" class="compare_item" value="'.$item['type'].'-'.$catalog_id.'-'.$item['id'].'" '.(!empty($item['checked']) ? 'checked="checked"' : '').' />' ?>
  218 + <label for="compare_item_<?= $item['id'] ?>"><span></span><?= $t->_("compared_to")?></label>
  219 + <input type="hidden" class="item_id_for_basket" value="<?= $item['id'] ?>">
  220 + <input type="hidden" class="current_item_size" value="<?= $item['size'] ?>">
  221 + </div>
221 222 </div>
222   - </div>
223   - <div class="clearfix features">
224   - <?php
  223 + <div class="clearfix features">
  224 + <?php
225 225  
226   - $data_features = '';
  226 + $data_features = '';
227 227  
228   - foreach( $filters as $f )
229   - {
230   - $data_features .= '<a href="#" class="float">'.$f['value_value'].'</a>';
231   - }
  228 + foreach( $filters as $f )
  229 + {
  230 + $data_features .= '<a href="#" class="float">'.$f['value_value'].'</a>';
  231 + }
232 232  
233   - echo( $data_features );
  233 + echo( $data_features );
234 234  
235   - ?>
236   - </div>
237   - </div>
238   - <div class="clearfix item_menu">
239   - <div class="item_menu_header_menu clearfix">
240   - <div class="tabs clearfix">
241   - <ul class="change_item_description">
242   - <li class="float active_tab first_tab" data-change_item_description="tabs_description"><a href="#" title=""><?= $t->_("description")?></a></li>
243   - <li class="float not_active" data-change_item_description="tabs_properties"><a href="#" title=""><?= $t->_("features")?></a></li>
244   - <?php if(!empty($item['content_video'])):?><li class="float not_active" data-change_item_description="tabs_video"><a href="#" title=""><?= $t->_("video")?></a></li><?php endif;?>
245   - <li class="float last_tab not_active" data-change_item_description="tabs_comments"><a href="#" title=""><?= $t->_("reviews")?></a></li>
246   - </ul>
  235 + ?>
247 236 </div>
248 237 </div>
249   - <div class="item_menu_content">
250   - <div class="tabs_description item_menu_content_wrapper" itemprop="description"><?= $item['content_description'] ?></div>
251   - <div class="display_none tabs_properties item_menu_content_wrapper">
252   - <?php
253   -
254   - $data_properties = '';
255   -
256   - if( isset( $item['brand'] ) && !empty( $item['brand'] ) )
257   - {
258   - $data_properties .=
259   - '<div class="clearfix properties_producer">'.
260   - '<p class="float key_value">'.$t->_("producer").':</p>'.
261   - '<a class="float" href="#" title="'.$item['brand'].'">'.$item['brand'].'</a>'.
262   - '</div>';
263   - }
  238 + <div class="clearfix item_menu">
  239 + <div class="item_menu_header_menu clearfix">
  240 + <div class="tabs clearfix">
  241 + <ul class="change_item_description">
  242 + <li class="float active_tab first_tab" data-change_item_description="tabs_description"><a href="#" title=""><?= $t->_("description")?></a></li>
  243 + <li class="float not_active" data-change_item_description="tabs_properties"><a href="#" title=""><?= $t->_("features")?></a></li>
  244 + <?php if(!empty($item['content_video'])):?><li class="float not_active" data-change_item_description="tabs_video"><a href="#" title=""><?= $t->_("video")?></a></li><?php endif;?>
  245 + <li class="float last_tab not_active" data-change_item_description="tabs_comments"><a href="#" title=""><?= $t->_("reviews")?></a></li>
  246 + </ul>
  247 + </div>
  248 + </div>
  249 + <div class="item_menu_content">
  250 + <div class="tabs_description item_menu_content_wrapper" itemprop="description"><?= $item['content_description'] ?></div>
  251 + <div class="display_none tabs_properties item_menu_content_wrapper">
  252 + <?php
264 253  
265   - if( isset( $properties ) && !empty( $properties ) )
266   - {
267   - $data_properties .= '<div class="item_properties">';
  254 + $data_properties = '';
268 255  
269   - foreach( $properties as $p )
  256 + if( isset( $item['brand'] ) && !empty( $item['brand'] ) )
270 257 {
271 258 $data_properties .=
272   - '<div class="clearfix">'.
273   - '<p class="float key_value">'.$p['key_value'].':</p>'.
274   - '<a class="float" href="#">'.$p['value_value'].'</a>'.
  259 + '<div class="clearfix properties_producer">'.
  260 + '<p class="float key_value">'.$t->_("producer").':</p>'.
  261 + '<a class="float" href="#" title="'.$item['brand'].'">'.$item['brand'].'</a>'.
275 262 '</div>';
276 263 }
277 264  
278   - $data_properties .= '</div>';
279   - }
280   -
281   - echo( $data_properties );
  265 + if( isset( $properties ) && !empty( $properties ) )
  266 + {
  267 + $data_properties .= '<div class="item_properties">';
  268 +
  269 + foreach( $properties as $p )
  270 + {
  271 + $data_properties .=
  272 + '<div class="clearfix">'.
  273 + '<p class="float key_value">'.$p['key_value'].':</p>'.
  274 + '<a class="float" href="#">'.$p['value_value'].'</a>'.
  275 + '</div>';
  276 + }
  277 +
  278 + $data_properties .= '</div>';
  279 + }
282 280  
283   - ?>
  281 + echo( $data_properties );
  282 +
  283 + ?>
  284 + </div>
  285 + <div class="display_none tabs_video item_menu_content_wrapper">
  286 + <?php if(!empty($item['content_video'])){
  287 + $video = explode(',',$item['content_video']);
  288 + foreach($video as $v): ?>
  289 + <iframe class="video_iframe" width="520" height="340" src="<?= $v ?>" frameborder="0" allowfullscreen></iframe>
  290 + <?php endforeach;
  291 + }?>
  292 + </div>
  293 + <div class="display_none tabs_comments item_menu_content_wrapper">
  294 + <div id="mc-review"></div>
  295 + <script type="text/javascript">
  296 + cackle_widget = window.cackle_widget || [];
  297 + cackle_widget.push({widget: 'Review', id: 38277});
  298 + (function() {
  299 + var mc = document.createElement('script');
  300 + mc.type = 'text/javascript';
  301 + mc.async = true;
  302 + mc.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://cackle.me/widget.js';
  303 + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
  304 + })();
  305 + </script>
  306 + <a id="mc-link" href="http://cackle.ru">Социальные отзывы <b style="color:#4FA3DA">Cackl</b><b style="color:#F65077">e</b></a>
  307 + </div>
284 308 </div>
285   - <div class="display_none tabs_video item_menu_content_wrapper">
286   - <?php if(!empty($item['content_video'])){
287   - $video = explode(',',$item['content_video']);
288   - foreach($video as $v): ?>
289   - <iframe class="video_iframe" width="520" height="340" src="<?= $v ?>" frameborder="0" allowfullscreen></iframe>
290   - <?php endforeach;
291   - }?>
  309 + </div>
  310 + </div>
  311 + </div>
  312 + </div>
  313 +
  314 + <div class="other_items">
  315 + <div class="item_menu_header_menu clearfix">
  316 + <div class="inner">
  317 + <div class="tabs clearfix">
  318 + <ul class="change_similar_items">
  319 + <li class="float active_tab first_tab">
  320 + <?= '<a href="#" title="'.$t->_("related_items").'" data-change_similar_items="buy_with" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("related_items").'</a>' ?>
  321 + </li>
  322 + <li class="float not_active">
  323 + <?= '<a href="#" title="'.$t->_("similar_items").'" data-change_similar_items="same" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("similar_items").'</a>' ?>
  324 + </li>
  325 + <li class="float not_active">
  326 + <?= '<a href="#" title="'.$t->_("popular_items").'" data-change_similar_items="popular" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("popular_items").'</a>' ?>
  327 + </li>
  328 + <li class="float last_tab not_active">
  329 + <?= '<a href="#" title="'.$t->_("watched").'" data-change_similar_items="viewed" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("watched").'</a>' ?>
  330 + </li>
  331 + </ul>
292 332 </div>
293   - <div class="display_none tabs_comments item_menu_content_wrapper">
294   - <div id="mc-review"></div>
295   - <script type="text/javascript">
296   - cackle_widget = window.cackle_widget || [];
297   - cackle_widget.push({widget: 'Review', id: 38277});
298   - (function() {
299   - var mc = document.createElement('script');
300   - mc.type = 'text/javascript';
301   - mc.async = true;
302   - mc.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://cackle.me/widget.js';
303   - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
304   - })();
305   - </script>
306   - <a id="mc-link" href="http://cackle.ru">Социальные отзывы <b style="color:#4FA3DA">Cackl</b><b style="color:#F65077">e</b></a>
307   - </div>
308 333 </div>
309 334 </div>
  335 + <div class="items inner clearfix">
  336 + <?php if( !empty( $popular_groups ) ):
  337 + foreach( $popular_groups as $k => $p ):
  338 + $this->partial('partial/item_group', ['k' => $k, 'i' => $p, 'limit' => 5]);
  339 + endforeach;
  340 + endif; ?>
  341 + </div>
310 342 </div>
311   - </div>
312   -</div>
313 343  
  344 + <?php
  345 + if( !empty( $news ) )
  346 + {
  347 + $data_news =
  348 + '<div class="news_wrapper">'.
  349 + '<div class="inner clearfix">';
314 350  
  351 + foreach( $news as $k => $n )
  352 + {
  353 + $data_news .=
  354 + '<div class="one_news float'.( ($k+1)%2==0 ? ' last' : '' ).'">'.
  355 + '<div class="one_news_img float">'.
  356 + ( !empty( $n['cover'] )
  357 + ?
  358 + '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'">'.
  359 + '<img src="'.$n['image'].'" alt="" width="180" height="120" />'.
  360 + '</a>'
  361 + :
  362 + '').
  363 + '</div>'.
  364 + '<div class="one_news_content float'.( empty( $n['cover'] ) ? ' full_width' : '').'">'.
  365 + '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'">'.
  366 + '<h2>'.$n['title'].'</h2>'.
  367 + '</a>'.
  368 + '<p>'.$this->common->shortenString( $n['abstract_info'], 230 ).'</p>'.
  369 + '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'" class="news_more">Докладніше</a>'.
  370 + '</div>'.
  371 + '</div>';
  372 + }
315 373  
316   -<div class="other_items">
317   - <div class="item_menu_header_menu clearfix">
318   - <div class="inner">
319   - <div class="tabs clearfix">
320   - <ul class="change_similar_items">
321   - <li class="float active_tab first_tab">
322   - <?= '<a href="#" title="'.$t->_("related_items").'" data-change_similar_items="buy_with" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("related_items").'</a>' ?>
323   - </li>
324   - <li class="float not_active">
325   - <?= '<a href="#" title="'.$t->_("similar_items").'" data-change_similar_items="same" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("similar_items").'</a>' ?>
326   - </li>
327   - <li class="float not_active">
328   - <?= '<a href="#" title="'.$t->_("popular_items").'" data-change_similar_items="popular" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("popular_items").'</a>' ?>
329   - </li>
330   - <li class="float last_tab not_active">
331   - <?= '<a href="#" title="'.$t->_("watched").'" data-change_similar_items="viewed" data-catalog_id="'.$catalog_id.'" data-group_id="'.$item['group_id'].'">'.$t->_("watched").'</a>' ?>
332   - </li>
333   - </ul>
334   - </div>
335   - </div>
336   - </div>
337   - <div class="items inner clearfix">
338   - <?php if( !empty( $popular_groups ) ):
339   - foreach( $popular_groups as $k => $p ):
340   - $this->partial('partial/item_group', ['k' => $k, 'i' => $p, 'limit' => 5]);
341   - endforeach;
342   - endif; ?>
343   - </div>
344   -</div>
  374 + $data_news .= '</div></div>';
345 375  
346   -<?php
347   -
348   -if( !empty( $news ) )
349   -{
350   - $data_news =
351   - '<div class="news_wrapper">'.
352   - '<div class="inner clearfix">';
353   -
354   - foreach( $news as $k => $n )
355   - {
356   - $data_news .=
357   - '<div class="one_news float'.( ($k+1)%2==0 ? ' last' : '' ).'">'.
358   - '<div class="one_news_img float">'.
359   - ( !empty( $n['cover'] )
360   - ?
361   - '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'">'.
362   - '<img src="'.$n['image'].'" alt="" width="180" height="120" />'.
363   - '</a>'
364   - :
365   - '').
366   - '</div>'.
367   - '<div class="one_news_content float'.( empty( $n['cover'] ) ? ' full_width' : '').'">'.
368   - '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'">'.
369   - '<h2>'.$n['title'].'</h2>'.
370   - '</a>'.
371   - '<p>'.$this->common->shortenString( $n['abstract_info'], 230 ).'</p>'.
372   - '<a href="'.$this->seoUrl->setUrl($n['link']).'" title="'.$n['title'].'" class="news_more">Докладніше</a>'.
373   - '</div>'.
374   - '</div>';
375   - }
376   -
377   - $data_news .= '</div></div>';
378   -
379   - echo( $data_news );
380   -}
381   -
382   -?>
383   -
384   -<!--<div class="content_accost">
  376 + echo( $data_news );
  377 + }
  378 + ?>
  379 +
  380 + <!--
  381 + <div class="content_accost">
  382 + <div class="shadow_to_down"></div>
  383 + <div class="inner">
  384 + <div class="content_accost_title"></div>
  385 + <div class="content_accost_content">
  386 + <p>
  387 + Інтернет - магазин ТМ "Професійне насіння"
  388 + </p>
  389 + </div>
  390 + </div>
  391 + </div> content_accost
  392 + -->
  393 + <div class="content_accost">
385 394 <div class="shadow_to_down"></div>
386 395 <div class="inner">
387 396 <div class="content_accost_title"></div>
388 397 <div class="content_accost_content">
389 398 <p>
390   - Інтернет - магазин ТМ "Професійне насіння"
  399 + <?= isset( $seo['seo_text'] ) && !empty( $seo['seo_text'] ) ? $seo['seo_text'] : ''?>
391 400 </p>
392 401 </div>
393 402 </div>
394   - </div> content_accost -->
395   - <div class="content_accost">
396   - <div class="shadow_to_down"></div>
397   - <div class="inner">
398   - <div class="content_accost_title"></div>
399   - <div class="content_accost_content">
400   - <p>
401   - <?= isset( $seo['seo_text'] ) && !empty( $seo['seo_text'] ) ? $seo['seo_text'] : ''?>
402   - </p>
403   - </div>
404 403 </div>
405   - </div>
406   -<div class="content_blog">
407   - <div class="inner">
408 404  
409   - <div class="links clearfix">
  405 + <div class="content_blog">
  406 + <div class="inner">
410 407  
411   - <div class="float fb">
412   - <div id="fb-root"></div>
  408 + <div class="links clearfix">
413 409  
414   - <div class="fb-like" data-href="#" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
415   - </div>
416   - <div class="float ok">
417   - <div id="ok_shareWidget"></div>
418   - </div>
419   - <div class="float vk">
420   - <script type="text/javascript"><!--
421   - document.write(VK.Share.button(false,{type: "round", text: "Нравится"}));
422   - -->
423   - </script>
424   - </div>
  410 + <div class="float fb">
  411 + <div id="fb-root"></div>
  412 +
  413 + <div class="fb-like" data-href="#" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
  414 + </div>
  415 + <div class="float ok">
  416 + <div id="ok_shareWidget"></div>
  417 + </div>
  418 + <div class="float vk">
  419 + <script type="text/javascript"><!--
  420 + document.write(VK.Share.button(false,{type: "round", text: "Нравится"}));
  421 + -->
  422 + </script>
  423 + </div>
425 424  
426   - <div class="float share">
427   - <p class="share_title float"><?= $t->_("share")?>:</p>
  425 + <div class="float share">
  426 + <p class="share_title float"><?= $t->_("share")?>:</p>
428 427  
429   - <div class="pluso float" data-background="#ebebeb" data-options="small,square,line,horizontal,nocounter,theme=04" data-services="facebook,google,livejournal,moimir,odnoklassniki,vkontakte,twitter"></div>
  428 + <div class="pluso float" data-background="#ebebeb" data-options="small,square,line,horizontal,nocounter,theme=04" data-services="facebook,google,livejournal,moimir,odnoklassniki,vkontakte,twitter"></div>
  429 + </div>
430 430 </div>
431 431 </div>
432   - </div>
433 432  
434   -</div><!-- content_blog -->
435   -</div><!-- catalog -->
  433 + </div><!-- content_blog -->
  434 +
  435 + </div><!-- catalog -->
436 436 </div>
  437 +
437 438 </div>
  439 +
438 440 <script>
439 441  
440 442 <?php
... ...