Commit a2ea902f772ba40933b1b0555ea90d856d9f9a13
1 parent
e4f8f25d
image size
Showing
4 changed files
with
25 additions
and
7 deletions
Show diff stats
common/modules/product/widgets/views/product_smart.php
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | /** @var \common\modules\product\models\Product $product */ |
| 3 | 3 | use yii\helpers\Url; |
| 4 | 4 | ?> |
| 5 | -<li class="item"> | |
| 5 | +<div class="item"> | |
| 6 | 6 | <div class="boxitem"> |
| 7 | 7 | <div class="pixbox"> |
| 8 | 8 | <a href="<?= Url::to([ |
| ... | ... | @@ -53,4 +53,4 @@ use yii\helpers\Url; |
| 53 | 53 | <?php endforeach; ?> |
| 54 | 54 | </ul> |
| 55 | 55 | </div> |
| 56 | -</li> | |
| 57 | 56 | \ No newline at end of file |
| 57 | +</div> | |
| 58 | 58 | \ No newline at end of file | ... | ... |
common/modules/product/widgets/views/products_block.php
| 1 | +<?php | |
| 2 | + use yii\web\View; | |
| 3 | +?> | |
| 1 | 4 | <div class="_prd_spec-wr"> |
| 2 | - <div class="special-products products<?= (!empty($class) ? ' '. $class : '')?>"> | |
| 5 | + <div class="special-products products<?= | |
| 6 | + | |
| 7 | + (!empty($class) ? ' '. $class : '')?>"> | |
| 3 | 8 | <h3><?= $title?></h3> |
| 4 | - <ul> | |
| 9 | + <div class="owl-carousel"> | |
| 5 | 10 | <?php foreach($products as $product) :?> |
| 6 | 11 | <?= $this->render('product_smart', ['product' => $product]);?> |
| 7 | 12 | <?php endforeach?> |
| 8 | - </ul> | |
| 13 | + </div> | |
| 9 | 14 | <div class="both"></div> |
| 10 | 15 | </div> |
| 11 | -</div> | |
| 12 | 16 | \ No newline at end of file |
| 17 | +</div> | |
| 18 | + | |
| 19 | +<?php $js = '$(".owl-carousel").owlCarousel({ | |
| 20 | + // Navigation | |
| 21 | + navigation : true, | |
| 22 | + navigationText : ["prev","next"], | |
| 23 | + rewindNav : true, | |
| 24 | + scrollPerPage : false, | |
| 25 | + pagination : false | |
| 26 | + })'; | |
| 27 | +$this->registerJs($js, View::POS_READY); | |
| 28 | +?> | |
| 13 | 29 | \ No newline at end of file | ... | ... |
composer.json
| ... | ... | @@ -41,7 +41,8 @@ |
| 41 | 41 | "kartik-v/yii2-widget-fileinput": "@dev", |
| 42 | 42 | "maxmirazh33/yii2-uploadable-cropable-image": "*", |
| 43 | 43 | "iutbay/yii2-imagecache": "*", |
| 44 | - "yurkinx/yii2-image": "dev-master" | |
| 44 | + "yurkinx/yii2-image": "dev-master", | |
| 45 | + "sersid/yii2-owl-carousel-asset": "*" | |
| 45 | 46 | }, |
| 46 | 47 | "require-dev": { |
| 47 | 48 | "yiisoft/yii2-codeception": "*", | ... | ... |
frontend/assets/AppAsset.php