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>
        </div>
        </div>
        <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):?>
        </div>
    <?php endif;?>
<?php endforeach;?>
            </div>

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

    </div>

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...