product_smart.php 3.52 KB
<?php
/**
 * @var $product  common\modules\product\models\Product
 */
use yii\helpers\Html;
use yii\helpers\Url;
?>
<div class="catalog_item home_slider_it">
    <div class="wrapper">
        <div class="status_block-wr">
            <div class="staus_new"></div>
            <!--статусы-->
<!--            <div class="staus_hit"></div>-->
<!--            <div class="status_sale">-60%</div>-->
        </div>
        <div class="item_container" >
            <input class="prodInfo" type="hidden" value="[]">

            <div class="img">
                <a class="btn-product-details" href="<?= Url::to([
                    'catalog/product',
                    'product' => $product->alias
                ]) ?>">
                    <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[ 0 ]->imageUrl, 'list', [
                        'alt'   => $product->fullname . ' ' . $product->category->name,
                        'title' => $product->fullname . ' ' . $product->category->name,
                        'class' => 'selected'
                    ]) ?>
                </a>
            </div>

            <div class="style short-desc_wr">
                <div class="style title-name_">
                    <a href="<?= Url::to([
                        'catalog/product',
                        'product' => $product->alias
                    ]) ?>" title="<?= $product->fullname . ' ' . $product->category->name ?>">
                        <p><span><?= $product->fullname ?></span></p>
                        <p><span><?= $product->category->name ?></span></p>
                    </a>

                </div>
                <div class="style in_stock_wr">
                    <div class="in_stock_">
                        <span class="yes_stock">есть на складе</span>
                        <!--если нет в наличии выводить блок тот что ниже-->
<!--                        <span class="no_stock">нет на складе</span>-->
                    </div>
                    <div class="title-sku">
                        <span>Код: <?=$product->variant->sku?></span>
                    </div>
                </div>

                <div class="style price-basket-wr">
                    <span class="currency_price"><?= $product->variant->price ?> грн</span>
                    <div class="price-basket"><a class="" href="#"></a></div>
                </div>
            </div>

            <!--                <div class="info_icons">-->
            <!--                    <a href="#" class="btn buy_button" data-toggle="modal" data-target="#buyForm" data-id="--><?//=$product->variant->product_variant_id; ?><!--" lang="145">Купить</a>-->
            <!--                    <ul class="ul wishlike_block hidden">-->
            <!--                        <li class="compare  hidden">-->
            <!--                            <a onclick="add2compare(); return false;" class="compare compare_text_link_3631483" href="#">К сравнению</a>-->
            <!--                            <span class="icon"></span>-->
            <!--                        </li>-->
            <!--                        <li class="like hidden">-->
            <!--                            <a class="like like_text_link_3631483" href="#">В избранное</a><span class="icon"></span>-->
            <!--                        </li>-->
            <!--                    </ul>-->
            <!--                </div>-->

        </div>
    </div>
</div>