Jump to content

Карусель для карточки товара

Recommended Posts

Друзья, есть каруселька для карточки товара 

<div class="col-sm-9 padding-right">
<div class="product-details"><!--product-details-->
    <div class="col-sm-5">
        <div class = "butterfly">
        <div class="view-product">
            <div class="imgCenter">
            <?= Html::img($mainImg->getUrl('355'), ['alt' => $product->name]) ?>
        <div id="similar-product" class="carousel slide" data-ride="carousel">

            <!-- Wrapper for slides -->

            <div class="carousel-inner">
<?php $count = count($gallery); $i = 0; foreach($gallery as $img): ?>
    <?php if($i % 3 == 0):?>
        <div class="item <?php if($i == 0) echo ' active'?>">
    <?php endif;?>
        <a href=""><?= Html::img($img->getUrl('84x85'), ['alt' => $product -> name])?></a>
    <?php $i++; if($i % 3 == 0 || $i == $count):?>
    <?php endif;?>
<?php endforeach;?>

            <!-- Controls -->
            <a class="left item-control" href="#similar-product" data-slide="prev">
                <i class="fa fa-angle-left"></i>
            <a class="right item-control" href="#similar-product" data-slide="next">
                <i class="fa fa-angle-right"></i>


Не выводится выбранная картинка.. подскажите что поправить нужно

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...