Commit 1fc2cae43dcc61094034795520cb4cf94cc80da4
1 parent
452e3a09
slider view
Showing
3 changed files
with
16 additions
and
24 deletions
Show diff stats
frontend/views/product/view.php
| ... | ... | @@ -349,25 +349,21 @@ |
| 349 | 349 | |
| 350 | 350 | <div class="product-carousel"> |
| 351 | 351 | <div class="homepage owl-carousel"> |
| 352 | + <div class="products"> | |
| 352 | 353 | <?php |
| 353 | 354 | $newItemsArrays = array_chunk($similar, 4); |
| 354 | 355 | foreach ($newItemsArrays as $newItemsArray) { |
| 355 | - ?> | |
| 356 | - <div class="products"> | |
| 357 | - <?php | |
| 358 | - foreach ($newItemsArray as $product) { | |
| 359 | - echo $this->render( | |
| 360 | - '@frontend/views/site/_slider_product', | |
| 361 | - [ | |
| 362 | - 'product' => $product, | |
| 363 | - ] | |
| 364 | - ); | |
| 365 | - } | |
| 366 | - ?> | |
| 367 | - </div> | |
| 368 | - <?php | |
| 356 | + foreach ($newItemsArray as $product) { | |
| 357 | + echo $this->render( | |
| 358 | + '@frontend/views/site/_slider_product', | |
| 359 | + [ | |
| 360 | + 'product' => $product, | |
| 361 | + ] | |
| 362 | + ); | |
| 363 | + } | |
| 369 | 364 | } |
| 370 | 365 | ?> |
| 366 | + </div> | |
| 371 | 367 | </div> |
| 372 | 368 | </div> |
| 373 | 369 | <?php | ... | ... |
frontend/views/site/index.php
| ... | ... | @@ -74,7 +74,7 @@ _________________________________________________________ --> |
| 74 | 74 | <h2><?php echo \Yii::t('app', 'Новинки'); ?></h2> |
| 75 | 75 | </div> |
| 76 | 76 | |
| 77 | - <div class="product-carousel"> | |
| 77 | + <div class="product-carousel home-carousel-pr"> | |
| 78 | 78 | <div class="homepage owl-carousel"> |
| 79 | 79 | <?php |
| 80 | 80 | $newItemsArrays = array_chunk($newItems, 4); |
| ... | ... | @@ -104,7 +104,7 @@ _________________________________________________________ --> |
| 104 | 104 | <div class="heading text-center"> |
| 105 | 105 | <h2><?php echo \Yii::t('app', 'Акции'); ?></h2> |
| 106 | 106 | </div> |
| 107 | - <div class="product-carousel"> | |
| 107 | + <div class="product-carousel home-carousel-pr"> | |
| 108 | 108 | <div class="homepage owl-carousel"> |
| 109 | 109 | <?php |
| 110 | 110 | $newItemsArrays = array_chunk($saleItems, 4); |
| ... | ... | @@ -134,7 +134,7 @@ _________________________________________________________ --> |
| 134 | 134 | <div class="heading text-center"> |
| 135 | 135 | <h2><?php echo \Yii::t('app', 'Топ'); ?></h2> |
| 136 | 136 | </div> |
| 137 | - <div class="product-carousel"> | |
| 137 | + <div class="product-carousel home-carousel-pr"> | |
| 138 | 138 | <div class="homepage owl-carousel"> |
| 139 | 139 | <?php |
| 140 | 140 | $newItemsArrays = array_chunk($topItems, 4); | ... | ... |
frontend/views/variant/view.php
| ... | ... | @@ -412,12 +412,10 @@ |
| 412 | 412 | |
| 413 | 413 | <div class="product-carousel"> |
| 414 | 414 | <div class="homepage owl-carousel"> |
| 415 | + <div class="products"> | |
| 415 | 416 | <?php |
| 416 | - $newItemsArrays = array_chunk($similar, 4); | |
| 417 | + $newItemsArrays = array_chunk($similar, 1); | |
| 417 | 418 | foreach ($newItemsArrays as $newItemsArray) { |
| 418 | - ?> | |
| 419 | - <div class="products"> | |
| 420 | - <?php | |
| 421 | 419 | foreach ($newItemsArray as $product) { |
| 422 | 420 | echo $this->render( |
| 423 | 421 | '@frontend/views/site/_slider_product', |
| ... | ... | @@ -426,11 +424,9 @@ |
| 426 | 424 | ] |
| 427 | 425 | ); |
| 428 | 426 | } |
| 429 | - ?> | |
| 430 | - </div> | |
| 431 | - <?php | |
| 432 | 427 | } |
| 433 | 428 | ?> |
| 429 | + </div> | |
| 434 | 430 | </div> |
| 435 | 431 | </div> |
| 436 | 432 | <?php | ... | ... |