Commit a6c708191a09f2c88ff77a3d496e1f794351272f
Merge branch 'similar'
Showing
13 changed files
with
432 additions
and
211 deletions
Show diff stats
common/components/artboximage/ArtboxImageHelper.php
| @@ -13,14 +13,14 @@ class ArtboxImageHelper extends Object { | @@ -13,14 +13,14 @@ class ArtboxImageHelper extends Object { | ||
| 13 | private static $imageDriver; | 13 | private static $imageDriver; |
| 14 | private static $presets; | 14 | private static $presets; |
| 15 | 15 | ||
| 16 | - public function getDriver() { | 16 | + public static function getDriver() { |
| 17 | if (empty(self::$imageDriver)) { | 17 | if (empty(self::$imageDriver)) { |
| 18 | self::$imageDriver = Yii::$app->artboximage; | 18 | self::$imageDriver = Yii::$app->artboximage; |
| 19 | } | 19 | } |
| 20 | return self::$imageDriver; | 20 | return self::$imageDriver; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | - public function getPreset($preset) { | 23 | + public static function getPreset($preset) { |
| 24 | 24 | ||
| 25 | if (empty(self::$presets)) { | 25 | if (empty(self::$presets)) { |
| 26 | self::$presets = self::getDriver()->presets; | 26 | self::$presets = self::getDriver()->presets; |
common/modules/product/helpers/ProductHelper.php
| @@ -153,28 +153,38 @@ | @@ -153,28 +153,38 @@ | ||
| 153 | 1, | 153 | 1, |
| 154 | ]) | 154 | ]) |
| 155 | ->andWhere([ 'product_category.category_id' => $product_categories ]); | 155 | ->andWhere([ 'product_category.category_id' => $product_categories ]); |
| 156 | - // $query->andWhere(['>=', 'product_variant.price', $product->enabledVariant->price * 0.7]); | ||
| 157 | - // $query->andWhere(['<=', 'product_variant.price', $product->enabledVariant->price * 1.3]); | 156 | + $query->andWhere(['>=', 'product_variant.price', $product->enabledVariant->price * 0.7]); |
| 157 | + $query->andWhere(['<=', 'product_variant.price', $product->enabledVariant->price * 1.3]); | ||
| 158 | + | ||
| 159 | + $query->innerJoin('product_option', 'product_option.product_id = product.product_id'); | ||
| 160 | + $where = [ ]; | ||
| 158 | foreach($product->properties as $group) { | 161 | foreach($product->properties as $group) { |
| 159 | - $where = [ ]; | 162 | + |
| 160 | foreach($group->_options as $option) { | 163 | foreach($group->_options as $option) { |
| 161 | $where[] = $option->tax_option_id; | 164 | $where[] = $option->tax_option_id; |
| 162 | } | 165 | } |
| 163 | if(!$where) { | 166 | if(!$where) { |
| 164 | continue; | 167 | continue; |
| 165 | } | 168 | } |
| 166 | - $query->innerJoin('product_option to' . $group->tax_group_id, 'to' . $group->tax_group_id . '.product_id = product.product_id'); | ||
| 167 | - $query->andWhere([ 'to' . $group->tax_group_id . '.option_id' => $where ]); | 169 | + $query->andWhere([ 'option_id' => $where ]); |
| 168 | } | 170 | } |
| 169 | $query->andWhere([ | 171 | $query->andWhere([ |
| 170 | '!=', | 172 | '!=', |
| 171 | 'product.product_id', | 173 | 'product.product_id', |
| 172 | $product->product_id, | 174 | $product->product_id, |
| 173 | ]); | 175 | ]); |
| 174 | - $query->groupBy('product.product_id'); | 176 | + $query->groupBy('product.product_id, |
| 177 | + product.name, | ||
| 178 | + product.brand_id, | ||
| 179 | + product.alias, | ||
| 180 | + product.description, | ||
| 181 | + product.video, | ||
| 182 | + product.is_top, | ||
| 183 | + product.akciya, | ||
| 184 | + product.is_new | ||
| 185 | + '); | ||
| 175 | $query->limit($count); | 186 | $query->limit($count); |
| 176 | - $products = $query | ||
| 177 | - ->all(); | 187 | + $products = $query->all(); |
| 178 | 188 | ||
| 179 | return $products; | 189 | return $products; |
| 180 | } | 190 | } |
common/modules/product/widgets/similarProducts.php
| @@ -26,7 +26,7 @@ class similarProducts extends Widget { | @@ -26,7 +26,7 @@ class similarProducts extends Widget { | ||
| 26 | $this->title = Yii::t('product', 'Similar products'); | 26 | $this->title = Yii::t('product', 'Similar products'); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | - return $this->render('products_block', [ | 29 | + return $this->render('products_block_similar', [ |
| 30 | 'title' => $this->title, | 30 | 'title' => $this->title, |
| 31 | 'class' => 'similar-products', | 31 | 'class' => 'similar-products', |
| 32 | 'products' => $products, | 32 | 'products' => $products, |
common/modules/product/widgets/views/product_smart.php
| 1 | <?php | 1 | <?php |
| 2 | -/** | ||
| 3 | - * @var $product common\modules\product\models\Product | ||
| 4 | - */ | ||
| 5 | -use yii\helpers\Html; | ||
| 6 | -use yii\helpers\Url; | 2 | + /** |
| 3 | + * @var $product common\modules\product\models\Product | ||
| 4 | + */ | ||
| 5 | + use yii\helpers\Html; | ||
| 6 | + use yii\helpers\Url; | ||
| 7 | ?> | 7 | ?> |
| 8 | <div class="catalog_item home_slider_it"> | 8 | <div class="catalog_item home_slider_it"> |
| 9 | - <div class="wrapper"> | ||
| 10 | - <div class="status_block-wr <?=$class?>"> | ||
| 11 | - <?php | ||
| 12 | - if($class == 'top'){ | ||
| 13 | - print '<div class="staus_hit"></div>'; | ||
| 14 | - } else if($class == 'new') { | ||
| 15 | - print '<div class="staus_new"></div>'; | ||
| 16 | - } else if($class == 'promo'){ | ||
| 17 | - print '<div class="status_sale">Акция</div>'; | ||
| 18 | - } | ||
| 19 | - ?> | 9 | + <div class="wrapper"> |
| 10 | + <div class="status_block-wr <?=$class?>"> | ||
| 11 | + <?php | ||
| 12 | + if($class == 'top'){ | ||
| 13 | + print '<div class="staus_hit"></div>'; | ||
| 14 | + } else if($class == 'new') { | ||
| 15 | + print '<div class="staus_new"></div>'; | ||
| 16 | + } else if($class == 'promo'){ | ||
| 17 | + print '<div class="status_sale">Акция</div>'; | ||
| 18 | + } | ||
| 19 | + ?> | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | - </div> | ||
| 23 | - <div class="item_container" > | ||
| 24 | - <input class="prodInfo" type="hidden" value="[]"> | 22 | + </div> |
| 23 | + <div class="item_container" > | ||
| 24 | + <input class="prodInfo" type="hidden" value="[]"> | ||
| 25 | 25 | ||
| 26 | - <div class="img"> | ||
| 27 | - <a class="btn-product-details" href="<?= Url::to([ | ||
| 28 | - 'catalog/product', | ||
| 29 | - 'product' => $product->alias | ||
| 30 | - ]) ?>"> | ||
| 31 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[ 0 ]->imageUrl, 'list', [ | ||
| 32 | - 'alt' => $product->fullname . ' ' . $product->category->name, | ||
| 33 | - 'title' => $product->fullname . ' ' . $product->category->name, | ||
| 34 | - 'class' => 'selected' | ||
| 35 | - ]) ?> | ||
| 36 | - </a> | ||
| 37 | - </div> | 26 | + <div class="img"> |
| 27 | + <a class="btn-product-details" href="<?= Url::to([ | ||
| 28 | + 'catalog/product', | ||
| 29 | + 'product' => $product->alias | ||
| 30 | + ]) ?>"> | ||
| 31 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[ 0 ]->imageUrl, 'list', [ | ||
| 32 | + 'alt' => $product->fullname . ' ' . $product->category->name, | ||
| 33 | + 'title' => $product->fullname . ' ' . $product->category->name, | ||
| 34 | + 'class' => 'selected' | ||
| 35 | + ]) ?> | ||
| 36 | + </a> | ||
| 37 | + </div> | ||
| 38 | 38 | ||
| 39 | - <div class="style short-desc_wr"> | ||
| 40 | - <div class="style title-name_"> | ||
| 41 | - <a href="<?= Url::to([ | ||
| 42 | - 'catalog/product', | ||
| 43 | - 'product' => $product->alias | ||
| 44 | - ]) ?>" title="<?= $product->fullname . ' ' . $product->category->name ?>"> | ||
| 45 | - <p><span><?= $product->fullname ?></span></p> | ||
| 46 | - <p><span><?= $product->category->name ?></span></p> | ||
| 47 | - </a> | 39 | + <div class="style short-desc_wr"> |
| 40 | + <div class="style title-name_"> | ||
| 41 | + <a href="<?= Url::to([ | ||
| 42 | + 'catalog/product', | ||
| 43 | + 'product' => $product->alias | ||
| 44 | + ]) ?>" title="<?= $product->fullname . ' ' . $product->category->name ?>"> | ||
| 48 | 45 | ||
| 49 | - </div> | ||
| 50 | - <div class="style in_stock_wr"> | ||
| 51 | - <div class="in_stock_"> | ||
| 52 | - <span class="yes_stock">есть на складе</span> | 46 | + <p><span><?= $product->name ?></span></p> |
| 47 | +<!-- <p><span>--><?//= $product->fullname ?><!--</span></p>--> | ||
| 48 | +<!-- <p><span>--><?//= $product->category->name ?><!--</span></p>--> | ||
| 49 | + </a> | ||
| 53 | 50 | ||
| 54 | - </div> | ||
| 55 | - <div class="title-sku"> | ||
| 56 | - <span>Код: <?=$product->variant->sku?></span> | ||
| 57 | - </div> | ||
| 58 | - </div> | 51 | + </div> |
| 52 | + <div class="style in_stock_wr"> | ||
| 53 | + <div class="in_stock_"> | ||
| 54 | + <span class="yes_stock">есть на складе</span> | ||
| 59 | 55 | ||
| 60 | - <div class="style price-basket-wr"> | ||
| 61 | - <span class="currency_price"><?= $product->variant->price ?> грн</span> | ||
| 62 | -<!-- <div class="price-basket"><a class="" href="#"></a></div>--> | ||
| 63 | - </div> | ||
| 64 | - </div> | 56 | + </div> |
| 57 | + <div class="title-sku"> | ||
| 58 | + <span>Код: <?=$product->variant->sku?></span> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + | ||
| 62 | + <div class="style price-basket-wr"> | ||
| 63 | + <span class="currency_price"><?= $product->variant->price ?> грн</span> | ||
| 64 | + <!-- <div class="price-basket"><a class="" href="#"></a></div>--> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 65 | 67 | ||
| 66 | 68 | ||
| 67 | 69 | ||
| 68 | - </div> | ||
| 69 | </div> | 70 | </div> |
| 71 | + </div> | ||
| 70 | </div> | 72 | </div> |
| 71 | \ No newline at end of file | 73 | \ No newline at end of file |
common/modules/product/widgets/views/product_smart_similar.php
0 → 100755
| 1 | +<?php | ||
| 2 | + /** | ||
| 3 | + * @var Product $product | ||
| 4 | + * @var string $class | ||
| 5 | + */ | ||
| 6 | + use common\modules\product\models\Product; | ||
| 7 | + use yii\helpers\Url; | ||
| 8 | + | ||
| 9 | +?> | ||
| 10 | + | ||
| 11 | +<div class="catalog_item"> | ||
| 12 | + <div class="wrapper"> | ||
| 13 | + <?php if (!empty($product->events)) { ?> | ||
| 14 | + <div class="events events_not_link"> | ||
| 15 | + | ||
| 16 | + <?php | ||
| 17 | + foreach($product->events as $event){ | ||
| 18 | + if($event->banner){ | ||
| 19 | + echo \common\components\artboximage\ArtboxImageHelper::getImage($event->getImageUrl('banner'), 'banner_list',[ | ||
| 20 | + 'class' => 'banner-in-list' | ||
| 21 | + ]); | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + ?> | ||
| 26 | + | ||
| 27 | + </div> | ||
| 28 | + <?php } ?> | ||
| 29 | + <div class="item_container"> | ||
| 30 | + <div class="img"> | ||
| 31 | + <a href="<?=Url::to([ | ||
| 32 | + 'catalog/product', | ||
| 33 | + 'product' => $product->alias, | ||
| 34 | + ])?>"> | ||
| 35 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage( | ||
| 36 | + $product->imageUrl, | ||
| 37 | + 'list', | ||
| 38 | + [ | ||
| 39 | + 'alt' => $product->name, | ||
| 40 | + 'title' => $product->name, | ||
| 41 | + 'class' => 'selected', | ||
| 42 | + 'itemprop' => 'image', | ||
| 43 | + ] | ||
| 44 | + ) ?> | ||
| 45 | + </a> | ||
| 46 | + | ||
| 47 | + </div> | ||
| 48 | + | ||
| 49 | + <div class="style title-name_ title_name-collect"> | ||
| 50 | + <a href="<?= Url::to([ | ||
| 51 | + 'catalog/product', | ||
| 52 | + 'product' => $product->alias | ||
| 53 | + ]) ?>" title="<?= $product->fullname . ' ' . $product->category->name ?>"> | ||
| 54 | +<!-- <p><span>--><?php //echo $product->category->name ?><!--</span></p>--> | ||
| 55 | + <p><span><?= $product->name ?></span></p> | ||
| 56 | + | ||
| 57 | + </a> | ||
| 58 | + | ||
| 59 | + </div> | ||
| 60 | + | ||
| 61 | + <div class="style in_stock_wr"> | ||
| 62 | + <div class="in_stock_"> | ||
| 63 | + <span class="yes_stock">есть на складе</span> | ||
| 64 | + | ||
| 65 | + </div> | ||
| 66 | + <div class="title-sku"> | ||
| 67 | + <span>Код: <?=$product->variant->sku?></span> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + <div class="style price"> | ||
| 71 | + <div class="dlexfduinxipi"> | ||
| 72 | + <span class="main"> <?php | ||
| 73 | + echo \Yii::$app->formatter->asDecimal($product->variant->price); | ||
| 74 | + ?> <span class="currency">грн</span> | ||
| 75 | + </span> | ||
| 76 | + </div> | ||
| 77 | + </div> | ||
| 78 | + <div class="style info_icons"> | ||
| 79 | + <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5893">Купить</a> | ||
| 80 | + | ||
| 81 | + <?php /* | ||
| 82 | + <ul class="ul wishlike_block"> | ||
| 83 | + <li class="compare"> | ||
| 84 | + <a onclick="add2compare(); return false;" class="compare compare_text_link_5893" lang="5893" href="#">К сравнению</a> | ||
| 85 | + <span class="icon"></span> | ||
| 86 | + </li> | ||
| 87 | + <li class="like"> | ||
| 88 | + <a class="like like_text_link_5893" lang="5893" href="#">В избранное</a><span class="icon"></span> | ||
| 89 | + </li> | ||
| 90 | + </ul> | ||
| 91 | + */ ?> | ||
| 92 | + | ||
| 93 | + </div> | ||
| 94 | +<!-- <div class="additional_info params">--> | ||
| 95 | +<!-- </div>--> | ||
| 96 | +<!-- <div class="opacity_bg"></div>--> | ||
| 97 | + </div> | ||
| 98 | + </div> | ||
| 99 | +</div> |
common/modules/product/widgets/views/products_block.php
| 1 | <?php | 1 | <?php |
| 2 | - | ||
| 3 | -use yii\helpers\Html; | ||
| 4 | -use yii\web\View; | 2 | + |
| 3 | + use yii\helpers\Html; | ||
| 4 | + use yii\web\View; | ||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | ?> | 7 | ?> |
| @@ -9,16 +9,16 @@ use yii\web\View; | @@ -9,16 +9,16 @@ use yii\web\View; | ||
| 9 | <?php if(!empty($products)) :?> | 9 | <?php if(!empty($products)) :?> |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | -<!-- <span style="">--><?//= $title?><!--</span>--> | 12 | + <!-- <span style="">--><?//= $title?><!--</span>--> |
| 13 | 13 | ||
| 14 | - <div id="product_main_slider" class=""> | ||
| 15 | - <?php foreach($products as $product) :?> | ||
| 16 | - <?= $this->render('product_smart', [ | ||
| 17 | - 'product' => $product, | ||
| 18 | - 'class' => $class | ||
| 19 | - ]);?> | ||
| 20 | - <?php endforeach?> | ||
| 21 | - </div> | 14 | + <div id="product_main_slider" class=""> |
| 15 | + <?php foreach($products as $product) :?> | ||
| 16 | + <?= $this->render('product_smart', [ | ||
| 17 | + 'product' => $product, | ||
| 18 | + 'class' => $class | ||
| 19 | + ]);?> | ||
| 20 | + <?php endforeach?> | ||
| 21 | + </div> | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 |
common/modules/product/widgets/views/products_block_similar.php
0 → 100755
| 1 | +<?php | ||
| 2 | + | ||
| 3 | + /** | ||
| 4 | + * @var View $this | ||
| 5 | + * @var Product[] $products | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | + use common\modules\product\models\Product; | ||
| 9 | + use yii\web\View; | ||
| 10 | + | ||
| 11 | +?> | ||
| 12 | + | ||
| 13 | +<?php if (!empty($products)) { ?> | ||
| 14 | + | ||
| 15 | + <div class="collection" style="padding: 0;"> | ||
| 16 | + | ||
| 17 | + <h2 id="collection"> | ||
| 18 | + Похожие товары | ||
| 19 | + </h2> | ||
| 20 | + | ||
| 21 | + <div class="catalog_product_list view_table new_collection"> | ||
| 22 | + <?php foreach ($products as $product) { | ||
| 23 | + if ($product->is_top) { | ||
| 24 | + $class = 'top'; | ||
| 25 | + } elseif ($product->is_new) { | ||
| 26 | + $class = 'new'; | ||
| 27 | + } elseif ($product->akciya) { | ||
| 28 | + $class = 'promo'; | ||
| 29 | + } else { | ||
| 30 | + $class = ''; | ||
| 31 | + } | ||
| 32 | + echo $this->render( | ||
| 33 | + 'product_smart_similar', | ||
| 34 | + [ | ||
| 35 | + 'product' => $product, | ||
| 36 | + 'class' => $class, | ||
| 37 | + ] | ||
| 38 | + ); | ||
| 39 | + } ?> | ||
| 40 | + </div> | ||
| 41 | + | ||
| 42 | + <div class="clearfix"></div> | ||
| 43 | + | ||
| 44 | + </div> | ||
| 45 | + | ||
| 46 | + | ||
| 47 | +<?php } ?> | ||
| 0 | \ No newline at end of file | 48 | \ No newline at end of file |
frontend/controllers/AjaxController.php
| @@ -93,7 +93,7 @@ class AjaxController extends Controller | @@ -93,7 +93,7 @@ class AjaxController extends Controller | ||
| 93 | $query->select(['product.*']); | 93 | $query->select(['product.*']); |
| 94 | $query->joinWith(['enabledVariants','brand','options', 'category']); | 94 | $query->joinWith(['enabledVariants','brand','options', 'category']); |
| 95 | 95 | ||
| 96 | - $query->groupBy(['product.product_id', 'product_variant.price']); | 96 | +// $query->groupBy(['product.product_id', 'product_variant.price']); |
| 97 | 97 | ||
| 98 | ProductHelper::_setQueryParams($query, $params); | 98 | ProductHelper::_setQueryParams($query, $params); |
| 99 | 99 |
frontend/models/ProductFrontendSearch.php
frontend/views/catalog/product.php
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | use common\components\artboximage\ArtboxImageHelper; | 6 | use common\components\artboximage\ArtboxImageHelper; |
| 7 | use common\models\Orders; | 7 | use common\models\Orders; |
| 8 | use common\modules\product\models\Product; | 8 | use common\modules\product\models\Product; |
| 9 | + use common\modules\product\widgets\similarProducts; | ||
| 9 | use frontend\assets\FotoramaAsset; | 10 | use frontend\assets\FotoramaAsset; |
| 10 | use frontend\widgets\Seo; | 11 | use frontend\widgets\Seo; |
| 11 | use common\modules\comment\widgets\CommentWidget; | 12 | use common\modules\comment\widgets\CommentWidget; |
| @@ -95,7 +96,7 @@ | @@ -95,7 +96,7 @@ | ||
| 95 | 96 | ||
| 96 | <li class="product_collection" data-target="collection"> | 97 | <li class="product_collection" data-target="collection"> |
| 97 | <a href="#collection"> | 98 | <a href="#collection"> |
| 98 | - <span class="text">Коллекция</span> | 99 | + <span class="text">Похожие товары</span> |
| 99 | </a> | 100 | </a> |
| 100 | <span class="icon"></span> | 101 | <span class="icon"></span> |
| 101 | <span class="arr"></span> | 102 | <span class="arr"></span> |
| @@ -178,7 +179,7 @@ | @@ -178,7 +179,7 @@ | ||
| 178 | <tr> | 179 | <tr> |
| 179 | <?php foreach($product->events as $event):?> | 180 | <?php foreach($product->events as $event):?> |
| 180 | <?php if(!empty($event->end_at) && $event->isActive()):?> | 181 | <?php if(!empty($event->end_at) && $event->isActive()):?> |
| 181 | - <div class="event_block"> | 182 | + <div class="event_block new_ev_bl"> |
| 182 | 183 | ||
| 183 | <div class="event_title"> <?= Html::a('Акция!!! '.$event->name,Url::to(['event/show','alias'=>$event->alias]))?></div> | 184 | <div class="event_title"> <?= Html::a('Акция!!! '.$event->name,Url::to(['event/show','alias'=>$event->alias]))?></div> |
| 184 | <div class="event_time">До конца осталось:</div> | 185 | <div class="event_time">До конца осталось:</div> |
| @@ -544,130 +545,12 @@ | @@ -544,130 +545,12 @@ | ||
| 544 | 545 | ||
| 545 | <div class="clearfix"></div> | 546 | <div class="clearfix"></div> |
| 546 | 547 | ||
| 547 | - <?php /* | ||
| 548 | - | ||
| 549 | - <div class="collection"> | ||
| 550 | - <br/> | ||
| 551 | - <h2 id="collection"> | ||
| 552 | - Коллекция светильников <!--ДЕКОРА--> | ||
| 553 | - </h2> | ||
| 554 | - | ||
| 555 | - <div class="catalog_product_list view_table"> | ||
| 556 | - <div class="catalog_item"> | ||
| 557 | - <div class="wrapper"> | ||
| 558 | - <div class="item_container"> | ||
| 559 | - <div class="title"> | ||
| 560 | - <a href="http://www.linija-svitla.ua/lyustra-elstead-fe-leila3-5893.htm">люстра FE/LEILA3</a> | ||
| 561 | - </div> | ||
| 562 | - <div class="img"> | ||
| 563 | - <a href="http://www.linija-svitla.ua/lyustra-elstead-fe-leila3-5893.htm"> | ||
| 564 | - <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila3/5893_5.jpg" alt="люстра FE/LEILA3" class="selected"> | ||
| 565 | - </a> | ||
| 566 | - <div class="info_icons"> | ||
| 567 | - <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5893">Купить светильник</a> | ||
| 568 | - <ul class="ul wishlike_block"> | ||
| 569 | - <li class="compare"> | ||
| 570 | - <a onclick="add2compare(); return false;" class="compare compare_text_link_5893" lang="5893" href="#">К сравнению</a> | ||
| 571 | - <span class="icon"></span> | ||
| 572 | - </li> | ||
| 573 | - <li class="like"> | ||
| 574 | - <a class="like like_text_link_5893" lang="5893" href="#">В избранное</a><span class="icon"></span> | ||
| 575 | - </li> | ||
| 576 | - </ul> | ||
| 577 | - </div> | ||
| 578 | - </div> | ||
| 579 | - <div class="price"> | ||
| 580 | - <div class="dlexfduinxipi"> | ||
| 581 | - Цена: | ||
| 582 | - <span class="main"> 25794.00 <span class="currency">грн</span> | ||
| 583 | - </span> | ||
| 584 | - </div> | ||
| 585 | - </div> | ||
| 586 | - <div class="additional_info params"> | ||
| 587 | - </div> | ||
| 588 | - <div class="opacity_bg"></div> | ||
| 589 | - </div> | ||
| 590 | - </div> | ||
| 591 | - </div> | ||
| 592 | - <div class="catalog_item"> | ||
| 593 | - <div class="wrapper"> | ||
| 594 | - <div class="item_container"> | ||
| 595 | - <div class="title"> | ||
| 596 | - <a href="http://www.linija-svitla.ua/elstead-fe-leila1c-6991.htm"> FE/LEILA1C</a> | ||
| 597 | - </div> | ||
| 598 | - <div class="img"> | ||
| 599 | - <a href="http://www.linija-svitla.ua/elstead-fe-leila1c-6991.htm"> | ||
| 600 | - <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila1c/6991_5.jpg" alt=" FE/LEILA1C" class="selected"> | ||
| 601 | - </a> | ||
| 602 | - <div class="info_icons"> | ||
| 603 | - <a href="#" class="btn btnBuy buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="6991">Купить светильник</a> | ||
| 604 | - <ul class="ul wishlike_block"> | ||
| 605 | - <li class="compare"> | ||
| 606 | - <a onclick="add2compare(); return false;" class="compare compare_text_link_6991" lang="6991" href="#">К сравнению</a> | ||
| 607 | - <span class="icon"></span> | ||
| 608 | - </li> | ||
| 609 | - <li class="like"> | ||
| 610 | - <a class="like like_text_link_6991" lang="6991" href="#">В избранное</a><span class="icon"></span> | ||
| 611 | - </li> | ||
| 612 | - </ul> | ||
| 613 | - </div> | ||
| 614 | - </div> | ||
| 615 | - <div class="price"> | ||
| 616 | - <div class="dlexfduinxipi"> | ||
| 617 | - Цена: | ||
| 618 | - <span class="main"> 14330.40 <span class="currency">грн</span> | ||
| 619 | - </span> | ||
| 620 | - </div> | ||
| 621 | - </div> | ||
| 622 | - <div class="additional_info params"> | ||
| 623 | - </div> | ||
| 624 | - <div class="opacity_bg"></div> | ||
| 625 | - </div> | ||
| 626 | - </div> | ||
| 627 | - </div> | ||
| 628 | - <div class="catalog_item"> | ||
| 629 | - <div class="wrapper"> | ||
| 630 | - <div class="item_container"> | ||
| 631 | - <div class="title"> | ||
| 632 | - <a href="http://www.linija-svitla.ua/nastennyy-svetilnik-elstead-fe-leila2-5894.htm">настенный светильник FE/LEILA2</a> | ||
| 633 | - </div> | ||
| 634 | - <div class="img"> | ||
| 635 | - <a href="http://www.linija-svitla.ua/nastennyy-svetilnik-elstead-fe-leila2-5894.htm"> | ||
| 636 | - <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila2/5894_5.jpg" alt="настенный светильник FE/LEILA2" class="selected"> | ||
| 637 | - </a> | ||
| 638 | - <div class="info_icons"> | ||
| 639 | - <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5894">Купить светильник</a> | ||
| 640 | - <ul class="ul wishlike_block"> | ||
| 641 | - <li class="compare"> | ||
| 642 | - <a onclick="add2compare(); return false;" class="compare compare_text_link_5894" lang="5894" href="#">К сравнению</a> | ||
| 643 | - <span class="icon"></span> | ||
| 644 | - </li> | ||
| 645 | - <li class="like"> | ||
| 646 | - <a class="like like_text_link_5894" lang="5894" href="#">В избранное</a><span class="icon"></span> | ||
| 647 | - </li> | ||
| 648 | - </ul> | ||
| 649 | - </div> | ||
| 650 | - </div> | ||
| 651 | - <div class="price"> | ||
| 652 | - <div class="dlexfduinxipi"> | ||
| 653 | - Цена: | ||
| 654 | - <span class="main"> 8598.00 <span class="currency">грн</span> | ||
| 655 | - </span> | ||
| 656 | - </div> | ||
| 657 | - </div> | ||
| 658 | - <div class="additional_info params"> | ||
| 659 | - </div> | ||
| 660 | - <div class="opacity_bg"></div> | ||
| 661 | - </div> | ||
| 662 | - </div> | ||
| 663 | - </div> | ||
| 664 | - </div> | ||
| 665 | - <div class="clearfix"></div> | ||
| 666 | - | ||
| 667 | - </div> | ||
| 668 | - */?> | ||
| 669 | - | ||
| 670 | - | 548 | + |
| 549 | + <?php | ||
| 550 | + echo similarProducts::widget([ | ||
| 551 | + 'product' => $product, | ||
| 552 | + ]); | ||
| 553 | + ?> | ||
| 671 | 554 | ||
| 672 | <div class="clearfix"></div> | 555 | <div class="clearfix"></div> |
| 673 | <br/> | 556 | <br/> |
| @@ -719,4 +602,6 @@ | @@ -719,4 +602,6 @@ | ||
| 719 | 602 | ||
| 720 | </div> | 603 | </div> |
| 721 | </div> | 604 | </div> |
| 722 | -</div> | ||
| 723 | \ No newline at end of file | 605 | \ No newline at end of file |
| 606 | +</div> | ||
| 607 | + | ||
| 608 | + |
frontend/web/css/css_header.css
| @@ -27029,4 +27029,173 @@ ul.product-special li.promo div { | @@ -27029,4 +27029,173 @@ ul.product-special li.promo div { | ||
| 27029 | .small_ar#prev_slide, .small_ar#next_slide{ | 27029 | .small_ar#prev_slide, .small_ar#next_slide{ |
| 27030 | top: calc(50%)!important; | 27030 | top: calc(50%)!important; |
| 27031 | } | 27031 | } |
| 27032 | +} | ||
| 27033 | + | ||
| 27034 | +.new_collection { | ||
| 27035 | + margin:0 -15px 0 -15px; | ||
| 27036 | + height: 450px !important; | ||
| 27037 | + overflow: hidden; | ||
| 27038 | +} | ||
| 27039 | +.new_collection.owl-carousel { | ||
| 27040 | + overflow: visible; | ||
| 27041 | +} | ||
| 27042 | +.collection .catalog_product_list.view_table.new_collection .catalog_item { | ||
| 27043 | + width: 33.33333333%; | ||
| 27044 | + padding: 0 16px; | ||
| 27045 | +} | ||
| 27046 | +.new_collection .info_icons { | ||
| 27047 | + display: block !important; | ||
| 27048 | + position: relative !important; | ||
| 27049 | + bottom:auto !important; | ||
| 27050 | + right: auto !important; | ||
| 27051 | + box-shadow: 0 !important; | ||
| 27052 | + text-align: center; | ||
| 27053 | +} | ||
| 27054 | +.new_collection .wrapper { | ||
| 27055 | + overflow: visible !important; | ||
| 27056 | + border: 1px solid #f5f5f5; | ||
| 27057 | + position: relative !important; | ||
| 27058 | + left: auto !important; | ||
| 27059 | + top: auto !important; | ||
| 27060 | + border-radius: 0 !important; | ||
| 27061 | + padding: 0 !important; | ||
| 27062 | + margin: 0 !important; | ||
| 27063 | + box-shadow: none !important; | ||
| 27064 | + height: 100% !important; | ||
| 27065 | + min-height: auto !important; | ||
| 27066 | +} | ||
| 27067 | + | ||
| 27068 | +.new_collection .catalog_item .wrapper:hover { | ||
| 27069 | + height: 100% !important; | ||
| 27070 | + min-height: auto !important; | ||
| 27071 | + box-shadow: 0 3px 0 0 rgba(0,0,0,0.15) !important; | ||
| 27072 | + | ||
| 27073 | +} | ||
| 27074 | +.new_collection .catalog_item { | ||
| 27075 | + height: 420px !important; | ||
| 27076 | + margin-bottom: 30px !important; | ||
| 27077 | +} | ||
| 27078 | +.new_collection .price { | ||
| 27079 | + text-align: center !important; | ||
| 27080 | + margin-top: 11px !important; | ||
| 27081 | +} | ||
| 27082 | +.title_name-collect { | ||
| 27083 | + text-align: center; | ||
| 27084 | +} | ||
| 27085 | +.title-name_.title_name-collect a p { | ||
| 27086 | + font-size: 16px; | ||
| 27087 | + width: 100%; | ||
| 27088 | + | ||
| 27089 | + overflow: hidden; | ||
| 27090 | + float: left; | ||
| 27091 | + | ||
| 27092 | + font-weight: 700; | ||
| 27093 | + height: 39px; | ||
| 27094 | + line-height: 19px; | ||
| 27095 | + /*text-transform: none;*/ | ||
| 27096 | +} | ||
| 27097 | +.title-name_.title_name-collect a p:first-child { | ||
| 27098 | + /*font-size: 14px;*/ | ||
| 27099 | + /*line-height: 13px;*/ | ||
| 27100 | + /*height: 26px;*/ | ||
| 27101 | + /*text-transform: lowercase;*/ | ||
| 27102 | + /*font-weight: normal;*/ | ||
| 27103 | + | ||
| 27104 | +} | ||
| 27105 | +.new_collection .img {margin-bottom:18px !important;} | ||
| 27106 | +.new_collection .buy_button { | ||
| 27107 | + background: #0f6fc7 !important; | ||
| 27108 | + cursor: pointer !important; | ||
| 27109 | + float: none !important; | ||
| 27110 | + border-top: none !important; | ||
| 27111 | + border-bottom:3px solid #0f62ae !important; | ||
| 27112 | + line-height: 35px !important; | ||
| 27113 | + padding: 0!important; | ||
| 27114 | + width: 120px; | ||
| 27115 | + text-align: center !important; | ||
| 27116 | +} | ||
| 27117 | +.new_collection .in_stock_wr {margin-top: 7px;} | ||
| 27118 | +.new_collection .item_container { | ||
| 27119 | + float: left; | ||
| 27120 | + padding-bottom: 0 !important; | ||
| 27121 | +} | ||
| 27122 | +.new_collection .img { | ||
| 27123 | + height: 205px !important; | ||
| 27124 | + display: table !important; | ||
| 27125 | + width: 100% !important; | ||
| 27126 | +} | ||
| 27127 | +.new_collection .img a { | ||
| 27128 | + display: table-cell !important; | ||
| 27129 | + vertical-align: middle !important; | ||
| 27130 | + height: 205px !important; | ||
| 27131 | +} | ||
| 27132 | +.new_collection .img img { | ||
| 27133 | + max-height: 205px !important; | ||
| 27134 | + max-width: 205px !important; | ||
| 27135 | + vertical-align: middle; | ||
| 27136 | +} | ||
| 27137 | +#collection {font-size: 24px; color: #4b4b4b;} | ||
| 27138 | +.new_collection .owl-buttons { | ||
| 27139 | + position: absolute; | ||
| 27140 | + top:0; | ||
| 27141 | + right: -12px; | ||
| 27142 | + width: 100px; | ||
| 27143 | +} | ||
| 27144 | +.new_collection .owl-buttons .owl-prev,.new_collection .owl-buttons .owl-next { | ||
| 27145 | + top: 0!important; | ||
| 27146 | + right: 48px!important; | ||
| 27147 | + left: auto!important; | ||
| 27148 | + width: 19px!important; | ||
| 27149 | + height: 19px!important; | ||
| 27150 | + border-radius: 100%!important; | ||
| 27151 | + background: none!important; | ||
| 27152 | +} | ||
| 27153 | +.new_collection .owl-buttons .owl-next { | ||
| 27154 | + right:23px !important; | ||
| 27155 | +} | ||
| 27156 | + | ||
| 27157 | + | ||
| 27158 | +.new_collection .owl-buttons .owl-prev:before, .new_collection .owl-buttons .owl-next:before{ | ||
| 27159 | + background: url("../images/new_img/ico/ico-19.png")!important; | ||
| 27160 | + background-repeat: no-repeat!important; | ||
| 27161 | + width: 5px!important; | ||
| 27162 | + height: 9px!important; | ||
| 27163 | + top: 50%!important; | ||
| 27164 | + left: 50%!important; | ||
| 27165 | + margin-top: -5px!important; | ||
| 27166 | + margin-left: -3px!important; | ||
| 27167 | +} | ||
| 27168 | +.new_collection .owl-buttons .owl-prev:hover:before, .new_collection .owl-buttons .owl-next:hover:before{ | ||
| 27169 | + background: url("../images/new_img/ico/ico-20.png")!important; | ||
| 27170 | +} | ||
| 27171 | +.new_collection .owl-buttons .owl-next:hover:before { | ||
| 27172 | + background-position: 5px 0 !important; | ||
| 27173 | +} | ||
| 27174 | +.new_collection .owl-buttons .owl-next:before { | ||
| 27175 | + background-position: -5px 0!important; | ||
| 27176 | + margin-left: -2px!important; | ||
| 27177 | +} | ||
| 27178 | + | ||
| 27179 | +.new_collection .events { | ||
| 27180 | + position: absolute; | ||
| 27181 | + z-index: 99; | ||
| 27182 | + top: 0; | ||
| 27183 | + left: 0; | ||
| 27184 | +} | ||
| 27185 | +.new_collection .events_not_link img { | ||
| 27186 | + background:#fff; | ||
| 27187 | +} | ||
| 27188 | +.new_collection .events_not_link img:first-child { | ||
| 27189 | + padding-bottom: 5px; | ||
| 27190 | + background:none; | ||
| 27191 | +} | ||
| 27192 | +.new_collection .owl-theme .owl-controls { | ||
| 27193 | + margin-top: 0; | ||
| 27194 | +} | ||
| 27195 | +.event_block.new_ev_bl {min-height:180px;} | ||
| 27196 | +@media(max-width: 1200px){ | ||
| 27197 | + .collection .catalog_product_list.view_table.new_collection .catalog_item { | ||
| 27198 | + width: 50%; | ||
| 27199 | + height: 432px !important; | ||
| 27200 | + } | ||
| 27032 | } | 27201 | } |
| 27033 | \ No newline at end of file | 27202 | \ No newline at end of file |
frontend/web/js/new_script.js
| @@ -132,6 +132,19 @@ $(document).ready(function () { | @@ -132,6 +132,19 @@ $(document).ready(function () { | ||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | - | 135 | + $('.collection .new_collection').owlCarousel({ |
| 136 | + navigation:true, | ||
| 137 | + navigationText: [], | ||
| 138 | + responsiveClass: true, | ||
| 139 | + loop:true, | ||
| 140 | + items:3, | ||
| 141 | + itemsDesktop:[1199,2], | ||
| 142 | + itemsDesktopSmall : false, | ||
| 143 | + itemsTablet: false, | ||
| 144 | + itemsMobile : false, | ||
| 145 | + mouseDrag:false | ||
| 146 | + | ||
| 147 | + | ||
| 148 | + }); | ||
| 136 | 149 | ||
| 137 | }) | 150 | }) |
| 138 | \ No newline at end of file | 151 | \ No newline at end of file |